{"id":"CVE-2026-98037","summary":"bpf: Reject untrusted allocated-object pointers","details":"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 ]","modified":"2026-09-26T03:48:37.039090910Z","published":"2026-09-25T10:23:51.126Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98037.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/092c2874dc1b2060fa77a465a971acd4fdf87683"},{"type":"WEB","url":"https://git.kernel.org/stable/c/135d542b97fa93e32c457d49d6e7b33ca7d05bae"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6b1f786ad85a0b63393b76f5e634deab1a73198c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7441ee8276641bddaf1cba7bb75ef9c1458ceb3b"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98037.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98037"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"1b12171533a9bb23cf6fba7262b479028b65e1e8"},{"fixed":"092c2874dc1b2060fa77a465a971acd4fdf87683"},{"fixed":"135d542b97fa93e32c457d49d6e7b33ca7d05bae"},{"fixed":"6b1f786ad85a0b63393b76f5e634deab1a73198c"},{"fixed":"7441ee8276641bddaf1cba7bb75ef9c1458ceb3b"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98037.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.8.0"},{"fixed":"6.12.111"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.53"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.2.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98037.json"}}],"schema_version":"1.9.0"}