CVE-2026-139314

bpf: Update the SRH state if End.B6 fails late

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

bpf: Update the SRH state if End.B6 fails late

For SEG6_LOCAL_ACTION_END_B6 and END_B6_ENCAP bpf_lwt_seg6_action() looks
for the SRH again only if bpf_push_seg6_encap() has succeeded. That
function pushes the new header, for which the head of the skb is
reallocated if it has not got the room, and then looks up the route to the
first segment. If there is none, it returns an error, and the pointer to
the SRH in seg6_bpf_srh_states still points into the old head, which has
been freed.

The program goes on behind the error. bpf_lwt_seg6_store_bytes() and
bpf_lwt_seg6_adjust_srh() read the SRH through that pointer.

Look for the SRH whatever bpf_push_seg6_encap() says.

Analysis

AI-generated

Technical impact

The Linux kernel contains a use‑after‑free bug in the BPF Segment‑Routing (SRH) handling code. When a bpf_lwt_seg6_action attempts to add a new header and the operation fails, the SRH pointer in seg6_bpf_srh_states still points to freed memory. Subsequent BPF helper calls read or write through that dangling pointer, which can corrupt kernel memory and potentially allow an attacker to execute arbitrary code with kernel privileges. This flaw is a classic use‑after‑free (CWE‑416) that can lead to privilege escalation to root.

Affected Systems

All Linux kernel releases that include the faulty bpf_lwt_seg6_action implementation are affected. The vendor is Linux and the affected product is the Linux kernel; no specific version range is listed. Any distribution that ships with the unpatched kernel is susceptible.

Risk and Exploitability

There is no public EPSS score and the vulnerability is not currently listed in the CISA KEV catalog. However, the flaw requires local or privileged access to load a crafted BPF program, which is feasible on many systems that allow untrusted users to create or modify BPF maps or programs. If an attacker can trigger the error path, the resulting memory corruption can be leveraged for remote code execution or denial‑of‑service. The potential impact is high, but the exploitation likelihood depends on the system’s BPF configuration and user privilege model.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest kernel patch that corrects the SRH pointer handling in bpf_lwt_seg6_action
  • Update your distribution to a kernel release that contains the patched code
  • If immediate patching is not possible, limit untrusted BPF program loading or disable the BPF SEG6 feature to prevent the error path from being exercised

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-825
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Update the SRH state if End.B6 fails late For SEG6_LOCAL_ACTION_END_B6 and END_B6_ENCAP bpf_lwt_seg6_action() looks for the SRH again only if bpf_push_seg6_encap() has succeeded. That function pushes the new header, for which the head of the skb is reallocated if it has not got the room, and then looks up the route to the first segment. If there is none, it returns an error, and the pointer to the SRH in seg6_bpf_srh_states still points into the old head, which has been freed. The program goes on behind the error. bpf_lwt_seg6_store_bytes() and bpf_lwt_seg6_adjust_srh() read the SRH through that pointer. Look for the SRH whatever bpf_push_seg6_encap() says.
Title bpf: Update the SRH state if End.B6 fails late
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
Nov 30, 2026, 1:33 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:33 PM