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.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8
AV:N - End.DT6/End.DX6 run on the IPv6 receive path (ipv6_rthdr_rcv/lwtunnel_input/seg6_local_input_core) when a packet targets a configured local SID; a remote attacker who can route IPv6/SRv6 traffic to that SID on an SRv6 PE, VPN edge, or similar node triggers decap without local access.
AC:L - The attacker fully controls the outer Hop-by-Hop and Destination Options chain that inflates IP6CB nhoff and the inner packet length, so one crafted packet deterministically makes ip6_protocol_deliver_rcu() index past the skb head with no race or uncontrolled layout.
PR:N - SID processing runs in receive softirq with no authentication; a configured End.DT6/End.DX6 SID is an environmental precondition, not a credential the network attacker must hold (the same path is also reachable by an unprivileged userns user installing a SID).
UI:N - Exploitation requires only sending crafted IPv6 packets to the SID; no victim user or administrator action is needed beyond the pre-existing SRv6 configuration.
S:U - The stale-nhoff out-of-bounds access affects kernel memory on the receiving host only; it does not cross a VM, IOMMU, or sandbox security boundary.
C:H - After decap, ip6_protocol_deliver_rcu() does skb_network_header(skb)[nhoff] using a stale outer nhoff the attacker can push thousands of bytes past the inner skb, which is an out-of-bounds kernel read; the leaked byte is then used as nexthdr, exposing further slab contents via dispatch side effects.
I:H - Stale nhoff selects the inet6 protocol handler, type-confusing the inner packet into an attacker-influenced parser; IPv6 fragment reassembly also writes skb_network_header(skb)[nhoff], so the same attacker-controlled offset becomes an out-of-bounds write when the inner flow is fragmented.
A:H - KASAN reports slab-out-of-bounds in ip6_protocol_deliver_rcu() on this path; in production a large nhoff lands on unmapped memory and oopses/panics the kernel, and the packet can be repeated at line rate.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:N - End.DT6/End.DX6 run on the IPv6 receive path (ipv6_rthdr_rcv/lwtunnel_input/seg6_local_input_core) when a packet targets a configured local SID; a remote attacker who can route IPv6/SRv6 traffic to that SID on an SRv6 PE, VPN edge, or similar node triggers decap without local access.
AC:L - The attacker fully controls the outer Hop-by-Hop and Destination Options chain that inflates IP6CB nhoff and the inner packet length, so one crafted packet deterministically makes ip6_protocol_deliver_rcu() index past the skb head with no race or uncontrolled layout.
PR:N - SID processing runs in receive softirq with no authentication; a configured End.DT6/End.DX6 SID is an environmental precondition, not a credential the network attacker must hold (the same path is also reachable by an unprivileged userns user installing a SID).
UI:N - Exploitation requires only sending crafted IPv6 packets to the SID; no victim user or administrator action is needed beyond the pre-existing SRv6 configuration.
S:U - The stale-nhoff out-of-bounds access affects kernel memory on the receiving host only; it does not cross a VM, IOMMU, or sandbox security boundary.
C:H - After decap, ip6_protocol_deliver_rcu() does skb_network_header(skb)[nhoff] using a stale outer nhoff the attacker can push thousands of bytes past the inner skb, which is an out-of-bounds kernel read; the leaked byte is then used as nexthdr, exposing further slab contents via dispatch side effects.
I:H - Stale nhoff selects the inet6 protocol handler, type-confusing the inner packet into an attacker-influenced parser; IPv6 fragment reassembly also writes skb_network_header(skb)[nhoff], so the same attacker-controlled offset becomes an out-of-bounds write when the inner flow is fragmented.
A:H - KASAN reports slab-out-of-bounds in ip6_protocol_deliver_rcu() on this path; in production a large nhoff lands on unmapped memory and oopses/panics the kernel, and the packet can be repeated at line rate.
CVSS 3.1