PT-2026-167235

CVE-2026-143377

·

Published

2026-12-03

·

Updated

2026-12-03

Description by

Score
N/A
Not available

No severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.

In the Linux kernel, the following vulnerability has been resolved:
bpf: Drop percpu counter from the htab element count
The element count of a large non-preallocated hash map is a percpu counter, whose slow path takes fbc->lock with raw spin lock irqsave(). That is not safe against BPF programs that run while the lock is held or contended: NMI programs and, as queued spin lock slowpath() calls trace contention end() with the lock already held, programs attached to the contention end tracepoint. If such a program updates the same map it spins on the lock its own CPU holds:
WARNING: possible recursive locking detected cend/250 is trying to acquire lock: (key#5){....}-{2:2}, at: raw spin lock irqsave+0x18/0x30 but task is already holding lock: (key#5){....}-{2:2}, at: raw spin lock irqsave+0x18/0x30 percpu counter add batch+0xd8/0x160 alloc htab elem+0x408/0x480 htab map update elem+0x1e8/0x6a0 bpf prog 7a29a1ae68aedf07 cend+0x14c/0x1f8 bpf trace contention end+0x14/0x20 queued spin lock slowpath+0x2e8/0x468 percpu counter add batch+0xd8/0x160 alloc htab elem+0x408/0x480 htab map update elem+0x1e8/0x6a0
is map full() is affected too, as percpu counter compare() falls back to percpu counter sum(), which takes the same lock.
map.elem count already is a lockless per-cpu count of the same elements. Make htab->count follow it in steps of PERCPU COUNTER BATCH and let is map full() sum elem count once count is within nr cpu ids * batch of max entries. Each cpu's elem count is ahead of count by less than the batch, so that is exact, in NMI as well.
Vendors
Affected products
Related identifiers
Found an issue in the description? Have something to add? Feel free to write us 👾