VDB

CVE-2024-40922

CVE-2024-40922 PUBLISHED

io_uring/rsrc: don't lock while !TASK_RUNNING

Reported by linux · Published July 12, 2024

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/0x380 kernel/sched/wait.c:237 WARNING: CPU: 2 PID: 397056 at kernel/sched/core.c:10099 __might_sleep+0x114/0x160 kernel/sched/core.c:10099 RIP: 0010:__might_sleep+0x114/0x160 kernel/sched/core.c:10099 Call Trace: <TASK> __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0xb4/0x940 kernel/locking/mutex.c:752 io_rsrc_ref_quiesce+0x590/0x940 io_uring/rsrc.c:253 io_sqe_buffers_unregister+0xa2/0x340 io_uring/rsrc.c:799 __io_uring_register io_uring/register.c:424 [inline] __do_sys_io_uring_register+0x5b9/0x2400 io_uring/register.c:613 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd8/0x270 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
linux_kernellinux6.9.6, 6.6.35
LinuxLinux54559642b96116b45e4b5ca7fd9f7835b8561272

Affected products

VendorProductVersions
LinuxLinux4ea15b56f0810f0d8795d475db1bb74b3a7c1b2f, 4ea15b56f0810f0d8795d475db1bb74b3a7c1b2f, 4ea15b56f0810f0d8795d475db1bb74b3a7c1b2f
LinuxLinux6.4, 0, 6.6.35
LinuxLinux0, 6.6.35, 6.9.6
linuxlinux_kernel6.4, 6.4, 6.4

Timeline

  • Jul 12, 2024 CVE Published
  • Jul 13, 2024 EPSS Score (30 in total, the first dated here)
  • Oct 4, 2024 Coalition ESS Score (10 in total, the first dated here)
  • Dec 5, 2025 CVE Updated
  • Jan 7, 2026 Security Advisory (271 in total, the first dated here)
  • May 28, 2026 Distribution Patch (174 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-40922
vulnetix vdb fixes CVE-2024-40922

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-40922/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›