io_uring/net: don't overconsume buffers when using MSG_TRUNC
Published Sep 25, 2026
No CVSS score
EPSS 0.20%
Description
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]
Affected products
-
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version
-
- Version 6.12StatusaffectedConstraints-
- Version 0StatusunaffectedConstraints<6.12
- Version 6.12.112StatusunaffectedConstraints<=6.12.*
- Version 6.18.53StatusunaffectedConstraints<=6.18.*
- Version 7.2.7StatusunaffectedConstraints<=7.2.*
- Version 7.3-rc3StatusunaffectedConstraints<=*
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
No data.
No data.
No Red Hat product state for this CVE.
No package ranges for this CVE.
Remediation
No remediation recorded yet.
No CWE recorded.
References (5)
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-86749 Advisory
- https://git.kernel.org/stable/c/2e70ea75c7bb38a6dc212975f887310f14f7c043
- https://git.kernel.org/stable/c/41d24d2fb168fa05fcaf9ec4e55478411dbbf8e1
- https://git.kernel.org/stable/c/6028b543884f8735e057ec9eea4908cd61cab230
- https://git.kernel.org/stable/c/927d96f91c582b319d104ecf50ec935a8dc29193
Change history (0)
No recorded changes yet.