In the Linux kernel, the following vulnerability has been resolved:
io_uring/rsrc: don't lock while !TASK_RUNNING
There is a report of io_rsrc_ref_quiesce() locking a mutex while not
TASK_RUNNING, which is due to forgetting restoring the state back after
io_run_task_work_sig() and attempts to break out of the waiting loop.
do not call blocking ops when !TASK_RUNNING; state=1 set at
[<ffffffff815d2494>]prepare_to_wait+0xa4/0x380kernel/sched/wait.c:237WARNING: CPU: 2 PID: 397056 at kernel/sched/core.c:10099__might_sleep+0x114/0x160kernel/sched/core.c:10099RIP: 0010:__might_sleep+0x114/0x160kernel/sched/core.c:10099Call Trace:<TASK>__mutex_lock_commonkernel/locking/mutex.c:585[inline]__mutex_lock+0xb4/0x940kernel/locking/mutex.c:752io_rsrc_ref_quiesce+0x590/0x940io_uring/rsrc.c:253io_sqe_buffers_unregister+0xa2/0x340io_uring/rsrc.c:799__io_uring_registerio_uring/register.c:424[inline]__do_sys_io_uring_register+0x5b9/0x2400io_uring/register.c:613do_syscall_x64arch/x86/entry/common.c:52[inline]do_syscall_64+0xd8/0x270arch/x86/entry/common.c:83entry_SYSCALL_64_after_hwframe+0x6f/0x77