Ad

CVE-2026-99561

NONE EPSS 0.21%
Обновлено 23 ноября 2026
Linux
Параметр Значение
Поставщик Linux
Публичный эксплойт Нет

В ядре Linux была устранена следующая уязвимость: fork: не создавать io потоки после того, как PF_POSTCOREDUMP установлен zap_process() пропускает каждый поток, который уже имеет PF_POSTCOREDUMP набор. Такая нить прошла мимо synchronize_group_exit (), поэтому coredump больше не может ее поймать. Он не считается в core_state->threads_remaining и не отправляется SIGKILL. do_exit() устанавливает PF_POSTCOREDUMP в synchronize_group_exit() и сразу после этого вызывает io_uring_files_cancel().

Отмена запускает работу задачи и create_worker_cb(), что io-wq очередь перед выходом создает новый io-wq рабочий оттуда. Если другой поток запустил coredump в то же время, что работник присоединяется к группе потоков, которая уже сбрасывается. zap_process () никогда не видел его, поэтому он никогда не считался. Но когда он выходит, он видит signal->core_state в synchronize_group_exit () и уменьшает threads_remaining, как и любой другой поток.

Таким образом, число достигает нуля на один поток раньше, и дампер покидает coredump_wait_inactive (), в то время как поток, который он считал, все еще работает. Задание не имеет фатального сигнала, потому что zap_process() намеренно не отправил его, и он никогда не проходил через get_signal(), поэтому у него также нет PF_SIGNALED. Отказаться от создания потока io, когда у создателя есть PF_POSTCOREDUMP.

Это ничего не стоит. io_uring_files_cancel() поднимает IO_WQ_BIT_EXIT до того, как он запустит какую-либо работу, поэтому работник, созданный оттуда, только когда-либо снова выходит, а io_should_retry_thread() не повторяет -EINTR. Очистка PF_POSTCOREDUMP для нового потока в copy_process() была другим вариантом. Это делает рабочего нить, как и любой другой, но это помогает только до тех пор, пока свалка не началась.

Рабочий, родившийся после запуска zap_process (), невидим для него, что бы ни говорили его флаги, и все еще уменьшает threads_remaining на выходе. Отказ от его создания покрывает и то, и другое, и тогда ни одна задача не рождается с флагом, поэтому нечего очищать. Перемещение io_uring_files_cancel() впереди synchronize_group_exit() закрывает то же окно.

Он запускает отмену и все, что может заблокировать, до того, как поток объявит о себе самосвалу. Поток, который там блокирует, никогда не достигает coredump_task_exit(), поэтому самосвал в конечном итоге ждет поток, который никогда не паркуется. Отказ от создания оставляет отмену там, где она есть.

Но очень уродливо запускать работу io_uring еще до того, как мы сделали всю общую работу выхода.

Показать оригинальное описание (EN)

In the Linux kernel, the following vulnerability has been resolved: fork: don't create io threads once PF_POSTCOREDUMP is set zap_process() skips every thread that already has PF_POSTCOREDUMP set. Such a thread is past synchronize_group_exit(), so a coredump can't catch it anymore. It isn't counted in core_state->threads_remaining and it isn't sent SIGKILL. do_exit() sets PF_POSTCOREDUMP in synchronize_group_exit() and calls io_uring_files_cancel() right after that. The cancellation runs task work and a create_worker_cb() that io-wq queued before the exit creates a new io-wq worker from there. If another thread started a coredump in the meantime that worker joins a thread-group which is already being dumped. zap_process() never saw it so it was never counted. But when it exits it sees signal->core_state in synchronize_group_exit() and decrements threads_remaining like any other thread. So the count reaches zero one thread early and the dumper leaves coredump_wait_inactive() while a thread it counted is still running. The task has no fatal signal pending because zap_process() deliberately didn't send it one, and it never went through get_signal() so it doesn't have PF_SIGNALED either. Refuse to create an io thread when the creator has PF_POSTCOREDUMP. That costs nothing. io_uring_files_cancel() raises IO_WQ_BIT_EXIT before it runs any task work, so a worker created from there only ever gets to exit again, and io_should_retry_thread() doesn't retry -EINTR. Clearing PF_POSTCOREDUMP for the new thread in copy_process() was the other option. It makes the worker a thread like any other, but it only helps while the dump hasn't started. A worker born after zap_process() has run is invisible to it whatever its flags say and still decrements threads_remaining on the way out. Refusing to create it covers both, and then no task is ever born with the flag, so there is nothing to clear. Moving io_uring_files_cancel() ahead of synchronize_group_exit() closes the same window. It runs the cancellation, and whatever that can block on, before the thread announces itself to the dumper. A thread that blocks there never reaches coredump_task_exit() at all, so the dumper ends up waiting for a thread that never parks. Refusing the creation leaves the cancellation where it is. But it's very ugly to run io_uring work even before we did all the generic exit work.