bpf: Don't saturate owner_refcnt on the last unpin

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Nov 30, 2026

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

bpf: Don't saturate owner_refcnt on the last unpin

bpf_local_storage_map_free() pins the owner with refcount_inc_not_zero() while it uncharges an element. The pin counts when bpf_local_storage_destroy() could not get local_storage->lock: destroy() then goes on, drops the owner's reference and spins until the count is zero. So the pin is the last reference whenever it is needed, and refcount_dec() takes that for a bug: it warns "decrement hit 0; leaking memory" and saturates the count. Unless destroy() happens to read the count between the two stores it spins for ever, under rcu_read_lock().

Drop the pin with refcount_dec_and_test().

ProductVersions
Linux Linux5d800f87d0a5ea1b156c47a4b9fd128479335153 to before f2c55a9b936da22525988d9040f528d6feb78359 Affected5d800f87d0a5ea1b156c47a4b9fd128479335153 to before 30a140c9d479974021f5c3eecb64415c96419c3f Affected
Linux Linux7.0 Affectedbefore 7.0 Not Affected7.3.6 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.