In the Linux kernel, the following vulnerability has been resolved:
bpf: Allow LPM map access from sleepable BPF programs
trielookupelem() annotates its rcudereferencecheck() walks with only rcureadlockbhheld(). Because rcudereferencecheck(p, c) resolves to "c || rcureadlock_held()", this passes for XDP/NAPI and classic RCU readers but fails for sleepable BPF programs, which enter via __bpfprogentersleepable() and hold only rcureadlocktrace().
trieupdateelem() and triedeleteelem() have the same problem in a different form: they walk the trie with plain rcudereference(), which asserts rcureadlockheld() unconditionally. Both are reachable from sleepable BPF programs via the bpfmapupdateelem / bpfmapdeleteelem helpers, and from the syscall path under classic rcureadlock(). In the writer paths the trie is actually protected by trie->lock (an rqspinlock taken across the walk); we never relied on the RCU read-side lock to keep nodes alive there.
A sleepable LSM hook that ends up touching an LPM trie therefore triggers lockdep on debug kernels:
============================= WARNING: suspicious RCU usage 7.1.0-... Tainted: G E
kernel/bpf/lpmtrie.c:249 suspicious rcudereferencecheck() usage! 1 lock held by nettests/540: #0: (rcutaskstracesrcustruct){....}-{0:0}, at: __bpfprogenter_sleepable+0x26/0x280 Call Trace: dumpstacklvl lockdeprcususpicious trielookupelem bpfprog...enforcesecuritysocketconnect bpftrampoline... securitysocketconnect _sysconnect dosyscall64
This is lockdep-only -- no UAF, since Tasks Trace RCU does serialize against the trie's reclaim path -- but it spams the console once per distinct callsite on every debug kernel running a sleepable BPF LSM that touches an LPM trie, which is increasingly common.
For the lookup path, switch the rcudereferencecheck() annotation from rcureadlockbhheld() to bpfrculock_held(), which accepts all three contexts (classic, BH, Tasks Trace). Other map types already follow this convention.
For trieupdateelem() and triedeleteelem(), annotate the walks as rcudereferenceprotected(*p, 1) -- matching triefree() in the same file -- since trie->lock is held across the walk. rqspinlock has no lockdepmap, so the predicate degenerates to '1' rather than lockdepisheld(&trie->lock); the protection is real but not machine-verifiable. triegetnextkey() also uses bare rcudereference() but is reachable only from the BPF syscall, which holds classic rcureadlock() before dispatching, so it is left untouched.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64352.json"
}