Skip to contentSkip to conversation

CVE-2024-58000: io_uring: prevent reg-wait speculations

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 27, 2025

lore
Share & tools
lore
#0 lore raw

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

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

io_uring: prevent reg-wait speculations

With *ENTER_EXT_ARG_REG instead of passing a user pointer with arguments for the waiting loop the user can specify an offset into a pre-mapped region of memory, in which case the
[offset, offset + sizeof(io_uring_reg_wait)) will be intepreted as the argument.

As we address a kernel array using a user given index, it'd be a subject to speculation type of exploits. Use array_index_nospec() to prevent that. Make sure to pass not the full region size but truncate by the maximum offset allowed considering the structure size.

The Linux kernel CVE team has assigned CVE-2024-58000 to this issue.

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

	Issue introduced in 6.13 with commit aa00f67adc2c0d6439f81b5a81ff181377c47a7e and fixed in 6.13.2 with commit 2a6de94df7bfa76d9850443547e7b3333f63a16a
	Issue introduced in 6.13 with commit aa00f67adc2c0d6439f81b5a81ff181377c47a7e and fixed in 6.14-rc1 with commit 29b95ac917927ce9f95bf38797e16333ecb489b1

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-2024-58000

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:
io_uring/io_uring.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/2a6de94df7bfa76d9850443547e7b3333f63a16a
	https://git.kernel.org/stable/c/29b95ac917927ce9f95bf38797e16333ecb489b1