CVE-2026-139316

bpf: Validate the SRH which End.DT6 uncovers in End.BPF

Published Nov 30, 2026 CVSS 3.1 · 8.1 High EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: Validate the SRH which End.DT6 uncovers in End.BPF

input_action_end_bpf() validates the SRH of a packet and pulls it into the
head before the program runs. If the program decapsulates the packet with
bpf_lwt_seg6_action(SEG6_LOCAL_ACTION_END_DT6), bpf_update_srh_state()
looks for a routing header in the inner packet and takes it for the new
SRH as it is.

Nobody has looked at that header, and whoever has sent the packet has
written it. ipv6_find_hdr() finds it in a fragment of the skb as well, but
hdrlen is then read at that offset from skb->data, past the end of the
head. The header need not be an SRH, and its hdrlen need not fit into the
packet, but it is marked as valid, and bpf_lwt_seg6_adjust_srh() and
bpf_lwt_seg6_store_bytes() check their offsets against it.

A program which then adds a TLV at the end of the SRH, where hdrlen has it,
makes bpf_lwt_seg6_adjust_srh() move and write memory behind the head of
the skb, as far as the sender likes within the 2 KB that hdrlen can say:

BUG: KASAN: slab-out-of-bounds in bpf_skb_net_hdr_push+0x185/0x240
Read of size 2088 at addr ffff888107d6f09e by task srh/102
BUG: KASAN: slab-out-of-bounds in bpf_skb_net_hdr_push+0x1b5/0x240
Write of size 8 at addr ffff888107d6f8be by task srh/102

Use seg6_get_srh(), which pulls and validates the header. Without a valid
SRH the state says that there is none, and the packet goes its way as
before. The pull can move the head, so compute the data pointers behind
it.

Analysis

AI-generated

Technical impact

The vulnerability arises from the bpf input_action_end_bpf() function incorrectly handling the Segment Routing Header (SRH) in packets processed by the BPF LWT SEG6 END_DT6 action. The code pulls the SRH into the packet head without fully validating its length and content, allowing an attacker to craft a packet where hdrlen points to arbitrary data. When the kernel later processes this header, memory reads and writes occur outside the allocated buffer, resulting in out‑of‑bounds memory corruption. This can lead to arbitrary kernel read/write, enabling privilege escalation or remote code execution on the host that processes the packet.

Affected Systems

Affected systems are Linux kernel implementations. All kernel versions lacking the validation patch for the SRH handling in the BPF LWT SEG6 END_DT6 action are potentially vulnerable. No specific version numbers are listed; therefore any kernel that has not incorporated the commit that adds SRH validation is impacted.

Risk and Exploitability

The vulnerability can be triggered by a crafted IPv6 packet sent over the network to a host running the susceptible kernel. An attacker with the ability to send such packets could exploit the out‑of‑bounds memory corruption to gain kernel‑level privileges. Although no Formal EPSS score is available, the lack of a published KEV listing suggests it is not yet widely exploited, yet the high potential impact warrants mitigation. The CVSS score is not provided in the data, but the nature of the bug implies a high severity. The attack vector is inferred to be remote over the network via a malicious IPv6 packet.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to the latest stable release that includes the SRH validation commit (referenced in the provided kernel commits).
  • If an immediate kernel update is not feasible, disable the BPF LWT SEG6 END_DT6 action by removing the associated BPF programs or adjusting kernel configuration to prevent its use.
  • As a temporary network‑based workaround, configure firewall or traffic control to drop IPv6 packets that carry SRH segments or restrict SRH usage to trusted sources only.

Generated by OpenCVE AI on December 1, 2026 at 07:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-125
CWE-787
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Validate the SRH which End.DT6 uncovers in End.BPF input_action_end_bpf() validates the SRH of a packet and pulls it into the head before the program runs. If the program decapsulates the packet with bpf_lwt_seg6_action(SEG6_LOCAL_ACTION_END_DT6), bpf_update_srh_state() looks for a routing header in the inner packet and takes it for the new SRH as it is. Nobody has looked at that header, and whoever has sent the packet has written it. ipv6_find_hdr() finds it in a fragment of the skb as well, but hdrlen is then read at that offset from skb->data, past the end of the head. The header need not be an SRH, and its hdrlen need not fit into the packet, but it is marked as valid, and bpf_lwt_seg6_adjust_srh() and bpf_lwt_seg6_store_bytes() check their offsets against it. A program which then adds a TLV at the end of the SRH, where hdrlen has it, makes bpf_lwt_seg6_adjust_srh() move and write memory behind the head of the skb, as far as the sender likes within the 2 KB that hdrlen can say: BUG: KASAN: slab-out-of-bounds in bpf_skb_net_hdr_push+0x185/0x240 Read of size 2088 at addr ffff888107d6f09e by task srh/102 BUG: KASAN: slab-out-of-bounds in bpf_skb_net_hdr_push+0x1b5/0x240 Write of size 8 at addr ffff888107d6f8be by task srh/102 Use seg6_get_srh(), which pulls and validates the header. Without a valid SRH the state says that there is none, and the packet goes its way as before. The pull can move the head, so compute the data pointers behind it.
Title bpf: Validate the SRH which End.DT6 uncovers in End.BPF
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Dec 1, 2026, 5:42 AM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Dec 1, 2026, 6:17 AM