HIGH Introduced in 3.9
vsock Connect Race
CVE-2026-99213
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.1HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: vsock: treat TCP_CLOSING as once-established Handle the TCP_ESTABLISHED -> TCP_CLOSING transition on OP_RST, which can race with the connect loop. Immediately break and return 0 on ESTABLISHED/CLOSING. The return value of connect() should reflect what happened up to the point the connection was established or failed. Events that occur afterwards must not affect it. E.g. even if OP_RW has already set sk_err, connect() should still return 0, not ENOBUFS because of it. Adapt the inaccurate comment above signal_pending(). Resetting a socket that is still present in connected_table can lead to memory corruption. The reporter noted lost transports for in-flight skbs, and I have reproduced crashes caused by re-insertion into connected_table. list_add double add: new=, prev=, next=. kernel BUG at lib/list_debug.c:35! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI Workqueue: vsock-loopback vsock_loopback_work RIP: 0010:__list_add_valid_or_report+0x11f/0x130 Call Trace: vsock_insert_connected.cold+0xe/0x13 virtio_transport_recv_pkt+0x10e9/0x1460 vsock_loopback_work+0x305/0x480 process_one_work+0xe4c/0x1560 worker_thread+0x4f1/0xd60 kthread+0x36e/0x470 ret_from_fork+0x47b/0x6b0 ret_from_fork_asm+0x1a/0x30 This fix is supplementary to commit 002541ef650b ("vsock: Ignore signal/timeout on connect() if already established"). Details under Link.
02KernelScan AI Analysis
Risk summary
A race condition in the vsock connect logic allows a local attacker to trigger kernel memory corruption by racing a socket reset (OP_RST) against the connect loop. The bug causes list corruption (double-add) leading to kernel panic, and potentially arbitrary kernel memory read/write. Any local user with access to AF_VSOCK sockets — common in VM, container, and hypervisor environments — can exploit this.
Vulnerability analysis
The vsock connect loop only recognized TCP_ESTABLISHED as a terminal success state. When a connected socket receives a reset packet, it transitions to TCP_CLOSING while still present in the connected_table. If this transition races with the connect loop, the loop fails to recognize the connection as already established, proceeds to error handling, and attempts to reset or re-insert the socket — corrupting the kernel list and causing a panic. The fix treats TCP_CLOSING identically to TCP_ESTABLISHED: the connect call returns success immediately, since the connection was established at some point. The vulnerability is reachable by any local process that can create AF_VSOCK sockets (typically unprivileged), making it relevant in virtualized, containerized, and hypervisor deployments where vsock is enabled.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 3.9 | 5.10.273 | ea36ef3c229d |
| 5.15 | 3.9 | 5.15.224 | 5f2ab7702860 |
| 6.1 | 3.9 | 6.1.191 | f89770c73657 |
| 6.12 | 3.9 | 6.12.115 | baf1b5715640 |
| 6.18 | 3.9 | 6.18.59 | c2c5359ef2c3 |
| 6.6 | 3.9 | 6.6.161 | deb972c7eea8 |
| 7.2 | 3.9 | 7.2.13 | 44d1ca05d609 |
| mainline | 3.9 | 7.3 | 4f6ac74fa594 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Affected — no CIP fix yet (latest 6.12.114-cip34) |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip137) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip115) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |