Skip to main content
Vulnerability Database/CVE-2026-98613

CVE-2026-98613: Linux Kernel BPF Privilege Escalation

CVE-2026-98613 is a privilege escalation flaw in the Linux kernel BPF subsystem involving unbounded ownership depth through local kptrs and graph roots, which can exhaust kernel stack. This article covers technical details, impact, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98613 Overview

CVE-2026-98613 is a Linux kernel vulnerability in the Berkeley Packet Filter (BPF) subsystem. The flaw affects how program-allocated objects own other local objects through referenced kernel pointers (kptrs). A self-referential local kptr type permits arbitrarily deep object chains, and dropping the head can exhaust the kernel stack. Long acyclic type chains exhibit the same behavior. The issue was introduced by support for bpf_kptr_xchg() into local kptrs, which btf_check_and_fixup_fields() did not account for when validating ownership through list and rbtree roots only.

Critical Impact

A local user with BPF program load privileges can trigger recursive destruction through bpf_obj_free_fields() and exhaust the kernel stack, resulting in denial of service.

Affected Products

  • Linux Kernel (BPF subsystem)
  • Distributions shipping affected kernel versions with BPF local kptr support
  • Systems permitting unprivileged or privileged BPF program loading

Discovery Timeline

  • 2026-10-18 - CVE-2026-98613 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98613

Vulnerability Analysis

The vulnerability resides in the BPF object ownership model. Program-allocated objects can own other local objects through referenced kptrs. When an object is dropped, bpf_obj_free_fields() follows those pointers through __bpf_obj_drop_impl() synchronously, before the object storage is freed through Read-Copy-Update (RCU).

This synchronous, recursive destruction has no inherent depth limit. A self-referential local kptr type permits arbitrarily deep object chains. Dropping the head of such a chain recurses through every linked object on the kernel stack, which can exhaust the stack entirely. Long acyclic type chains produce the same outcome.

The BTF validator btf_check_and_fixup_fields() previously assumed referenced kptrs pointed only to kernel types. Its existing rule validated ownership through list and rbtree graph roots, breaking graph-only cycles by requiring each cycle member to contain both a root and a node. That rule failed to cover local-kptr edges introduced alongside bpf_kptr_xchg() support for local kptrs.

Root Cause

The root cause is missing validation of local-kptr ownership edges in btf_check_and_fixup_fields(). The existing graph-only ownership check did not model local referenced kptr edges as part of the ownership graph. Cycles and deep acyclic chains built through local kptrs bypassed the check, enabling unbounded recursive destruction [CWE-674: Uncontrolled Recursion].

Attack Vector

A local actor able to load a BPF program defines a BTF type that owns itself (or a long chain of other types) through a referenced local kptr. The verifier accepts the type because the pre-patch ownership check does not reject local-kptr cycles or deep chains. At runtime, releasing the root object invokes bpf_obj_free_fields(), which recursively calls __bpf_obj_drop_impl() through every linked pointee on the kernel stack. Deep recursion exhausts the stack and crashes the kernel. See the upstream fix in Kernel Git Commit 4105870 and the related commits 92aa0502, 9c11e54, and bfc888f for implementation details.

Detection Methods for CVE-2026-98613

Indicators of Compromise

  • Kernel panics or stack overflow oops traces originating in bpf_obj_free_fields or __bpf_obj_drop_impl call frames.
  • Repeated BPF program load attempts from non-root users followed by abrupt kernel instability.
  • Audit records showing BTF types with self-referential or deeply chained local kptr fields loaded shortly before a crash.

Detection Strategies

  • Monitor kernel.oops and kernel.panic events and correlate with recent bpf() syscall activity from non-privileged accounts.
  • Enable CONFIG_BPF_SYSCALL auditing and track BPF_PROG_LOAD and BPF_BTF_LOAD operations to identify suspicious BTF definitions.
  • Review BTF payloads for recursive type definitions and long chains of referenced local kptr fields.

Monitoring Recommendations

  • Centralize kernel logs and BPF audit events in a SIEM for correlation across hosts.
  • Alert on recurring stack overflow traces inside the BPF subsystem across the fleet.
  • Track which workloads require CAP_BPF or CAP_SYS_ADMIN and flag deviations from the baseline.

How to Mitigate CVE-2026-98613

Immediate Actions Required

  • Apply the upstream kernel patches referenced below as soon as vendor builds are available for your distribution.
  • Restrict CAP_BPF and CAP_SYS_ADMIN to trusted service accounts and remove unneeded BPF privileges from workloads.
  • Set kernel.unprivileged_bpf_disabled=1 on hosts that do not require unprivileged BPF usage.

Patch Information

The fix replaces the previous graph-only ownership restriction with a bounded ownership walk covering both graph roots and local referenced kptrs. The walk runs after all BTF records are fixed up, rejects cycles, and caps ownership paths at eight record-bearing types while caching each type's suffix depth. The patches are available in Kernel Git Commit 4105870, Kernel Git Commit 92aa0502, Kernel Git Commit 9c11e54, and Kernel Git Commit bfc888f.

Workarounds

  • Disable unprivileged BPF by setting kernel.unprivileged_bpf_disabled=1 through sysctl until patched kernels are deployed.
  • Enforce Linux Security Module policies (SELinux, AppArmor) that deny the bpf syscall to untrusted processes.
  • Remove CAP_BPF from container runtimes and restrict BPF program loading to a reviewed allowlist of workloads.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.