Missing socket reference in Linux kernel sk_storage map iterator
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from CNA.
Summary
The Linux kernel from 5.10 passes sockets from the sk_storage map iterator to BPF programs without holding a reference. A socket being freed on another CPU can therefore still be used by the program and by helpers such as bpf_sk_storage_get(). Reading the iterator while sockets with elements in the map are closed can trigger this.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
Description from the CNA
In the Linux kernel, the following vulnerability has been resolved: bpf: Hold the socket in the sk_storage map iterator The iterator over a sk_storage map passes the owner of an element to its program as ctx->sk, without a reference. All that it holds is the RCU read lock, which keeps the element and the storage, not the socket. An element is unlinked by bpf_sk_storage_free(), which __sk_destruct() calls right before it frees the socket. That is no better for a socket with SOCK_RCU_FREE: the grace period comes in front of __sk_destruct(), so a reader which starts behind call_rcu() still finds the element. The program and the helpers it hands ctx->sk to, such as bpf_sk_storage_get() or bpf_sk_storage_delete(), use a socket which is being freed on another CPU. It takes nothing but reading the iterator while sockets with an element in the map are closed, by whomever. Take a reference for the time of the program, and skip the element if there is none to be had. To look at the owner at all, do what bpf_selem_unlink_nofail() does for bpf_local_storage_map_free(): as long as the element is linked under the lock of the storage, bpf_local_storage_destroy() has not got past it, unless it has given up on the lock, and then it waits for owner_refcnt. The last reference may now be dropped by the iterator. The end of a socket may want process context: rfcomm_sock_destruct() takes a mutex. So only drop the reference under RCU, and free a socket whose last one it was when the RCU read lock has been released, which is at the end of a bucket and of every read() at the latest.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
The fixed Linux kernel versions are 7.3.6 and 7.4-rc1.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
- Fix · CNA Linux (Linux) Fixed in 7.3.6, 7.4-rc1
Timeline
- 2026-11-30 Threatist record created from CVE-2026-139310
- 2026-11-30 Alias added: GHSA-gxpq-6gv8-2822
References
More Linux vulnerabilities
- TI-2025-26358 Zero-length TLS records mishandled on rx_list in Linux kernel KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 Out-of-bounds write in Linux kernel ebtables SNAT ARP rewrite KEVCVSS 3.1HIGH 8.8
- TI-2021-02452 Overlayfs flaw in Linux kernel lets attackers gain elevated privileges KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 Missing address checks in Linux kernel get_user and put_user on ARM KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Heap overflow in Linux kernel lets local users escalate privileges KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 Wrong integer type in Linux kernel perf_swevent_init KEVCVSS 3.1HIGH 8.4
Sources
- CVE-2026-139310 · CVE Program
- CVE-2026-139310 · NVD
- GHSA-gxpq-6gv8-2822 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences