VDB

CVE-2025-40231

CVE-2025-40231 PUBLISHED

vsock: fix lock inversion in vsock_assign_transport()

Reported by linux · Published December 4, 2025

In the Linux kernel, the following vulnerability has been resolved: vsock: fix lock inversion in vsock_assign_transport() Syzbot reported a potential lock inversion deadlock between vsock_register_mutex and sk_lock-AF_VSOCK when vsock_linger() is called. The issue was introduced by commit 687aa0c5581b ("vsock: Fix transport_* TOCTOU") which added vsock_register_mutex locking in vsock_assign_transport() around the transport->release() call, that can call vsock_linger(). vsock_assign_transport() can be called with sk_lock held. vsock_linger() calls sk_wait_event() that temporarily releases and re-acquires sk_lock. During this window, if another thread hold vsock_register_mutex while trying to acquire sk_lock, a circular dependency is created. Fix this by releasing vsock_register_mutex before calling transport->release() and vsock_deassign_transport(). This is safe because we don't need to hold vsock_register_mutex while releasing the old transport, and we ensure the new transport won't disappear by obtaining a module reference first via try_module_get().

EPSS 0.22% · 12.8th percentile

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel-libbpfAmazon Linux1:6.1.158-178.288.amzn2023
python3-perfAmazon Linux1:6.1.158-178.288.amzn2023
perf6.12Amazon Linux1:6.12.58-82.121.amzn2023
kernel-libbpf-staticAmazon Linux1:6.1.158-178.288.amzn2023
kernel6.12-headersAmazon Linux1:6.12.58-82.121.amzn2023
kernel6.12Amazon Linux1:6.12.58-82.121.amzn2023
kernel6.12-libbpf-staticAmazon Linux1:6.12.58-82.121.amzn2023
kernel6.12-tools-develAmazon Linux1:6.12.58-82.121.amzn2023
kernel-livepatch-6.1.158-178.288Amazon Linux1:1.0-0.amzn2023
kernel6.12-toolsAmazon Linux1:6.12.58-82.121.amzn2023
perfAmazon Linux1:6.1.158-178.288.amzn2023
python3-perf6.12Amazon Linux1:6.12.58-82.121.amzn2023

12 more packages have a fixed version. See every fix in Lookup.

Risk scores

EPSS Score
0.22%
12.8th percentile

Affected products

VendorProductVersions
LinuxLinux8667e8d0eb46bc54fdae30ba2f4786407d3d88eb, 36a439049b34cca0b3661276049b84a1f76cc21a, 9ce53e744f18e73059d3124070e960f3aa9902bf
LinuxLinux6.16, 0, 5.10.246
amazon:2023kernel-libbpf0
amazon:2023python3-perf0
amazon:2023perf6.120
amazon:2023kernel-libbpf-static0
amazon:2023kernel6.12-headers0
amazon:2023kernel6.120
amazon:2023kernel6.12-libbpf-static0
amazon:2023kernel6.12-tools-devel0
amazon:2023kernel-livepatch-6.1.158-178.2880
amazon:2023kernel6.12-tools0
amazon:2023perf0
amazon:2023python3-perf6.120
amazon:2023kernel-modules-extra0
amazon:2023kernel-tools-devel0
linuxlinux_kernel6.1.146, 6.16, 5.15.189
amazon:2023kernel6.12-libbpf-devel0
amazon:2023kernel-tools0
amazon:2023bpftool0

…and 12 more

Timeline

  • Dec 4, 2025 CVE Published
  • Dec 5, 2025 EPSS Score (30 in total, the first dated here)
  • Mar 29, 2026 Distribution Patch (168 in total, the first dated here)
  • Mar 29, 2026 Security Advisory (176 in total, the first dated here)
  • Jun 8, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2025-40231
vulnetix vdb fixes CVE-2025-40231

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-40231/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›