CVE-2025-21854: sockmap, vsock: For connectible sockets allow only connected
In the Linux kernel, the following vulnerability has been resolved:
sockmap, vsock: For connectible sockets allow only connected
sockmap expects all vsocks to have a transport assigned, which is expressed
in vsock_proto::psock_update_sk_prot(). However, there is an edge case
where an unconnected (connectible) socket may lose its previously assigned
transport. This is handled with a NULL check in the vsock/BPF recv path.
Another design detail is that listening vsocks are not supposed to have any
transport assigned at all. Which implies they are not supported by the
sockmap. But this is complicated by the fact that a socket, before
switching to TCP_LISTEN, may have had some transport assigned during a
failed connect() attempt. Hence, we may end up with a listening vsock in a
sockmap, which blows up quickly:
KASAN: null-ptr-deref in range [0x0000000000000120-0x0000000000000127]
CPU: 7 UID: 0 PID: 56 Comm: kworker/7:0 Not tainted 6.14.0-rc1+
Workqueue: vsock-loopback vsock_loopback_work
RIP: 0010:vsock_read_skb+0x4b/0x90
Call Trace:
sk_psock_verdict_data_ready+0xa4/0x2e0
virtio_transport_recv_pkt+0x1ca8/0x2acc
vsock_loopback_work+0x27d/0x3f0
process_one_work+0x846/0x1420
worker_thread+0x5b3/0xf80
kthread+0x35a/0x700
ret_from_fork+0x2d/0x70
ret_from_fork_asm+0x1a/0x30
For connectible sockets, instead of relying solely on the state of
vsk->transport, tell sockmap to only allow those representing established
connections. This aligns with the behaviour for AF_INET and AF_UNIX.
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel crash bug, not a data theft issue. A local low-privileged user could trigger a null pointer dereference in a vsock/sockmap edge case, causing denial of service. The sources do not show remote exploitation or active exploitation.
Executive priority
Treat as a normal-priority kernel availability fix unless the environment has many untrusted local users or tenants. It is not evidenced as internet-exploitable, but kernel crashes can still disrupt business services.
Technical view
CVE-2025-21854 is a CWE-476 null pointer dereference in Linux sockmap handling for connectible vsock sockets. Listening or unconnected vsocks could enter sockmap with invalid transport state, leading to a KASAN null-ptr-deref in vsock_read_skb. The fix restricts connectible sockets to established connections.
Likely exposure
Exposure is mainly Linux hosts running affected kernels where local users or workloads can interact with vsock and BPF sockmap paths. The CVSS vector is local, low complexity, low privileges, no user interaction, and high availability impact.
Exploitation context
The CVE record marks KEV as false, and the supplied sources do not report active exploitation. The impact is availability-only in the provided CVSS data, with no stated confidentiality or integrity impact.
Researcher notes
Key condition is a connectible vsock entering sockmap without the established connection state sockmap expects. The patch aligns behavior with AF_INET and AF_UNIX by allowing only established connectible sockets. Affected-version details in the bundle are limited and should be reconciled with distro backports.
Mitigation direction
Apply Linux kernel updates containing the referenced stable fixes or vendor backports.
Prioritize multi-user systems, virtualization hosts, and container platforms with untrusted local workloads.
Check distribution advisories before assuming exact affected package versions.
Reduce unnecessary access to BPF or vsock features where operationally feasible.
Validation and detection
Inventory Linux kernel versions across affected server and workstation fleets.
Confirm vendor kernel packages include a fix for CVE-2025-21854.
Review whether hosts expose vsock and BPF sockmap usage to untrusted local users.
Track remediation through reboot completion, not package installation alone.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-476: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-476 · source CWE mapping
NULL Pointer Dereference
NULL Pointer Dereference represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.