CVE-2025-40248: Linux kernel vsock connect() race leading to memory corruption
- Vendor
- Linux
CVE-2025-40248 is a race condition in the Linux kernel vsock subsystem's handling of signals and timeouts during connect(). If a socket becomes established before connect() processes a signal or timeout, the operation can incorrectly disconnect it. Packet cancellation through vsock_transport_cancel_pkt() and virtio_transport_purge_skbs() can race with sendmsg() credit accounting in virtio_transport_get_credit(), permanently elevating vvs->bytes_unsent and disrupting SOCK_LINGER handling. Resetting the connected socket can also race with sockmap insertion, leaving a disconnected socket in the map and triggering kernel warnings. Transitioning from SS_CONNECTED to SS_UNCONNECTED permits transport replacement or removal after TCP_ESTABLISHED, potentially causing a use-after-free or null-pointer dereference during concurrent sendmsg() or connect() operations. The issue was introduced in Linux 3.9.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can corrupt kernel memory or socket state, cause kernel warnings, disrupt socket-linger behavior, and potentially crash the kernel, resulting in denial of service. The use-after-free condition may also permit local privilege escalation. Arbitrary code execution or information disclosure is not established by the technical details available.
Mitigation
If you can’t patch tonight, do this now.
No complete temporary workaround is documented. Pending patching, reduce exposure by limiting affected AF_VSOCK functionality and restricting untrusted local workloads or guest/host interactions capable of exercising the vulnerable connect() paths. These restrictions reduce attack surface but do not replace the kernel update.
Remediation
Patch, then assume compromise.
Install a vendor-supported kernel update containing the vsock fix and reboot into the updated kernel, unless an applicable vendor-supported live patch is deployed according to its instructions. Fixed upstream releases include 5.4.302, 6.6.118, 6.12.60, 6.17.10, and 6.18; use the latest supported release for the applicable branch rather than cherry-picking an individual fix. Distribution package versions may differ because of backports. The fix prevents signal or timeout handling from disconnecting an already established socket while preserving existing handling for unconnected sockets.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2025-40248 exploited in the wild?
- As of Nov 19, 2026, Mallory has no reports of CVE-2025-40248 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2025-40248?
- As of Nov 19, 2026, Mallory has found no public exploit for CVE-2025-40248.
- Is there a patch for CVE-2025-40248?
- Install a vendor-supported kernel update containing the vsock fix and reboot into the updated kernel, unless an applicable vendor-supported live patch is deployed according to its instructions. Fixed upstream releases include 5.4.302, 6.6.118, 6.12.60, 6.17.10, and 6.18; use the latest supported release for the applicable branch rather than cherry-picking an individual fix.
- What products are affected by CVE-2025-40248?
- Linux Kernel.
- How severe is CVE-2025-40248?
- CVE-2025-40248 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 0.24% (9th percentile) as of Nov 19, 2026.
Recent activity
39 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.