Look up another CVE · open CVE-2024-56709 in the interactive tracker
CVE-2024-56709
io_uring: check if iowq is killed before queuing
Published 2024-12-29 (22 months ago) by the Linux kernel CNA. Subsystem io_uring. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2024-56709 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | fixed | 6.1.123-1 | Update the kernel and reboot. Fixed in 6.1.123-1. A running kernel keeps the old code until the machine restarts. |
| Debian 13trixie | vulnerable | 6.12.113-1 | No fix published anywhere yet, neither in Debian nor upstream for the series trixie tracks. Watch the Debian tracker page for this CVE. Advisories for trixie have historically landed a median of 11 days after publication. |
| Debian 14forky | vulnerable | 7.2.11-1 | No fix published anywhere yet, neither in Debian nor upstream for the series forky tracks. Watch the Debian tracker page for this CVE. |
| Debian unstablesid | vulnerable | 7.2.11-1 | No fix published anywhere yet, neither in Debian nor upstream for the series sid tracks. Watch the Debian tracker page for this CVE. |
The vulnerability
What the bug is
task work can be executed after the task has gone through io_uring termination, whether it's the final task_work run or the fallback path. In this case, task work will find ->io_wq being already killed and null'ed, which is a problem if it then tries to forward the request to io_queue_iowq(). Make io_queue_iowq() fail requests in this case. Note that it also checks PF_KTHREAD, because the user can first close a DEFER_TASKRUN ring and shortly after kill the task, in which case ->iowq check would race.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
io_uring/io_uring.c
- What this is
- IO_URINGMAINTAINERS section matched on io_uring/ · io-uring@vger.kernel.org · Maintained
Check it on the machine
grep -w CONFIG_IO_URING /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
Show whether Debian builds this, per release
Debian builds this code. Every release below compiles the affected file into the kernels it ships.
- bookworm, trixie, forky, sidy
- y
- built into the kernel image on every flavour - only a patch removes it
- Build switch
- CONFIG_IO_URING
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2024-12-29 (22 months ago)source
- CVSS
- 7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.22%, higher than 12.1% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- io_uring
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 5.14 | 6.1.122 | 534d59ab3801 |
| 5.14 | 6.6.68 | 2ca94c8de360 |
| 5.14 | 6.12.7 | 4f95a2186b7f |
| 5.14 | 6.13 | dbd2ca9367eb |
Debian advisories
| Advisory | Date | Shipped to | Debian |
|---|---|---|---|
| DLA-4076-1 | 2025-03-01 | bullseye 6.1.128-1~deb11u1 | tracker |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The vulnerability is reached purely through the io_uring syscall interface (io_uring_setup/io_uring_enter, SQE submission, and close(2) of the ring fd), which requires local access to the machine. Per kernel scoring guidance io_uring bugs are Local.
- AC:LAttack complexity, low
- The attacker controls both sides of the race — they choose exactly when to close the DEFER_TASKRUN ring (driving the request into the PF_KTHREAD fallback worker) and when to exit the submitting task (driving io_wq_put_and_exit/kfree), and can retry the whole sequence in a fresh process arbitrarily many times. The NULL-io_wq/BUG_ON variant is essentially deterministic once the exit ordering is arranged.
- PR:LPrivileges required, low
- Any unprivileged local user with default io_uring access can create the ring, submit an IOSQE_ASYNC/IOSQE_IO_DRAIN request (REQ_F_FORCE_ASYNC), and trigger the exit race; no capabilities, root, or user-namespace tricks are required.
- UI:NUser interaction, none
- The entire sequence is performed by the attacker's own process and threads with no victim action of any kind.
- S:UScope, unchanged
- The corruption and its consequences are confined to the Linux kernel's own security authority; there is no VM, IOMMU, or sandbox boundary crossed.
- C:HConfidentiality impact, high
- The freed struct io_wq is read back after kfree (wq->state, wq->acct[], wq->free_list, wq->task, wq->do_work/free_work), so an attacker who reclaims the kmalloc-1k slot obtains a use-after-free read primitive over kernel heap contents, and per guidance a UAF is scored High.
- I:HIntegrity impact, high
- io_run_cancel() invokes wq->do_work(work) and wq->free_work(work) — indirect calls through function pointers read from the freed, attacker-reclaimable allocation — and io_wq_insert_work() writes list pointers into that freed memory, giving control-flow hijack and write primitives suitable for privilege escalation.
- A:HAvailability impact, high
- The NULL-io_wq path hits BUG_ON() for a guaranteed kernel oops (full panic with panic_on_oops), and because it fires inside io_fallback_req_func() while holding ctx->uring_lock the mutex is leaked, permanently hanging io_ring_exit_work and any task touching that ring; the UAF variant additionally crashes on freed memory.