CVE-2026-98037: bpf: Reject untrusted allocated-object pointers

Published Sep 25, 2026
·
Updated

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

bpf: Reject untrusted allocated-object pointers

When the final RCU read-side critical section ends, a local kptr is demoted to PTRUNTRUSTED but retains MEMALLOC. The pointer may be NULL or may refer to an object whose lifetime is no longer protected.

typeisptrallocobj() nevertheless recognizes any PTRTOBTFID with MEMALLOC as a live allocated object. In particular, a refcount-only local kptr never carries NONOWNREF, so it still passes the bpfrefcountacquire() argument check after RCU protection ends. The kfunc can then dereference NULL or stale memory.

Make typeisptrallocobj() reject PTRUNTRUSTED pointers. Since typeisnonowningref() is based on the same predicate, graph kfunc arguments obey the same live-object requirement. Fault-protected reads of the demoted pointer remain valid: writes are already rejected, and read fixups use bpfmayfaultonderef() rather than this predicate.

[ kkd: Rewrote commit log ]

Affected Software

1 affected component
Linux Linux kernel

Event History

Sep 25, 2026
CVE Published
via MITRE·10:23 AM
Data Sourced
via MITRE·10:23 AM
Description

Frequently Asked Questions

1

What conditions are required to trigger the unsafe dereference?

A BPF program must use a local kptr after its final RCU read-side critical section ends, when the pointer has been demoted to PTR_UNTRUSTED but still retains MEM_ALLOC. It must then pass that pointer to bpf_refcount_acquire() or a graph kfunc argument path that incorrectly treats it as a live allocated object.

2

What can happen if the vulnerable pointer classification is reached?

The affected kfunc can dereference a NULL pointer or memory belonging to an object whose lifetime is no longer protected. The issue arises because the verifier recognizes the untrusted pointer as a live allocated object.

3

Are reads and writes through the demoted pointer handled the same way?

No. Writes through the demoted pointer are already rejected, while fault-protected reads remain valid because their fixups use bpf_may_fault_on_deref() rather than the allocated-object predicate.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203