CVE-2025-40248 vsock: Ignore signal/timeout on connect() if already established

High 7.8 Published Updated

A race condition in the Linux kernel vsock implementation allows attackers to cause use-after-free or null pointer dereferences, potentially leading to system crashes or code execution.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-40248?

CVE-2025-40248 is a high-severity vulnerability in Linux, published on 4 Dec 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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

vsock: Ignore signal/timeout on connect() if already established

During connect(), acting on a signal/timeout by disconnecting an already established socket leads to several issues:

1. connect() invoking vsock_transport_cancel_pkt() -> virtio_transport_purge_skbs() may race with sendmsg() invoking virtio_transport_get_credit(). This results in a permanently elevated `vvs->bytes_unsent`. Which, in turn, confuses the SOCK_LINGER handling.

2. connect() resetting a connected socket's state may race with socket being placed in a sockmap. A disconnected socket remaining in a sockmap breaks sockmap's assumptions. And gives rise to WARNs.

3. connect() transitioning SS_CONNECTED -> SS_UNCONNECTED allows for a transport change/drop after TCP_ESTABLISHED. Which poses a problem for any simultaneous sendmsg() or connect() and may result in a use-after-free/null-ptr-deref.

Do not disconnect socket on signal/timeout. Keep the logic for unconnected sockets: they don't linger, can't be placed in a sockmap, are rejected by sendmsg().

[1]: https://lore.kernel.org/netdev/[email protected]/ [2]: https://lore.kernel.org/netdev/[email protected]/ [3]: https://lore.kernel.org/netdev/[email protected]/

Which versions are affected by CVE-2025-40248?

Linux distribution packages (40)
kpatch-patch-4_18_0-553_30_1 Red Hat:enterprise_linux:8::baseosAll versions0:1-11.el8_10
kpatch-patch-4_18_0-553_30_1-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:1-11.el8_10
kpatch-patch-4_18_0-553_30_1-debugsource Red Hat:enterprise_linux:8::baseosAll versions0:1-11.el8_10
kpatch-patch-4_18_0-553_40_1 Red Hat:enterprise_linux:8::baseosAll versions0:1-9.el8_10
kpatch-patch-4_18_0-553_40_1-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:1-9.el8_10
kpatch-patch-4_18_0-553_40_1-debugsource Red Hat:enterprise_linux:8::baseosAll versions0:1-9.el8_10
kpatch-patch-4_18_0-553_53_1 Red Hat:enterprise_linux:8::baseosAll versions0:1-7.el8_10
kpatch-patch-4_18_0-553_53_1-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:1-7.el8_10
kpatch-patch-4_18_0-553_53_1-debugsource Red Hat:enterprise_linux:8::baseosAll versions0:1-7.el8_10
kpatch-patch-4_18_0-553_72_1 Red Hat:enterprise_linux:8::baseosAll versions0:1-4.el8_10
kpatch-patch-4_18_0-553_72_1-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:1-4.el8_10
kpatch-patch-4_18_0-553_72_1-debugsource Red Hat:enterprise_linux:8::baseosAll versions0:1-4.el8_10
kpatch-patch-4_18_0-553_85_1 Red Hat:enterprise_linux:8::baseosAll versions0:1-2.el8_10
kpatch-patch-4_18_0-553_85_1-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:1-2.el8_10
kpatch-patch-4_18_0-553_85_1-debugsource Red Hat:enterprise_linux:8::baseosAll versions0:1-2.el8_10
kpatch-patch-5_14_0-611_9_1 Red Hat:enterprise_linux:9::baseosAll versions0:1-3.el9_7
kpatch-patch-5_14_0-611_9_1-debuginfo Red Hat:enterprise_linux:9::baseosAll versions0:1-3.el9_7
kpatch-patch-5_14_0-611_9_1-debugsource Red Hat:enterprise_linux:9::baseosAll versions0:1-3.el9_7
kpatch-patch-4_18_0-372_131_1 Red Hat:rhel_e4s:8.6::baseosAll versions0:1-12.el8_6
kpatch-patch-4_18_0-372_131_1-debuginfo Red Hat:rhel_e4s:8.6::baseosAll versions0:1-12.el8_6
kpatch-patch-4_18_0-372_131_1-debugsource Red Hat:rhel_e4s:8.6::baseosAll versions0:1-12.el8_6
kpatch-patch-4_18_0-372_137_1 Red Hat:rhel_e4s:8.6::baseosAll versions0:1-9.el8_6
kpatch-patch-4_18_0-372_137_1-debuginfo Red Hat:rhel_e4s:8.6::baseosAll versions0:1-9.el8_6
kpatch-patch-4_18_0-372_137_1-debugsource Red Hat:rhel_e4s:8.6::baseosAll versions0:1-9.el8_6
kpatch-patch-4_18_0-372_145_1 Red Hat:rhel_e4s:8.6::baseosAll versions0:1-7.el8_6
kpatch-patch-4_18_0-372_145_1-debuginfo Red Hat:rhel_e4s:8.6::baseosAll versions0:1-7.el8_6
kpatch-patch-4_18_0-372_145_1-debugsource Red Hat:rhel_e4s:8.6::baseosAll versions0:1-7.el8_6
kpatch-patch-4_18_0-372_158_1 Red Hat:rhel_e4s:8.6::baseosAll versions0:1-3.el8_6
kpatch-patch-4_18_0-372_158_1-debuginfo Red Hat:rhel_e4s:8.6::baseosAll versions0:1-3.el8_6
kpatch-patch-4_18_0-372_158_1-debugsource Red Hat:rhel_e4s:8.6::baseosAll versions0:1-3.el8_6
kpatch-patch-4_18_0-372_170_1 Red Hat:rhel_e4s:8.6::baseosAll versions0:1-2.el8_6
kpatch-patch-4_18_0-372_170_1-debuginfo Red Hat:rhel_e4s:8.6::baseosAll versions0:1-2.el8_6
kpatch-patch-4_18_0-372_170_1-debugsource Red Hat:rhel_e4s:8.6::baseosAll versions0:1-2.el8_6
kpatch-patch-4_18_0-477_107_1 Red Hat:rhel_e4s:8.8::baseosAll versions0:1-3.el8_8
kpatch-patch-4_18_0-477_107_1-debuginfo Red Hat:rhel_e4s:8.8::baseosAll versions0:1-3.el8_8
kpatch-patch-4_18_0-477_107_1-debugsource Red Hat:rhel_e4s:8.8::baseosAll versions0:1-3.el8_8
kpatch-patch-4_18_0-477_120_1 Red Hat:rhel_e4s:8.8::baseosAll versions0:1-2.el8_8
kpatch-patch-4_18_0-477_120_1-debuginfo Red Hat:rhel_e4s:8.8::baseosAll versions0:1-2.el8_8
kpatch-patch-4_18_0-477_120_1-debugsource Red Hat:rhel_e4s:8.8::baseosAll versions0:1-2.el8_8
kpatch-patch-4_18_0-477_81_1 Red Hat:rhel_e4s:8.8::baseosAll versions0:1-11.el8_8

How do I fix CVE-2025-40248?

Apply the vendor's patch.

Is CVE-2025-40248 being exploited?

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

Sources

Also known as AZL-71396, BELL-CVE-2025-40248, DEBIAN-CVE-2025-40248, GHSA-j4rg-4m7w-4hr3, RHSA-2026:3848, RHSA-2026:3865 and 12 more.

Is CVE-2025-40248 in your software?

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

Check your SBOMs for free