CVE-2026-139317: bpf: Don't saturate owner_refcnt on the last unpin

Published Nov 30, 2026
·
Updated

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

bpf: Don't saturate ownerrefcnt on the last unpin

bpflocalstoragemapfree() pins the owner with refcountincnotzero() while it uncharges an element. The pin counts when bpflocalstoragedestroy() could not get localstorage->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 refcountdec() 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 rcureadlock().

Drop the pin with refcountdecandtest().

Affected Software

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:33 PM
Data Sourced
via MITRE·01:33 PM
Description
Data Sourced
via NVD·02:18 PM
Description

Frequently Asked Questions

1

What condition is required to trigger the issue?

The issue requires bpf_local_storage_map_free() to pin an owner while uncharging an element after bpf_local_storage_destroy() could not acquire local_storage->lock. In that path, the pin is the last reference and a refcount decrement can saturate the count.

2

What is the operational impact?

The destroy path can spin indefinitely waiting for the owner reference count to reach zero. The spin occurs under rcu_read_lock(), potentially leaving the affected kernel execution path stuck.

3

How can the corrected behavior be identified in a patch?

The fix drops the temporary pin with refcount_dec_and_test() rather than refcount_dec(). The provided stable kernel references identify commits containing the correction.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203