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

bpf: Bound ownership depth through local kptrs and graph roots

Program-allocated objects can own other local objects through referenced
kptrs. bpf_obj_free_fields() follows those pointers through
__bpf_obj_drop_impl() synchronously, before the object storage is freed
through RCU. A self-referential local kptr type therefore permits arbitrarily
deep object chains, and dropping the head can exhaust the kernel stack.
Long acyclic type chains have the same problem.

btf_check_and_fixup_fields() still assumes referenced kptrs only point to
kernel types and checks ownership through list and rbtree roots only. Its
existing rule is sufficient for graph-only cycles: the target of each graph
edge must contain a node, so every type in a cycle has both a root and a
node. The rule rejects such a type owning another root, breaking every
cycle. It also limits graph-only chains to three types, or two if the first
type contains a node, and conservatively rejects longer acyclic chains.
The missing local-kptr edges, rather than a missed graph-only cycle, are the
bug introduced by support for bpf_kptr_xchg() into local kptrs.

Replace that restriction with one bounded ownership walk covering graph
roots and local referenced kptrs. Run it after all BTF records have been
fixed up, reject cycles and paths deeper than eight record-bearing types,
and cache each type's suffix depth while checking it against the remaining
budget. This also permits the longer acyclic graph-only layouts rejected
by the old rule; update their existing BTF tests accordingly.

Keep the bound independent of MAX_CALL_FRAMES because recursive destruction
can run below a BPF call chain. A plain local pointee without special-field
metadata adds only a final non-recursing drop. Non-owning kptrs and
kernel-BTF kptrs do not recurse through local records and remain outside the
walk. Include local percpu-kptr edges too, although allocation of percpu
objects with special fields is currently forbidden, so that relaxing that
restriction cannot bypass the ownership bound.

btf_check_and_fixup_fields() continues to initialize graph_root.value_rec,
including for separately allocated map records. The ownership relationships
belong to immutable program BTF and only need validation at BTF load time.
Published: 2026-10-18
Score: n/a
EPSS: n/a
KEV: No
Impact: Uncontrolled Recursion leading to Stack Exhaustion
Action: Apply Patch
AI Analysis

Impact

In the Linux kernel, BPF objects may own other objects through kernel pointers. During deallocation the kernel follows these pointers recursively before freeing the object’s storage. A self‑referential pointer or an arbitrarily deep chain of such pointers can cause the kernel stack to overflow when the head object is dropped. The vulnerability allows an attacker to craft a BPF program that creates a chain of nested objects, potentially crashing the kernel and causing a denial‑of‑service. The weakness is an uncontrolled recursion flaw.

Affected Systems

The flaw exists in the Linux kernel; specific affected releases are not listed in the advisory, so any kernel build without the downstream commit that implements the ownership bound is potentially vulnerable. The vulnerability is tied to the bpf subsystem, particularly the handling of BTF records and local kernel pointers.

Risk and Exploitability

Because the flaw can cause a stack overflow during object cleanup, an attacker must be able to load malicious BPF code that establishes long, nested ownership chains. The code path is kernel‑space only, so the attack requires local execution privileges or the ability to influence BPF program loading. The EPSS score is not available, and the flaw is not yet listed in CISA KEV, but the CVSS implied severity would be high, given that a kernel crash can lead to privilege escalation or downtime. The likely attack vector is through an elevated user or compromised process that compiles and loads a malicious BPF program designed to trigger the recursive free. The skew exists in the absence of the updated stack‑bound logic, so patching is critical.

Generated by OpenCVE AI on October 18, 2026 at 22:41 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the kernel to a version that includes the ownership‑bound change disclosed in this advisory.
  • Restrict BPF program loading to trusted sources and apply kernel BPF permission checks to prevent untrusted code from creating deep object chains.
  • Monitor kernel logs and system stability for signs of BPF‑related crashes or stack overflows, and remediate by restarting affected services if necessary.

Generated by OpenCVE AI on October 18, 2026 at 22:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sun, 18 Oct 2026 23:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-674
CWE-917

Sun, 18 Oct 2026 15:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Bound ownership depth through local kptrs and graph roots Program-allocated objects can own other local objects through referenced kptrs. bpf_obj_free_fields() follows those pointers through __bpf_obj_drop_impl() synchronously, before the object storage is freed through RCU. A self-referential local kptr type therefore permits arbitrarily deep object chains, and dropping the head can exhaust the kernel stack. Long acyclic type chains have the same problem. btf_check_and_fixup_fields() still assumes referenced kptrs only point to kernel types and checks ownership through list and rbtree roots only. Its existing rule is sufficient for graph-only cycles: the target of each graph edge must contain a node, so every type in a cycle has both a root and a node. The rule rejects such a type owning another root, breaking every cycle. It also limits graph-only chains to three types, or two if the first type contains a node, and conservatively rejects longer acyclic chains. The missing local-kptr edges, rather than a missed graph-only cycle, are the bug introduced by support for bpf_kptr_xchg() into local kptrs. Replace that restriction with one bounded ownership walk covering graph roots and local referenced kptrs. Run it after all BTF records have been fixed up, reject cycles and paths deeper than eight record-bearing types, and cache each type's suffix depth while checking it against the remaining budget. This also permits the longer acyclic graph-only layouts rejected by the old rule; update their existing BTF tests accordingly. Keep the bound independent of MAX_CALL_FRAMES because recursive destruction can run below a BPF call chain. A plain local pointee without special-field metadata adds only a final non-recursing drop. Non-owning kptrs and kernel-BTF kptrs do not recurse through local records and remain outside the walk. Include local percpu-kptr edges too, although allocation of percpu objects with special fields is currently forbidden, so that relaxing that restriction cannot bypass the ownership bound. btf_check_and_fixup_fields() continues to initialize graph_root.value_rec, including for separately allocated map records. The ownership relationships belong to immutable program BTF and only need validation at BTF load time.
Title bpf: Bound ownership depth through local kptrs and graph roots
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-10-18T15:19:33.624Z

Reserved: 2026-09-25T10:25:14.360Z

Link: CVE-2026-98613

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-18T16:17:14.150

Modified: 2026-10-18T16:17:14.150

Link: CVE-2026-98613

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-18T22:45:04Z

Weaknesses
  • CWE-674

    Uncontrolled Recursion

  • CWE-917

    Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')