CVE-2026-139312 bpf: Fix NULL deref in the sk_storage map iterator

Published Updated

CVSS score

Not scored

No CVSS score published yet
Exploited in the wild
Not known
Not in CISA's KEV catalogue
Exploit code
None known
No public exploit found
Fix
Available
See affected versions
Attack path
Not stated

What is CVE-2026-139312?

CVE-2026-139312 is a vulnerability in Linux, published on 30 Nov 2026.

Official description

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

bpf: Fix NULL deref in the sk_storage map iterator

bpf_sk_storage_map_seq_find_next() hands out an element only if its local_storage pointer is set. __bpf_sk_storage_map_seq_show() then reads the pointer a second time and dereferences it without a test.

Since bpf_local_storage_destroy() unlinks the elements with bpf_selem_unlink_nofail(), the pointer is reset to NULL when the socket which owns the element is destroyed, so it can change between the two reads. Reading the iterator while sockets with an element in the map are closed ends in a NULL pointer dereference. The sockets need not belong to the reader: where a program gives every new socket an element, an unprivileged user who opens and closes sockets is enough.

Skip such an element, as the TCP and UDP iterators skip a socket which has been unhashed.

Which versions are affected by CVE-2026-139312?

How do I fix CVE-2026-139312?

Upgrade to a fixed version.

Is CVE-2026-139312 being exploited?

There is no known exploitation of CVE-2026-139312 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2026-139312, GHSA-gqrv-hvxf-885x, UBUNTU-CVE-2026-139312.

Is CVE-2026-139312 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free