CVE-2025-40231
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-libbpf | Amazon Linux | 1:6.1.158-178.288.amzn2023 |
| python3-perf | Amazon Linux | 1:6.1.158-178.288.amzn2023 |
| perf6.12 | Amazon Linux | 1:6.12.58-82.121.amzn2023 |
| kernel-libbpf-static | Amazon Linux | 1:6.1.158-178.288.amzn2023 |
| kernel6.12-headers | Amazon Linux | 1:6.12.58-82.121.amzn2023 |
| kernel6.12 | Amazon Linux | 1:6.12.58-82.121.amzn2023 |
| kernel6.12-libbpf-static | Amazon Linux | 1:6.12.58-82.121.amzn2023 |
| kernel6.12-tools-devel | Amazon Linux | 1:6.12.58-82.121.amzn2023 |
| kernel-livepatch-6.1.158-178.288 | Amazon Linux | 1:1.0-0.amzn2023 |
| kernel6.12-tools | Amazon Linux | 1:6.12.58-82.121.amzn2023 |
| perf | Amazon Linux | 1:6.1.158-178.288.amzn2023 |
| python3-perf6.12 | Amazon Linux | 1:6.12.58-82.121.amzn2023 |
12 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 8667e8d0eb46bc54fdae30ba2f4786407d3d88eb, 36a439049b34cca0b3661276049b84a1f76cc21a, 9ce53e744f18e73059d3124070e960f3aa9902bf |
| Linux | Linux | 6.16, 0, 5.10.246 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | perf6.12 | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | kernel6.12-headers | 0 |
| amazon:2023 | kernel6.12 | 0 |
| amazon:2023 | kernel6.12-libbpf-static | 0 |
| amazon:2023 | kernel6.12-tools-devel | 0 |
| amazon:2023 | kernel-livepatch-6.1.158-178.288 | 0 |
| amazon:2023 | kernel6.12-tools | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | python3-perf6.12 | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| linux | linux_kernel | 6.1.146, 6.16, 5.15.189 |
| amazon:2023 | kernel6.12-libbpf-devel | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | bpftool | 0 |
…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