CVE-2026-143138: net: gro: avoid parsing headers from shared fragments
In the Linux kernel, the following vulnerability has been resolved:
net: gro: avoid parsing headers from shared fragments
When an skb has an empty linear head, skbgroresetoffset() can expose the first page fragment directly to GRO header parsers. For an SKBFLSHAREDFRAG skb, those bytes may still be writable through a file mapping. Headers validated during receive can therefore differ from the headers later copied into the linear head and used during completion.
For example, changing an IPv6 destination-options length between the short and full header fetches in ipv6gropullexthdrs() can make ipv6grocomplete() pass an out-of-bounds offset to udp6grocomplete(). A userspace reproducer triggered a KASAN slab-out-of-bounds read there on an unmodified kernel as UID 1000. The same completion path can write the UDP checksum and length through the invalid offset. The packet has trusted TCP GSO metadata and spliced file data, so it reaches completion without an skb zerocopy destructor or a second GRO packet.
Disable the direct-fragment fast path for skbs with externally writable fragments. With an empty linear head, frag0len remains zero, so skbgroheaderslow() pulls each required header into the linear head before it is inspected. Subsequent pulls preserve the validated prefix. This covers both groreceiveskb() and napigrofrags(), including other protocols using the same helpers. Linear headers and private fragments retain their existing fast paths.
Codex assisted with review of the supplied report, reproducer and draft fix, related-path analysis, and this changelog. The patched net/core/gro.o builds with W=1 using the supplied x86-64 configuration, allyesconfig and allmodconfig. The fix was checked by code-path analysis; the reproducer and kernel selftests have not been run on a booted patched kernel.
The issue was found by an LLM.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Disable the direct-fragment fast path for skbs marked SKBFL_SHARED_FRAG so GRO parsers do not read headers directly from externally writable fragments.
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
The affected skb must have an empty linear head and externally writable shared fragments, with the fragment bytes writable through a file mapping. The reproducer also used trusted TCP GSO metadata and spliced file data so that the packet reached GRO completion.
Does exploitation require elevated privileges or a modified kernel?
A userspace reproducer triggered the issue on an unmodified kernel as UID 1000. The provided data does not indicate that elevated privileges or a custom kernel are required.
What can happen if the race is triggered?
Header contents validated during receive can differ from those later used during completion, producing an invalid offset. This was observed as a KASAN slab out-of-bounds read, and the completion path can also write the UDP checksum and length through that invalid offset.
How is the issue resolved?
The fix disables the direct-fragment fast path for skbs with externally writable fragments. This causes GRO header handling to use the slow path and pull required header data instead of parsing directly from a writable fragment.