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

bpf: Keep refcount_acquire nullable for borrowed RCU kptrs

bpf_refcount_acquire() is fallible for a borrowed reference because the
object may have reached a zero refcount. The verifier therefore keeps
KF_RET_NULL on the return value unless the argument is an owning reference.

An RCU-protected load of a local kptr is marked MEM_ALLOC, but it only
receives NON_OWN_REF when the pointee contains a graph node. A refcounted
object without a graph node consequently looks like an owning reference
even though the loaded register has no acquired reference state. If the
program drops the last real reference while remaining in the RCU critical
section, refcount_inc_not_zero() returns NULL while the verifier treats the
result as non-NULL.

Only classify the argument as owning when it is backed by a verifier-tracked
reference. This retains the non-NULL return for pointers from bpf_obj_new(),
bpf_kptr_xchg(), or an earlier successful acquisition, while requiring a
NULL check for borrowed RCU kptrs.

[ kkd: Rewrote commit log ]
Published: 2026-09-25
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Kernel Use‑After‑Free
Action: Update Kernel
AI Analysis

Impact

Based on the description, bpf_refcount_acquire() incorrectly interprets a borrowed RCU‑protected pointer as an owning reference, returning a non‑NULL value even when the reference count has reached zero. The mismatch suggests that a BPF program could mistakenly believe it holds a valid kernel object while the object might have already been freed, potentially leading to use‑after‑free scenario that could expose privileged data or compromise kernel integrity. The weakness is a NULL pointer dereference (CWE‑476).

Affected Systems

The vulnerability affects every Linux kernel build that predates the patch introducing the nullable refcount acquire behavior (git commit 85074498228a2500ea8b8039c49cc1ab8ad5328f). All vendors shipping unpatched kernels, irrespective of distribution, are exposed; specific distributions are not listed, so users should verify whether their kernel includes this commit.

Risk and Exploitability

The CVSS score of 5.5 reflects a moderate impact, and an EPSS score of less than 1% suggests a low probability of exploitation in the wild. The vulnerability is not included in the CISA KEV catalog. Based on the description, exploitation would require an attacker to load a malicious BPF program that performs reference‑counting logic, a capability typically reserved for privileged users. Thus, in environments that allow arbitrary user‑supplied BPF loading, a trusted adversary might potentially abuse the dangling pointer for privilege escalation or denial of service.

Generated by OpenCVE AI on September 30, 2026 at 14:28 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel version that includes the bpf_refcount_acquire nullable patch (git commit 85074498228a2500ea8b8039c49cc1ab8ad5328f).
  • If an immediate kernel upgrade is not feasible, review and modify custom BPF programs to avoid using borrowed RCU pointers or to add explicit NULL checks after bpf_refcount_acquire calls.
  • Restrict or disable the ability for untrusted users to load arbitrary BPF programs, ensuring that only privileged, verified code runs in the kernel.

Generated by OpenCVE AI on September 30, 2026 at 14:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 15 Oct 2026 13:30:00 +0000


Tue, 29 Sep 2026 13:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-476
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Low


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: Keep refcount_acquire nullable for borrowed RCU kptrs bpf_refcount_acquire() is fallible for a borrowed reference because the object may have reached a zero refcount. The verifier therefore keeps KF_RET_NULL on the return value unless the argument is an owning reference. An RCU-protected load of a local kptr is marked MEM_ALLOC, but it only receives NON_OWN_REF when the pointee contains a graph node. A refcounted object without a graph node consequently looks like an owning reference even though the loaded register has no acquired reference state. If the program drops the last real reference while remaining in the RCU critical section, refcount_inc_not_zero() returns NULL while the verifier treats the result as non-NULL. Only classify the argument as owning when it is backed by a verifier-tracked reference. This retains the non-NULL return for pointers from bpf_obj_new(), bpf_kptr_xchg(), or an earlier successful acquisition, while requiring a NULL check for borrowed RCU kptrs. [ kkd: Rewrote commit log ]
Title bpf: Keep refcount_acquire nullable for borrowed RCU kptrs
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-15T10:12:05.341Z

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

Link: CVE-2026-98038

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

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

Modified: 2026-10-15T11:18:10.260

Link: CVE-2026-98038

cve-icon Redhat

Severity : Low

Publid Date: 2026-09-25T00:00:00Z

Links: CVE-2026-98038 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-30T14:30:18Z

Weaknesses