{"id":"CVE-2026-98037","state":"PUBLISHED","title":"bpf: Reject untrusted allocated-object pointers","description":"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 ]","publishedAt":"2026-09-25T10:23:51.126Z","updatedAt":"2026-10-19T09:12:42.963Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1b12171533a9bb23cf6fba7262b479028b65e1e8","status":"affected","lessThan":"092c2874dc1b2060fa77a465a971acd4fdf87683","versionType":"git"},{"version":"1b12171533a9bb23cf6fba7262b479028b65e1e8","status":"affected","lessThan":"135d542b97fa93e32c457d49d6e7b33ca7d05bae","versionType":"git"},{"version":"1b12171533a9bb23cf6fba7262b479028b65e1e8","status":"affected","lessThan":"6b1f786ad85a0b63393b76f5e634deab1a73198c","versionType":"git"},{"version":"1b12171533a9bb23cf6fba7262b479028b65e1e8","status":"affected","lessThan":"7441ee8276641bddaf1cba7bb75ef9c1458ceb3b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bpf_verifier.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.8","versionType":"semver"},{"version":"6.12.111","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.53","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.7","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bpf_verifier.h"]}],"references":["https://git.kernel.org/stable/c/092c2874dc1b2060fa77a465a971acd4fdf87683","https://git.kernel.org/stable/c/135d542b97fa93e32c457d49d6e7b33ca7d05bae","https://git.kernel.org/stable/c/6b1f786ad85a0b63393b76f5e634deab1a73198c","https://git.kernel.org/stable/c/7441ee8276641bddaf1cba7bb75ef9c1458ceb3b"],"weaknesses":[],"ingestedAt":"2026-10-29T20:13:43.249Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/98xxx/CVE-2026-98037.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-98037","state":"PUBLISHED","datePublished":"2026-09-25T10:23:51.126Z","dateUpdated":"2026-10-19T09:12:42.963Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:19:56.071Z"},"containers":{"cna":{"title":"bpf: Reject untrusted allocated-object pointers","descriptions":[{"lang":"en","value":"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 ]"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1b12171533a9bb23cf6fba7262b479028b65e1e8","status":"affected","lessThan":"092c2874dc1b2060fa77a465a971acd4fdf87683","versionType":"git"},{"version":"1b12171533a9bb23cf6fba7262b479028b65e1e8","status":"affected","lessThan":"135d542b97fa93e32c457d49d6e7b33ca7d05bae","versionType":"git"},{"version":"1b12171533a9bb23cf6fba7262b479028b65e1e8","status":"affected","lessThan":"6b1f786ad85a0b63393b76f5e634deab1a73198c","versionType":"git"},{"version":"1b12171533a9bb23cf6fba7262b479028b65e1e8","status":"affected","lessThan":"7441ee8276641bddaf1cba7bb75ef9c1458ceb3b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bpf_verifier.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.8","versionType":"semver"},{"version":"6.12.111","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.53","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.7","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bpf_verifier.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/092c2874dc1b2060fa77a465a971acd4fdf87683"},{"url":"https://git.kernel.org/stable/c/135d542b97fa93e32c457d49d6e7b33ca7d05bae"},{"url":"https://git.kernel.org/stable/c/6b1f786ad85a0b63393b76f5e634deab1a73198c"},{"url":"https://git.kernel.org/stable/c/7441ee8276641bddaf1cba7bb75ef9c1458ceb3b"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-19T09:12:42.963Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.12.111"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.18.53"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"7.2.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}