CVE-2026-139291

bpf: Don't take a dynptr argument for a local dynptr

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 take a dynptr argument for a local dynptr

A global function is verified on its own. A dynptr which it gets as an
argument is assumed to be of type BPF_DYNPTR_TYPE_LOCAL, but the callers
may pass one of any type, that of an skb for example.

The type decides whether a write through the dynptr invalidates packet
pointers, and whether a slice of it is invalidated together with them.
Inside of the function neither happens. It can take a packet pointer from
its context argument, or a slice from the dynptr, write through the dynptr
and go on using the pointer, although the write may have reallocated the
head of the skb.

Assume the type of an skb dynptr instead. Nothing becomes forbidden for the
dynptr itself, and a clone inherits the caution. The dynptr which the
callback of bpf_user_ringbuf_drain() gets is known to be local, and stays
so.

Analysis

AI-generated

Technical impact

The patched kernel bug occurs when a global BPF function assumes a dynamic pointer (dynptr) received as a parameter is of type BPF_DYNPTR_TYPE_LOCAL, yet callers may provide a dynptr of any type, such as one referencing an skb. Because the type drives whether write operations invalidate packet pointers, the function incorrectly allows writes through the dynptr without performing the needed invalidation steps. This flaw lets a malicious BPF program write to memory that it should not be able to, potentially leading to kernel memory corruption, a use‑after‑free scenario, and eventually arbitrary code execution with kernel privileges. The impact is sufficient to compromise the confidentiality, integrity, and availability of the entire system when exploited from a user‑space BPF program.

Affected Systems

All Linux kernel implementations are affected. The version information is not explicitly listed in the advisory; the issue applies to any kernel that has not yet incorporated the fix referenced by the commit URLs.

Risk and Exploitability

Although no EPSS score is available and the vulnerability is not listed in the CISA KEV catalog, the potential for remote code execution through user‑supplied BPF code is considered high. An attacker with the ability to load a BPF program into the kernel (e.g., via privileged user or compromised application) can exploit the flaw by passing a non‑local dynptr and performing a write that corrupts kernel memory. The lack of a documented workaround suggests that the attack vector is primarily through normal BPF program loading and execution.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a Linux kernel update that includes the fix (refer to the commit references provided).
  • If an immediate kernel update is not possible, restrict or disable the use of BPF programs that employ bpf_user_ringbuf_drain or any function that may sidestep the dynptr type check.
  • Verify that all custom or third‑party BPF programs validate dynptr types before use, ensuring they only pass pointers of type BPF_DYNPTR_TYPE_LOCAL to protected functions.

Generated by OpenCVE AI on November 30, 2026 at 21:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
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: Don't take a dynptr argument for a local dynptr A global function is verified on its own. A dynptr which it gets as an argument is assumed to be of type BPF_DYNPTR_TYPE_LOCAL, but the callers may pass one of any type, that of an skb for example. The type decides whether a write through the dynptr invalidates packet pointers, and whether a slice of it is invalidated together with them. Inside of the function neither happens. It can take a packet pointer from its context argument, or a slice from the dynptr, write through the dynptr and go on using the pointer, although the write may have reallocated the head of the skb. Assume the type of an skb dynptr instead. Nothing becomes forbidden for the dynptr itself, and a clone inherits the caution. The dynptr which the callback of bpf_user_ringbuf_drain() gets is known to be local, and stays so.
Title bpf: Don't take a dynptr argument for a local dynptr
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