Skip to contentSkip to conversation

CVE-2026-23275: io_uring: ensure ctx->rings is stable for task work flags manipulation

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Mar 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: ensure ctx->rings is stable for task work flags manipulation

If DEFER_TASKRUN | SETUP_TASKRUN is used and task work is added while the ring is being resized, it's possible for the OR'ing of IORING_SQ_TASKRUN to happen in the small window of swapping into the new rings and the old rings being freed.

Prevent this by adding a 2nd ->rings pointer, ->rings_rcu, which is protected by RCU. The task work flags manipulation is inside RCU already, and if the resize ring freeing is done post an RCU synchronize, then there's no need to add locking to the fast path of task work additions.

Note: this is only done for DEFER_TASKRUN, as that's the only setup mode that supports ring resizing. If this ever changes, then they too need to use the io_ctx_mark_taskrun() helper.

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

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

	Issue introduced in 6.13 with commit 79cfe9e59c2a12c3b3faeeefe38d23f3d8030972 and fixed in 6.18.19 with commit 7cc4530b3e952d4a5947e1e55d06620d8845d4f5
	Issue introduced in 6.13 with commit 79cfe9e59c2a12c3b3faeeefe38d23f3d8030972 and fixed in 6.19.9 with commit 46dc07d5f31411cc023f3bf1f4a23a07bf6e0ed1
	Issue introduced in 6.13 with commit 79cfe9e59c2a12c3b3faeeefe38d23f3d8030972 and fixed in 7.0-rc4 with commit 96189080265e6bb5dde3a4afbaf947af493e3f82

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-23275

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/register.c
io_uring/tw.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/7cc4530b3e952d4a5947e1e55d06620d8845d4f5
	https://git.kernel.org/stable/c/46dc07d5f31411cc023f3bf1f4a23a07bf6e0ed1
	https://git.kernel.org/stable/c/96189080265e6bb5dde3a4afbaf947af493e3f82