CVE-2026-98047: bpf: Check ancestor frames for rbtree callbacks

Published Sep 25, 2026
·
Updated

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

bpf: Check ancestor frames for rbtree callbacks

bpfrbtreeadd() invokes its comparator while the caller holds the root lock. The native insertion code retains raw parent and link pointers across the callback, so the verifier prohibits unlocking, consuming tree nodes, or changing RCU state from that callback.

inrbtreelockrequiredcb() only checks the innermost verifier frame. Static subprogram calls are permitted while holding a spin lock, and such a call pushes a frame without incallbackfn set. Consequently, all callback restrictions disappear in the nested frame. The subprogram can unlock the tree, remove and drop the node being compared, then relock. Native insertion resumes with the stale parent pointer and links freed memory into the tree.

Walk all active frames for the rbtree callback instead. Benign static subprograms remain permitted, while callback restrictions follow execution into nested frames.

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 exploit this issue?

Exploitation requires a BPF rbtree comparator callback that makes a static subprogram call while the rbtree root lock is held. The nested subprogram must then unlock the tree, remove and release the node being compared, and relock the tree before native insertion resumes.

2

What is the consequence of a successful exploit?

The native rbtree insertion code can resume using stale parent and link pointers after the compared node has been freed. This can cause freed memory to be linked into the tree.

3

How does the fix prevent the issue?

The fix checks all active verifier frames for rbtree callback context rather than only the innermost frame. This preserves callback restrictions in nested static subprogram calls while continuing to allow benign static subprograms under the lock.

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