# CVE-2026-98038: bpf: Keep refcount_acquire nullable for borrowed RCU kptrs

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 13% of CVEs (2026-12-01)
- Published: 2026-09-25T10:23:51.746Z
- Modified: 2026-10-21T13:21:19.710Z
- Assigned by: Linux

## 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 ]

(As written by CVE List.)

## Affected

- Linux Linux: from 1b12171533a9bb23cf6fba7262b479028b65e1e8 before 85bfc8b6db43502444c428eaa2de20bdd2fb9064; from 1b12171533a9bb23cf6fba7262b479028b65e1e8 before 8d19e2cdfba9ba8c8eb6a459cd666bec00a1d2c6; from 1b12171533a9bb23cf6fba7262b479028b65e1e8 before 85074498228a2500ea8b8039c49cc1ab8ad5328f; from 1b12171533a9bb23cf6fba7262b479028b65e1e8 before dc36739e5cc9f60485418a910b42bc95339218d2; 6.8 (not affected: before 6.8; from 6.12.114 up to 6.12.*; from 6.18.57 up to 6.18.*; from 7.2.7 up to 7.2.*; from 7.3 up to *)

## References

- <https://git.kernel.org/stable/c/85bfc8b6db43502444c428eaa2de20bdd2fb9064>
- <https://git.kernel.org/stable/c/8d19e2cdfba9ba8c8eb6a459cd666bec00a1d2c6>
- <https://git.kernel.org/stable/c/85074498228a2500ea8b8039c49cc1ab8ad5328f>
- <https://git.kernel.org/stable/c/dc36739e5cc9f60485418a910b42bc95339218d2>

## Sources

- CVE List: [CVE-2026-98038](https://www.cve.org/CVERecord?id=CVE-2026-98038), CVE Terms of Use, modified 2026-10-21
- NVD: [CVE-2026-98038](https://nvd.nist.gov/vuln/detail/CVE-2026-98038), Public domain, modified 2026-10-21

---

Page: https://cve.day/CVE-2026-98038 · Whole record: https://cve.day/CVE-2026-98038.json · Rebuilt by cve.day 2026-11-25T22:59:41.032Z
