Executive brief
A vulnerability exists in the Linux kernel's vsock implementation, which is used for communication between virtual machines and their hosts. A local attacker could exploit this flaw to cause a system crash or potentially execute unauthorized code by triggering a memory error during socket operations. This could lead to a full system compromise or a denial-of-service condition.
Technical details
A use-after-free (UAF) vulnerability exists in net/vmw_vsock/af_vsock.c due to improper reference counting during socket binding and transport reassignment. When a vsock socket is created, it is inserted into an unbound list, incrementing its reference count. However, during transport reassignment, the 'transport->release()' call may trigger 'vsock_remove_bound()' without verifying the socket's state, leading to a premature 'sock_put()' and a reference count of zero. Subsequent calls to 'vsock_bind()' then attempt to access the freed socket structure. The fix ensures that socket bindings are preserved until the socket is explicitly destroyed (marked as SOCK_DEAD).
Affected products
- Linux Linux kernel 5.5 to 5.10.235, 5.11 to 5.15.179, 6.2 to 6.6.79, 6.7 to 6.12.16, 6.13 to 6.13.4
Timeline
- 2025-01-28: patched: Initial patch authored by Michal Luczaj
- 2025-02-27: advisory: NVD publication date
References
- https://git.kernel.org/stable/c/3f43540166128951cc1be7ab1ce6b7f05c670d8b
- https://git.kernel.org/stable/c/42b33381e5e1f2b967dc4fb4221ddb9aaf10d197
- https://git.kernel.org/stable/c/645ce25aa0e67895b11d89f27bb86c9d444c40f8
- https://git.kernel.org/stable/c/b1afd40321f1c243cffbcf40ea7ca41aca87fa5e
- https://git.kernel.org/stable/c/e48fcb403c2d0e574c19683f09399ab4cf67809c
- https://git.kernel.org/stable/c/e7754d564579a5db9c5c9f74228df5d6dd6f1173
- https://git.kernel.org/stable/c/fcdd2242c0231032fc84e1404315c245ae56322a