# CVE-2025-38717: net: kcm: Fix race condition in kcm_unattach()

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2025-09-04T15:33:11.686Z
- Modified: 2026-10-19T21:10:00.160Z
- Weaknesses: CWE-362
- Assigned by: Linux

## 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().

(As written by CVE List.)

## Affected

- Linux Linux: from ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 before c0bffbc92a1ca3960fb9cdb8e9f75a68468eb308; from ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 before 7275dc3bb8f91b23125ff3f47b6529935cf46152; from ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 before 798733ee5d5788b12e8a52db1519abc17e826f69; from ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 before 52565a935213cd6a8662ddb8efe5b4219343a25d; 4.6 (not affected: before 4.6; from 6.12.43 up to 6.12.*; from 6.15.11 up to 6.15.*; from 6.16.2 up to 6.16.*; from 6.17 up to *)
- linux linux_kernel: from 4.6 before 6.12.43; from 6.13 before 6.15.11; from 6.16 before 6.16.2; 6.17

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/c0bffbc92a1ca3960fb9cdb8e9f75a68468eb308> (patch)
- <https://git.kernel.org/stable/c/7275dc3bb8f91b23125ff3f47b6529935cf46152> (patch)
- <https://git.kernel.org/stable/c/798733ee5d5788b12e8a52db1519abc17e826f69> (patch)
- <https://git.kernel.org/stable/c/52565a935213cd6a8662ddb8efe5b4219343a25d> (patch)

## Sources

- CVE List: [CVE-2025-38717](https://www.cve.org/CVERecord?id=CVE-2025-38717), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-38717](https://nvd.nist.gov/vuln/detail/CVE-2025-38717), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-38717 · Whole record: https://cve.day/CVE-2025-38717.json · Rebuilt by cve.day 2026-11-25T22:59:04.157Z
