Junglewise Threat Intelligence

CVE-2025-21756: Linux kernel use-after-free in vsock socket binding

CVE-2025-21756 · Severity: high · CVSS 7.8 · Published 2025-02-27

Technologies: Linux Kernel. Vendors: Linux.

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

Related threats