CVE-2026-99213: vsock: treat TCP_CLOSING as once-established
In the Linux kernel, the following vulnerability has been resolved:
vsock: treat TCPCLOSING as once-established
Handle the TCPESTABLISHED -> TCPCLOSING transition on OPRST, 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 OPRW has already set skerr, connect() should still return 0, not ENOBUFS because of it. Adapt the inaccurate comment above signalpending().
Resetting a socket that is still present in connectedtable can lead to memory corruption. The reporter noted lost transports for in-flight skbs, and I have reproduced crashes caused by re-insertion into connectedtable.
listadd double add: new=, prev=, next=. kernel BUG at lib/listdebug.c:35! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI Workqueue: vsock-loopback vsockloopbackwork RIP: 0010:listaddvalidorreport+0x11f/0x130 Call Trace: vsockinsertconnected.cold+0xe/0x13 virtiotransportrecvpkt+0x10e9/0x1460 vsockloopbackwork+0x305/0x480 processonework+0xe4c/0x1560 workerthread+0x4f1/0xd60 kthread+0x36e/0x470 retfromfork+0x47b/0x6b0 retfromforkasm+0x1a/0x30
This fix is supplementary to commit 002541ef650b ("vsock: Ignore signal/timeout on connect() if already established"). Details under Link.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.273 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.224 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.191 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.161 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.115 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.59 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2.13 - Upgrade
Upgrade
azurelinux/kernelto a version that resolves this vulnerability.Fixed in 6.6.161.1-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.192-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.115-2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.2.13-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.115-2~deb12u1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.3.0-10.10 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 7.3.0-1004.5 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 7.3.0-10.10.1 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.3.0-10.10.1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.192-2Fixed in 6.12.117-1Fixed in 7.3.4-1Fixed in 7.3.5-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.117-1~deb12u1
Event History
Frequently Asked Questions
What conditions can trigger the failure?
The issue involves a race between the vsock connect loop and an OP_RST-driven TCP_ESTABLISHED to TCP_CLOSING transition. Resetting a socket while it remains in connected_table can cause it to be inserted into that table again.
What impact has been observed?
The reported effects include memory corruption, lost transports for in-flight skbs, crashes, and a kernel BUG from a list_add double-add detected in list debugging code.
Are systems using the vsock loopback transport relevant?
Yes. The supplied crash trace shows the issue occurring in the vsock-loopback workqueue through vsock_loopback_work and virtio_transport_recv_pkt.
What behavior does the fix enforce for connect()?
Once a connection has reached TCP_ESTABLISHED or TCP_CLOSING, connect() returns 0 immediately. Errors that occur after establishment, including an OP_RW-set sk_err such as ENOBUFS, must not change that successful result.