CVE-2026-64352

Source
https://cve.org/CVERecord?id=CVE-2026-64352
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64352.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-64352
Downstream
Published
2026-07-25T08:50:11.522Z
Modified
2026-07-27T04:03:21.825848551Z
Summary
bpf: Allow LPM map access from sleepable BPF programs
Details

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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64352.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
694cea395fded425008e93cd90cfdf7a451674af
Fixed
f0967d4f1ba4323a3cb7dc8fdba74dd3a8caaf04
Fixed
304ca50582f0c047370f85e13caec456f78c9fcc
Fixed
ec662a8b2cde01e76b37ccd4b992d0342299e69c
Fixed
9bfdf4b81b0e56d47bc6c46c34a46638be716695
Fixed
57454944737f3ad9a8703aecbbb79713b513a94b
Fixed
bd6ad9a6b30498d845413e863fb95c6fab3babe3
Fixed
2f884d371fafea137afea504d49ee4a7c8d7985b

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64352.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.14.0
Fixed
5.15.212
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.178
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.145
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.97
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.40
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.1.4

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64352.json"