vsock: Do not allow binding to VMADDR_PORT_ANY
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d021c344051af91f42c5ba9fdedc176740cbd238 · < 32950b1907919be86a7a2697d6f93d57068b3865| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
vsock: Do not allow binding to VMADDR_PORT_ANY
It is possible for a vsock to autobind to VMADDR_PORT_ANY. This can cause a use-after-free when a connection is made to the bound socket. The socket returned by accept() also has port VMADDR_PORT_ANY but is not on the list of unbound sockets. Binding it will result in an extra refcount decrement similar to the one fixed in fcdd2242c023 (vsock: Keep the binding until socket destruction).
Modify the check in __vsock_bind_connectible() to also prevent binding to VMADDR_PORT_ANY.
From the CVE record · Linux
The Linux kernel’s vsock code can allow a socket to bind to VMADDR_PORT_ANY. A connection to that socket can trigger a use-after-free; the input does not specify authentication requirements or whether user interaction is needed.
Engineers running Linux kernels with vsock should check their kernel version against the vendor advisory; affected versions are not specified in the input.