CVE-2025-38717 net: kcm: Fix race condition in kcm_unattach()
A race condition in the Linux kernel's KCM module can lead to a use-after-free, causing a system crash or denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-38717?
CVE-2025-38717 is a high-severity vulnerability in Linux kernel, published on 4 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
net: kcm: Fix race condition in kcm_unattach()
syzbot found a race condition when kcm_unattach(psock) and kcm_release(kcm) are executed at the same time.
kcm_unattach() is missing a check of the flag kcm->tx_stopped before calling queue_work().
If the kcm has a reserved psock, kcm_unattach() might get executed between cancel_work_sync() and unreserve_psock() in kcm_release(), requeuing kcm->tx_work right before kcm gets freed in kcm_done().
Remove kcm->tx_stopped and replace it by the less error-prone disable_work_sync().
Weakness: CWE-362
Which versions are affected by CVE-2025-38717?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-38717?
Apply the vendor's patch.
Is CVE-2025-38717 being exploited?
There is no known exploitation of CVE-2025-38717 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-66887, AZL-70783, BELL-CVE-2025-38717, DEBIAN-CVE-2025-38717, GHSA-998f-8276-5gr2, ROOT-OS-DEBIAN-11-CVE-2025-38717 and 4 more.