In the Linux kernel, the following vulnerability has been resolved:
vsock: fix lock inversion in vsockassigntransport()
Syzbot reported a potential lock inversion deadlock between vsockregistermutex and sklock-AFVSOCK when vsock_linger() is called.
The issue was introduced by commit 687aa0c5581b ("vsock: Fix transport* TOCTOU") which added vsockregistermutex locking in vsockassigntransport() around the transport->release() call, that can call vsocklinger(). vsockassigntransport() can be called with sklock held. vsocklinger() calls skwaitevent() that temporarily releases and re-acquires sklock. During this window, if another thread hold vsockregistermutex while trying to acquire sklock, a circular dependency is created.
Fix this by releasing vsockregistermutex before calling transport->release() and vsockdeassigntransport(). This is safe because we don't need to hold vsockregistermutex while releasing the old transport, and we ensure the new transport won't disappear by obtaining a module reference first via trymoduleget().
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40231.json",
"cna_assigner": "Linux"
}