CVE-2026-139297

bpf: Don't let an extension reach further into the context than its target

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

bpf: Don't let an extension reach further into the context than its target

How large the context of a raw tracepoint, tracepoint or syscall program
is depends on what the program is attached to, or is run with.
bpf_probe_register(), perf_event_set_bpf_prog() and the test runs compare
that with max_ctx_offset of the program.

An extension of the program, or of one of its global functions, gets the
same context. How far it reaches is noted in its own max_ctx_offset, which
nobody looks at. On a tracepoint with one argument it reads the stack
behind the arguments, in a test run the memory behind the context, or
from NULL if there is none:

BUG: KASAN: stack-out-of-bounds in bpf_prog_954b5d2051843629_ts28_ext_far+0x7e/0x113
Read of size 8 at addr ffffc90000def7b8 by task ts28/104

BUG: KASAN: slab-out-of-bounds in bpf_prog_954b5d2051843629_ts28_ext_far+0x7e/0x113
Read of size 8 at addr ffff88810712c3e8 by task ts28/104

Refuse to attach an extension that reaches further than the program which
it extends. A program that leaves the context to its extensions has to
touch as much of it as they do.

Analysis

AI-generated

Technical impact

The flaw lies in the Linux kernel’s handling of BPF program extensions. An extension inherits the same execution context as the program it is attached to, but its own maximum context offset is not checked. When an extension tries to access memory beyond its intended context – for example, reading past the stack on a tracepoint with one argument or past the slab when none exists – the kernel triggers a KASAN out‑of‑bounds read. This can lead to kernel memory corruption, potential information leakage, or a crash, effectively denying service or exposing sensitive data.

Affected Systems

Affected systems comprise all Linux kernel instances that have not incorporated the fix for this BPF context boundary check. The issue is not tied to a specific kernel version in the CVE data, so any unpatched kernel may be vulnerable. Vendors listed include Linux:Linux, and the fix is expected in future kernel releases following the commits referenced in the CVE description.

Risk and Exploitability

The risk profile is moderate to high; the CVSS score is not supplied, but a KASAN fault indicates a severe fault. Because an attacker must load a BPF program with an extension that exceeds its context boundary, the attack vector is local or requires elevated privileges to execute a malicious BPF program. EPSS data is unavailable, and the vulnerability is not currently listed in the CISA KEV catalog, suggesting limited widespread exploitation and a need for patching as soon as possible.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the patch for the BPF context boundary check (commit 782fa09837c27fa337fd2ce9dc0702bb6f15af6a or a later stable release).
  • If an upgrade cannot be performed immediately, avoid deploying BPF programs that feature extensions with a maximum context offset larger than the base program’s offset; validate extensions before attachment.
  • Continuously monitor kernel logs (e.g., dmesg) for KASAN messages indicating out‑of‑bounds BPF accesses; investigate and remediate any such incidents promptly.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-119
CWE-125
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Don't let an extension reach further into the context than its target How large the context of a raw tracepoint, tracepoint or syscall program is depends on what the program is attached to, or is run with. bpf_probe_register(), perf_event_set_bpf_prog() and the test runs compare that with max_ctx_offset of the program. An extension of the program, or of one of its global functions, gets the same context. How far it reaches is noted in its own max_ctx_offset, which nobody looks at. On a tracepoint with one argument it reads the stack behind the arguments, in a test run the memory behind the context, or from NULL if there is none: BUG: KASAN: stack-out-of-bounds in bpf_prog_954b5d2051843629_ts28_ext_far+0x7e/0x113 Read of size 8 at addr ffffc90000def7b8 by task ts28/104 BUG: KASAN: slab-out-of-bounds in bpf_prog_954b5d2051843629_ts28_ext_far+0x7e/0x113 Read of size 8 at addr ffff88810712c3e8 by task ts28/104 Refuse to attach an extension that reaches further than the program which it extends. A program that leaves the context to its extensions has to touch as much of it as they do.
Title bpf: Don't let an extension reach further into the context than its target
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-125

    Out-of-bounds Read

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