CVE-2026-139317

Source
https://cve.org/CVERecord?id=CVE-2026-139317
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139317.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-139317
Downstream
Published
2026-11-30T13:33:38Z
Modified
2026-12-01T21:02:37Z
Summary
bpf: Don't saturate owner_refcnt on the last unpin
Details

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().

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139317.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
5d800f87d0a5ea1b156c47a4b9fd128479335153
Fixed
f2c55a9b936da22525988d9040f528d6feb78359
Fixed
30a140c9d479974021f5c3eecb64415c96419c3f

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139317.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
7.0.0
Fixed
7.3.6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139317.json"