Skip to contentSkip to conversation

CVE-2026-97618: io_uring/net: don't overconsume buffers when using MSG_TRUNC

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 25

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/net: don't overconsume buffers when using MSG_TRUNC

When a recv/recvmsg is issued with MSG_TRUNC and the incoming packet is larger than the provided buffer, the net layer returns the full length of the packet rather than the number of bytes actually copied into the buffer. As a result, io_uring advances more of the provided buffer ring than was actually filled. Use the actual filled region size to consume the buffer, but still return the full size to preserve MSG_TRUNC semantics.

Take care with multishot, because that seems to already truncate the consumption based on the available payload size.

This was reported in https://github.com/axboe/liburing/issues/1619.

[axboe: fold in size_t unsigned fix]

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

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

	Issue introduced in 6.12 with commit ae98dbf43d755b4e111fcd086e53939bef3e9a1a and fixed in 6.18.53 with commit 927d96f91c582b319d104ecf50ec935a8dc29193
	Issue introduced in 6.12 with commit ae98dbf43d755b4e111fcd086e53939bef3e9a1a and fixed in 7.2.7 with commit 2e70ea75c7bb38a6dc212975f887310f14f7c043
	Issue introduced in 6.12 with commit ae98dbf43d755b4e111fcd086e53939bef3e9a1a and fixed in 7.3-rc3 with commit 6028b543884f8735e057ec9eea4908cd61cab230

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

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/net.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/927d96f91c582b319d104ecf50ec935a8dc29193
	https://git.kernel.org/stable/c/2e70ea75c7bb38a6dc212975f887310f14f7c043
	https://git.kernel.org/stable/c/6028b543884f8735e057ec9eea4908cd61cab230