Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: Check ancestor frames for rbtree callbacks

bpf_rbtree_add() invokes its comparator while the caller holds the root
lock. The native insertion code retains raw parent and link pointers across
the callback, so the verifier prohibits unlocking, consuming tree nodes,
or changing RCU state from that callback.

in_rbtree_lock_required_cb() only checks the innermost verifier frame.
Static subprogram calls are permitted while holding a spin lock, and such a
call pushes a frame without in_callback_fn set. Consequently, all callback
restrictions disappear in the nested frame. The subprogram can unlock the
tree, remove and drop the node being compared, then relock. Native insertion
resumes with the stale parent pointer and links freed memory into the tree.

Walk all active frames for the rbtree callback instead. Benign static
subprograms remain permitted, while callback restrictions follow execution
into nested frames.
Published: 2026-09-25
Score: n/a
EPSS: n/a
KEV: No
Impact: Kernel memory corruption due to a use‑after‑free
Action: Apply Patch
AI Analysis

Impact

A flaw in the Linux kernel’s BPF rbtree handling allows the comparator function to be executed while the tree’s root lock is held. The obstacle is that a static subprogram called from the comparator can unlock the tree, remove the node being compared, free its memory, and then re‑lock the tree. When the original insertion routine resumes, it operates on a stale parent pointer and links freed memory back into the tree. This re‑entrancy can corrupt kernel memory and, in the context of BPF program execution, may lead to code execution or other severe consequences. The text explicitly describes a use‑after‑free and a resulting memory corruption, but it does not confirm that arbitrary code execution is guaranteed, only that it "could" happen if the attacker takes advantage of the bug.

Affected Systems

All Linux kernel builds that include the unpatched bpf_rbtree_add implementation are potentially affected. The specific range of kernel versions is not listed; any kernel that contains the vulnerable code before the accepted patch could be impacted. As the bug exists in the core BPF subsystem, it applies generally across distributions that ship the affected kernel source.

Risk and Exploitability

The CVSS score is not available and the EPSS score is not provided, which does not indicate a low risk. The vulnerability is not listed in the CISA KEV catalog, so it has not yet been seen as a widely exploited case. However, because the flaw is a use‑after‑free that occurs inside privileged kernel code, it has a high potential impact. The likely attack vector is the injection of a malicious BPF program; based on the description, it is inferred that an attacker would need privileged access to load such a program. If exploitation occurs, the kernel could be corrupted, leading to privilege escalation or denial of service.

Generated by OpenCVE AI on September 25, 2026 at 17:01 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a release containing the commit that fixes the BPF rbtree lock check.
  • If an immediate kernel update is unavailable, restrict BPF program loading to privileged users only or enforce strict BPF verification policies.
  • If BPF functionality is not required on the host, disable BPF support in the kernel configuration to remove the vulnerable code path.

Generated by OpenCVE AI on September 25, 2026 at 17:01 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 25 Sep 2026 17:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Fri, 25 Sep 2026 10:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Check ancestor frames for rbtree callbacks bpf_rbtree_add() invokes its comparator while the caller holds the root lock. The native insertion code retains raw parent and link pointers across the callback, so the verifier prohibits unlocking, consuming tree nodes, or changing RCU state from that callback. in_rbtree_lock_required_cb() only checks the innermost verifier frame. Static subprogram calls are permitted while holding a spin lock, and such a call pushes a frame without in_callback_fn set. Consequently, all callback restrictions disappear in the nested frame. The subprogram can unlock the tree, remove and drop the node being compared, then relock. Native insertion resumes with the stale parent pointer and links freed memory into the tree. Walk all active frames for the rbtree callback instead. Benign static subprograms remain permitted, while callback restrictions follow execution into nested frames.
Title bpf: Check ancestor frames for rbtree callbacks
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-25T10:23:57.347Z

Reserved: 2026-09-25T10:19:56.072Z

Link: CVE-2026-98047

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-25T11:17:33.553

Modified: 2026-09-25T11:17:33.553

Link: CVE-2026-98047

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-25T17:15:15Z

Weaknesses