CVE-2026-143377

Not scored yetLast modified Dec 3, 2026

Description

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.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Dec 3, 2026
Last modified
Dec 3, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-143378In the Linux kernel, the following vulnerability has been resolved: btrfs: zoned: fix double free of bitmaps on clone failure btrfs_clone_CVE-2026-143379In the Linux kernel, the following vulnerability has been resolved: btrfs: scrub: fix lost wakeup and hang when cancelling a scrub that is CVE-2026-143380In the Linux kernel, the following vulnerability has been resolved: btrfs: scrub: fix lost error return value when scrubbing raid56 parity CVE-2026-143381In the Linux kernel, the following vulnerability has been resolved: x86/ftrace: Mark jmp mode by clearing bit 63 of trampoline address SinCVE-2026-143382In the Linux kernel, the following vulnerability has been resolved: seg6: fix transport header for inner IPv4 with IP options The End.DT4,CVE-2026-143383In the Linux kernel, the following vulnerability has been resolved: wifi: ath12k: set MSDU payload correctly ath12k_dp_mon_rx_merg_msdus()CVE-2026-143384In the Linux kernel, the following vulnerability has been resolved: wifi: ath12k: fix IRQ disable imbalance in AHB ext interrupt handler OCVE-2026-143385In the Linux kernel, the following vulnerability has been resolved: 9p: fall back to the normal open path for non-regular files v9fs_vfs_aCVE-2026-143386In the Linux kernel, the following vulnerability has been resolved: scsi: core: Balance the pseudo target reap reference With memory allocCVE-2026-143387In the Linux kernel, the following vulnerability has been resolved: scsi: scsi_debug: Drain target cleanup before module exit Target destrCVE-2026-143388In the Linux kernel, the following vulnerability has been resolved: dma-buf: Restore the scatterlist entry count before freeing dma_buf_phCVE-2026-143389In the Linux kernel, the following vulnerability has been resolved: ntfs: Fix error handling in __ntfs_create() In __ntfs_create(), if ntf
CVE-2026-143377: Unscored | Vulnix