В ядре Linux устранена следующая уязвимость:
io_uring/waitid: честь отмены Task_work
io_waitid_cb() может выполняться по резервному пути Task_work, когда
Task_work_add() больше не может ставить работу в очередь для исходной задачи.
резервный запуск выполняется с kworker, и io_uring помечает такую работу задачи как
отменен через tw.cancel.
io_waitid_cb() в настоящее время игнорирует tw.cancel и вызывает __do_wait().
waitid зависит от контекста задачи: __do_wait() выполняет дочерний поиск
относительно текущего, и путь повтора также использует
текущий->сигнал->wait_chldexit. Если обратный вызов выполняется из резервного
kworker, следовательно, текущая не та задача, которая отправила запрос. Соблюдайте tw.cancel перед входом в __do_wait().
Завершите запрос с помощью
-ECANCELED и пропустить копию siginfo, поскольку может быть запущена отмененная задача.
без контекста выполнения пользовательского пространства отправляющей задачи. Сохраните существующую обработку siginfo для нормального завершения ожидания и
явная отмена.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: io_uring/waitid: honor task_work cancellation io_waitid_cb() may run through the fallback task_work path when task_work_add() can no longer queue work to the originating task. The fallback runs from a kworker and io_uring marks such task work as canceled through tw.cancel. io_waitid_cb() currently ignores tw.cancel and calls __do_wait(). waitid is task-context dependent: __do_wait() performs child lookup relative to current, and the retry path also uses current->signal->wait_chldexit. If the callback runs from the fallback kworker, current is therefore not the task that submitted the request. Honor tw.cancel before entering __do_wait(). Complete the request with -ECANCELED and skip the siginfo copy, since canceled task work may run without the submitting task's userspace execution context. Keep the existing siginfo handling for normal waitid completion and explicit cancellation.
Характеристики атаки
Последствия
Строка CVSS v3.1