CVE-2026-99800: io_uring: free the task context after a grace period
In the Linux kernel, the following vulnerability has been resolved:
iouring: free the task context after a grace period
A task other than the owner can free a request, ioringexitwork() running the local taskwork of a DEFERTASKRUN ring for example, or iodoiopoll() reaping completions. ioputtask() then takes the else branch:
percpucountersub(&tctx->inflight, 1); if (unlikely(atomicread(&tctx->incancel))) wakeup(&tctx->wait); puttaskstruct(tctx->task);
The first line is what lets the owner leave iouringcancelgeneric(), and on exec it frees the tctx right after. Nothing holds that off for the remaining three lines, the task reference only covers a tctx freed along with the taskstruct. It used to work out because iouringdeltctxnode() took the uringlock that the freeing side holds across ioputtask(), until that moved to tctxlock.
Free the tctx with kfreercu(), and enter an RCU read section in ioputtask() before the count is dropped.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.3-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 6.12.107-1Fixed in 6.12.117-1Fixed in 7.3.4-1Fixed in 7.3.5-1
Frequently Asked Questions
What conditions are required for this issue to occur?
The affected task context must be released by a task other than its owner while the owner is able to leave io_uring_cancel_generic() and free that context, such as when io_ring_exit_work() runs local task_work for a DEFER_TASKRUN ring or when io_do_iopoll() reaps completions. The race concerns the remaining operations in io_put_task() after the inflight counter is decremented.
Is this limited to a particular io_uring configuration or execution path?
The description specifically identifies DEFER_TASKRUN rings whose local task_work is run by io_ring_exit_work(), and completion reaping through io_do_iopoll(), as paths where another task can free a request. No information is provided about whether other io_uring configurations are affected.
What does the fix change?
The fix defers freeing the task context with kfree_rcu() and enters an RCU read-side critical section in io_put_task() before decrementing the inflight count. This prevents the task context from being freed while io_put_task() still accesses it.