{"id":"CVE-2026-98037","aliases":["CVE-2026-98037"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Reject untrusted allocated-object pointers","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Reject untrusted allocated-object pointers\n\nWhen the final RCU read-side critical section ends, a local kptr is demoted\nto PTR_UNTRUSTED but retains MEM_ALLOC. The pointer may be NULL or may refer\nto an object whose lifetime is no longer protected.\n\ntype_is_ptr_alloc_obj() nevertheless recognizes any PTR_TO_BTF_ID with\nMEM_ALLOC as a live allocated object. In particular, a refcount-only local\nkptr never carries NON_OWN_REF, so it still passes the\nbpf_refcount_acquire() argument check after RCU protection ends. The kfunc\ncan then dereference NULL or stale memory.\n\nMake type_is_ptr_alloc_obj() reject PTR_UNTRUSTED pointers. Since\ntype_is_non_owning_ref() is based on the same predicate, graph kfunc\narguments obey the same live-object requirement. Fault-protected reads of\nthe demoted pointer remain valid: writes are already rejected, and read\nfixups use bpf_may_fault_on_deref() rather than this predicate.\n\n[ kkd: Rewrote commit log ]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Reject untrusted allocated-object pointers\n\nWhen the final RCU read-side critical section ends, a local kptr is demoted\nto PTR_UNTRUSTED but retains MEM_ALLOC. The pointer may be NULL or may refer\nto an object whose lifetime is no longer protected.\n\ntype_is_ptr_alloc_obj() nevertheless recognizes any PTR_TO_BTF_ID with\nMEM_ALLOC as a live allocated object. In particular, a refcount-only local\nkptr never carries NON_OWN_REF, so it still passes the\nbpf_refcount_acquire() argument check after RCU protection ends. The kfunc\ncan then dereference NULL or stale memory.\n\nMake type_is_ptr_alloc_obj() reject PTR_UNTRUSTED pointers. Since\ntype_is_non_owning_ref() is based on the same predicate, graph kfunc\narguments obey the same live-object requirement. Fault-protected reads of\nthe demoted pointer remain valid: writes are already rejected, and read\nfixups use bpf_may_fault_on_deref() rather than this predicate.\n\n[ kkd: Rewrote commit log ]","source":"cvelist"}],"published":"2026-09-25T10:23:51.126Z","modified":"2026-10-19T10:17:57.647Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"1b12171533a9bb23cf6fba7262b479028b65e1e8","fixed":"092c2874dc1b2060fa77a465a971acd4fdf87683","status":"affected"},{"type":"git","introduced":"1b12171533a9bb23cf6fba7262b479028b65e1e8","fixed":"135d542b97fa93e32c457d49d6e7b33ca7d05bae","status":"affected"},{"type":"git","introduced":"1b12171533a9bb23cf6fba7262b479028b65e1e8","fixed":"6b1f786ad85a0b63393b76f5e634deab1a73198c","status":"affected"},{"type":"git","introduced":"1b12171533a9bb23cf6fba7262b479028b65e1e8","fixed":"7441ee8276641bddaf1cba7bb75ef9c1458ceb3b","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.8","status":"unaffected"},{"type":"semver","introduced":"6.12.111","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.53","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.2.7","lastAffected":"7.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/092c2874dc1b2060fa77a465a971acd4fdf87683","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/135d542b97fa93e32c457d49d6e7b33ca7d05bae","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6b1f786ad85a0b63393b76f5e634deab1a73198c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7441ee8276641bddaf1cba7bb75ef9c1458ceb3b","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-98037","url":"https://www.cve.org/CVERecord?id=CVE-2026-98037","licence":"CVE Terms of Use","modified":"2026-10-19T09:12:42.963Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-98037","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98037","licence":"Public domain","modified":"2026-10-19T10:17:57.647Z"}],"updatedAt":"2026-11-25T22:59:41.031Z","epss":{"score":0.00201,"percentile":0.1049,"date":"2026-12-01T12:00:22.000Z"}}