CVE-2026-90138: vsock: don't check the listener's sk_err in vsock_accept()
In the Linux kernel, the following vulnerability has been resolved:
vsock: don't check the listener's skerr in vsockaccept()
Syzbot reported an issue which can be reproduced with these steps: r0 = socket(AFVSOCK, SOCKSTREAM, 0) bind(r0, {VMADDRCIDANY, PORT}) connect(r0, {VMADDRCIDLOCAL, PORT}) -> -1, EPROTO (self-connect) listen(r0, backlog) -> 0 r1 = socket(AFVSOCK, SOCKSTREAM, 0) connect(r1, {VMADDRCIDLOCAL, PORT}) -> 0 accept(r0) -> -1, EPROTO (stale skerr)
Basically, it creates a socket (r0) and triggers a self-connect after binding it. This self-connect fails with EPROTO because it loops back to r0 while the socket is still in the TCPSYNSENT state, causing it to be incorrectly dispatched to the connecting-client path. The unexpected packet type encountered there sets skerr to EPROTO.
After that, it invokes a listen() call on the same socket. This listen() call succeeds because the kernel's listening path never inspects or clears skerr. Then, a new socket (r1) is created as a normal client and connects to r0. However, vsockaccept() rejects this incoming connection because the listener's skerr still holds the EPROTO error from the earlier failed self-connect.
This rejection causes the child socket created for r1's connection to never be freed on virtio or hyperv transports; only the VMCI transport implements pendingwork to revisit and clean up a rejected socket.
For a non-blocking connect(), vsockconnect() may return -EINPROGRESS immediately, and vsockconnecttimeout() can later set sk->skerr asynchronously.
Since no vsock transport ever sets skerr on a socket while it is in TCPLISTEN state, checking it in vsockaccept() serves no purpose and only carries forward errors left behind by earlier, unrelated connection attempts on the same socket. Remove the checks so accept() no longer rejects valid incoming connections because of a stale error, which also avoids the resource leak described above.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
If immediate kernel update is not possible, reduce exposure by limiting which guests/hosts can initiate AF_VSOCK connections to the affected listener (e.g., network/VM isolation or ACLs around the vsock service).
Event History
Frequently Asked Questions
What conditions are required to trigger the acceptance failure?
An application must use an AF_VSOCK stream socket, bind it, attempt a self-connect to VMADDR_CID_LOCAL that fails with EPROTO, then place that same socket into listening mode. A subsequent normal client connection can then succeed while accept() on the listener fails with the stale EPROTO error.
Is this triggered by an ordinary client connection alone?
No. The listener must first retain sk_err=EPROTO from the earlier failed self-connect sequence; the later client connection exposes the issue when accept() checks that stale listener error.
How can an application identify that it is affected?
Look for a failed AF_VSOCK self-connect returning EPROTO on a socket that is later used for listen(). If later connections to that listener succeed but accept() returns EPROTO, the described stale sk_err condition is present.