CRITICAL Introduced in 4.14
seg6 Decap OOB
CVE-2026-80976
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.1HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: seg6: reset IP6CB after IPv6 decapsulation decap_and_validate() pulls the outer SRv6 headers and makes the inner packet the skb network header. The IPv6 control block still contains values collected while parsing the outer packet, including nhoff and extension-header flags. End.DX6 and End.DT6 route the inner IPv6 packet directly to the IPv6 input path. An unprivileged user can reach End.DT6 from a user and net namespace by installing a local SID and injecting an outer packet with Hop-by-Hop and Destination Options headers followed by an SRH and a minimal inner IPv6 packet. The outer extension headers leave a large nhoff in IP6CB. After decapsulation, ip6_protocol_deliver_rcu() uses that stale offset on the inner packet and reads beyond the skb head. KASAN reports: BUG: KASAN: slab-out-of-bounds in ip6_protocol_deliver_rcu ip6_protocol_deliver_rcu+0x1118/0x1450 ip6_input_finish+0x11b/0x240 seg6_local_input_core+0xed/0x2e0 lwtunnel_input+0x1e9/0x4e0 ipv6_rthdr_rcv+0x525f/0x6c50 ip6_protocol_deliver_rcu+0xcb7/0x1450 Before clearing IP6CB for an inner IPv6 packet, save its incoming interface index and L3 slave state. Restore both after the clear and set nhoff to the inner IPv6 base-header nexthdr field. Use IP6CB(skb)->iif rather than skb->skb_iif because VRF processing can replace skb_iif with the L3 master while IP6CB keeps the receiving interface. Preserve IP6SKB_L3SLAVE for the same reason.
02KernelScan AI Analysis
Risk summary
An unprivileged local user can trigger an out-of-bounds read in the kernel's IPv6 stack by exploiting stale control-block data left after SRv6 decapsulation. The attacker creates a user and network namespace, installs a local SRv6 SID, and injects a crafted outer packet with large extension headers followed by a minimal inner IPv6 packet. The stale offset from the outer headers causes the kernel to read beyond the inner packet buffer, potentially leaking kernel memory or crashing the system.
Vulnerability analysis
When SRv6 decapsulation removes outer headers to expose an inner IPv6 packet, it leaves behind stale control-block data from parsing the outer packet. The IPv6 input path then uses a stale offset on the smaller inner packet, reading beyond the buffer. The fix clears that leftover data after decapsulation, preserving only the receiving interface information, and points the offset to the correct location in the inner packet. An unprivileged local user can reach this by creating a user and network namespace, installing a local SRv6 SID, and injecting a crafted outer packet with large extension headers followed by a minimal inner IPv6 packet.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 4.14 | 6.12.109 | 2b154e96fcb3 |
| 5.15 | 4.14 | 5.15.221 | a0e2b0a3718f |
| 6.1 | 4.14 | 6.1.188 | 9ae92198c24d |
| 6.6 | 4.14 | 6.6.157 | 96c74420ac92 |
| mainline | 4.14 | 7.3-rc1 | f967455fb2a5 |
| 7.2 | 4.14 | 7.2.4 | c73fb911e02b |
| 6.18 | 4.14 | 6.18.50 | cfa186a0857a |
| 5.10 | 4.14 | 5.10.270 | d1f0d3533589 |