CVE-2024-40922: io_uring/rsrc: don't lock while !TASK_RUNNING
In the Linux kernel, the following vulnerability has been resolved:
iouring/rsrc: don't lock while !TASKRUNNING
There is a report of iorsrcrefquiesce() locking a mutex while not TASKRUNNING, which is due to forgetting restoring the state back after ioruntaskworksig() and attempts to break out of the waiting loop.
do not call blocking ops when !TASKRUNNING; state=1 set at [<ffffffff815d2494>] preparetowait+0xa4/0x380 kernel/sched/wait.c:237 WARNING: CPU: 2 PID: 397056 at kernel/sched/core.c:10099 mightsleep+0x114/0x160 kernel/sched/core.c:10099 RIP: 0010:mightsleep+0x114/0x160 kernel/sched/core.c:10099 Call Trace: <TASK> mutexlockcommon kernel/locking/mutex.c:585 [inline] mutexlock+0xb4/0x940 kernel/locking/mutex.c:752 iorsrcrefquiesce+0x590/0x940 iouring/rsrc.c:253 iosqebuffersunregister+0xa2/0x340 iouring/rsrc.c:799 iouringregister iouring/register.c:424 [inline] dosysiouringregister+0x5b9/0x2400 iouring/register.c:613 dosyscallx64 arch/x86/entry/common.c:52 [inline] dosyscall64+0xd8/0x270 arch/x86/entry/common.c:83 entrySYSCALL64afterhwframe+0x6f/0x77
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-40922?
CVE-2024-40922 has a moderate severity level due to potential impact on system stability.
How do I fix CVE-2024-40922?
To fix CVE-2024-40922, update the kernel to versions 6.6.35, 6.9.6, 6.10 from Red Hat or specific versions from Debian.
What systems are affected by CVE-2024-40922?
CVE-2024-40922 affects Linux kernels prior to 6.6.35, 6.9.6, and 6.10 from Red Hat, along with certain Debian kernel versions.
What is the nature of the vulnerability in CVE-2024-40922?
The vulnerability in CVE-2024-40922 involves inappropriate mutex locking in the io_uring subsystem when the task is not in a running state.
Is there a workaround for CVE-2024-40922?
There is no known workaround for CVE-2024-40922; updating the affected kernel is the recommended action.