Skip to contentSkip to conversation

CVE-2026-99800: io_uring: free the task context after a grace period

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 20

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

io_uring: free the task context after a grace period

A task other than the owner can free a request, io_ring_exit_work() running the local task_work of a DEFER_TASKRUN ring for example, or io_do_iopoll() reaping completions. io_put_task() then takes the else branch:

    percpu_counter_sub(&tctx->inflight, 1);
    if (unlikely(atomic_read(&tctx->in_cancel)))
            wake_up(&tctx->wait);
    put_task_struct(tctx->task);

The first line is what lets the owner leave io_uring_cancel_generic(), 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 task_struct. It used to work out because io_uring_del_tctx_node() took the uring_lock that the freeing side holds across io_put_task(), until that moved to tctx_lock.

Free the tctx with kfree_rcu(), and enter an RCU read section in io_put_task() before the count is dropped.

The Linux kernel CVE team has assigned CVE-2026-99800 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.19 with commit 5623eb1ed035f01dfa620366a82b667545b10c82 and fixed in 7.3.2 with commit 953174dcb862a7a364efdb65e178dcd3aea5562e
	Issue introduced in 6.19 with commit 5623eb1ed035f01dfa620366a82b667545b10c82 and fixed in 7.4-rc1 with commit 9f5315d3f4368590c9fe06d4313b7247470bcf15

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-99800

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
include/linux/io_uring_types.h
io_uring/io_uring.c
io_uring/tctx.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/953174dcb862a7a364efdb65e178dcd3aea5562e
	https://git.kernel.org/stable/c/9f5315d3f4368590c9fe06d4313b7247470bcf15