CVE-2026-139304: bpf: Check the maps that sleepable callbacks use
bpf: Check the maps that sleepable callbacks use
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1
Event History
Frequently Asked Questions
Which BPF deployments are exposed to this issue?
The issue affects BPF programs that use bpf_wq or bpf_task_work callbacks, because those callbacks run in sleepable context even when the originating program is non-sleepable. It also applies when such a callback accesses an inner map that was not directly bound to the program.
What map access pattern triggers the problem?
A sleepable callback must not use a map type that requires an RCU read-side critical section unless an RCU read lock is held. The described example is a bpf_wq callback from a tc program performing a lookup in a sockhash.
How can this be mitigated if the kernel update cannot be applied immediately?
Programs can continue using affected maps in a sleepable callback if they take the RCU read lock with bpf_rcu_read_lock(). A helper that invokes the callback may also provide the required protection, such as bpf_for_each_map_elem() for a hash map; disabling preemption or interrupts is not sufficient.
What evidence may indicate that a system is encountering this condition?
The described sockhash lookup case can reach a kernel warning at net/core/sock_map.c:903 in __sock_hash_lookup_elem. The warning occurs when the callback performs the map lookup without the required RCU read-side protection.