CVE-2025-38717
published high CVSS 3.1 · 7.8net: kcm: Fix race condition in kcm_unattach()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxab7ac4eb9832e32a09f4e8042705484d2fb0aad3 to < c0bffbc92a1ca3960fb9cdb8e9f75a68468eb308 · ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 to < 7275dc3bb8f91b23125ff3f47b6529935cf46152 · ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 to < 798733ee5d5788b12e8a52db1519abc17e826f69 · ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 to < 52565a935213cd6a8662ddb8efe5b4219343a25d · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux4.6 (affected) · 0 to < 4.6 (unaffected · semver) · 6.12.43 through 6.12.* (unaffected · semver) · 6.15.11 through 6.15.* (unaffected · semver) · 6.16.2 through 6.16.* (unaffected · semver) · 6.17 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | No Fix Planned | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | No Fix Planned | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2025-1208 | Fixed | Not stated | Amazon Linux assessment |
| SUSE / openSUSE | SLE-16 | cluster-md-kmp-defaultppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | cluster-md-kmp-defaultppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | cluster-md-kmp-defaultppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21179-1 |
Show 97 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | SLE-16 | cluster-md-kmp-defaults390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | cluster-md-kmp-defaults390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21179-1 |
| SUSE / openSUSE | SLE-16 | cluster-md-kmp-defaultx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | cluster-md-kmp-defaultx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | cluster-md-kmp-defaultx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21179-1 |
| SUSE / openSUSE | SLE-16 | dlm-kmp-defaultppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | dlm-kmp-defaultppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | dlm-kmp-defaultppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21179-1 |
| SUSE / openSUSE | SLE-16 | dlm-kmp-defaults390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | dlm-kmp-defaults390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21179-1 |
| SUSE / openSUSE | SLE-16 | dlm-kmp-defaultx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | dlm-kmp-defaultx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | dlm-kmp-defaultx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21179-1 |
| SUSE / openSUSE | SLE-16 | gfs2-kmp-defaultppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | gfs2-kmp-defaultppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | gfs2-kmp-defaultppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21179-1 |
| SUSE / openSUSE | SLE-16 | gfs2-kmp-defaults390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | gfs2-kmp-defaults390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21179-1 |
| SUSE / openSUSE | SLE-16 | gfs2-kmp-defaultx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | gfs2-kmp-defaultx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | gfs2-kmp-defaultx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21179-1 |
| SUSE / openSUSE | SLE-16 | kernelaarch64 | Advisory build | 64kb-6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernelaarch64 | Advisory build | 64kb-devel-6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernelaarch64 | Advisory build | 64kb-extra-6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-64kbaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-64kb-develaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-64kb-extraaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-defaultaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-defaultaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-defaultppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-defaultppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-defaults390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-defaults390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-defaultx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-defaultx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-baseaarch64 | Advisory build | 6.12.0-160000.6.1.160000.2.4 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-baseppc64le | Advisory build | 6.12.0-160000.6.1.160000.2.4 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-basex86_64 | Advisory build | 6.12.0-160000.6.1.160000.2.4 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-develaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-develaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-develppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-develppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-devels390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-devels390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-develx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-develx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-extraaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-extraaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-extrappc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-extrappc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-extras390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-extras390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-extrax86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-extrax86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-livepatchppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-livepatchppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-livepatchs390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-livepatchs390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-livepatchx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-livepatchx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-vdsox86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-default-vdsox86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-develnoarch | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-develnoarch | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-docsnoarch | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-docsnoarch | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-docs-htmlnoarch | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-docs-htmlnoarch | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmallaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmallaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmallppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmallppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmallx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmallx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmall-develaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmall-develaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmall-develppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmall-develppc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmall-develx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmall-develx86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmall-vdsox86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-kvmsmall-vdsox86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-macrosnoarch | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-macrosnoarch | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-obs-qaaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-obs-qaaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-obs-qappc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-obs-qappc64le | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-obs-qas390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-obs-qas390x | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-obs-qax86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-obs-qax86_64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-sourcenoarch | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-sourcenoarch | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-source-vanillanoarch | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
| SUSE / openSUSE | SLE-16 | kernel-source-vanillanoarch | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:21139-1 |
| SUSE / openSUSE | SLE-16 | kernel-symsaarch64 | Advisory build | 6.12.0-160000.6.1 | SUSE-SU-2025:20994-1 |
Package entries are limited to the first 100 builds and 100 linked advisories.
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().
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The race is driven entirely by local syscalls — creating an AF_KCM socket, `SIOCKCMATTACH`/`SIOCKCMUNATTACH` ioctls, and `close()` — with no remote packet needed to reach the vulnerable window. No network-facing service parses attacker data on this path. AC:L - The attacker controls both sides of the race, running `kcm_release()` in one thread while a second thread issues `SIOCKCMUNATTACH` on the reserved psock, and can retry the loop indefinitely until the window between `cancel_work_sync()` and `unreserve_psock()` is hit. syzbot hit it repeatedly with three separate reproducers, and `CONFIG_AF_KCM` is shipped as a module by major distributions. PR:L - There is not a single `capable()` or `CAP_NET_ADMIN` check in `net/kcm/`, and the protocol family autoloads on an unprivileged `socket(AF_KCM, ...)` call via `MODULE_ALIAS_NETPROTO(PF_KCM)`. Any local unprivileged user can attach a TCP socket and trigger the race. UI:N - The attacker performs every step — socket creation, attach, unattach, and close — from its own threads. No victim action or cooperation is required. S:U - The use-after-free corrupts kernel heap memory within the same kernel security authority; there is no VM, IOMMU, or sandbox boundary crossed. C:H - The freed `struct kcm_sock` is reachable from a workqueue and is reallocatable by the attacker (its own slab cache, refillable simply by creating more KCM sockets), so the UAF yields a read primitive over adjacent/reused kernel objects and can leak arbitrary kernel memory. I:H - Queueing work on a freed object makes the workqueue write into freed memory, and `kcm_tx_work()` subsequently operates on attacker-groomed contents, culminating in the indirect call `sk->sk_write_space(sk)` in `kcm_write_msgs()` — a control-flow hijack / arbitrary-write path, not just corruption. A:H - Even unexploited, running `lock_sock()` and `kcm_write_msgs()` on a freed `kcm_sock` produces a KASAN-reported use-after-free, workqueue list corruption, and kernel oops/panic, which any unprivileged user can trigger repeatedly.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 to < c0bffbc92a1ca3960fb9cdb8e9f75a68468eb308 (affected · git)ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 to < 7275dc3bb8f91b23125ff3f47b6529935cf46152 (affected · git)ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 to < 798733ee5d5788b12e8a52db1519abc17e826f69 (affected · git)ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 to < 52565a935213cd6a8662ddb8efe5b4219343a25d (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 4.6 (affected)0 to < 4.6 (unaffected · semver)6.12.43 through 6.12.* (unaffected · semver)6.15.11 through 6.15.* (unaffected · semver)6.16.2 through 6.16.* (unaffected · semver)6.17 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
4Provider assertions
1Linux · cna
net: kcm: Fix race condition in kcm_unattach()
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 824975715b579ef16e84b98b5fc93438c31a69f26ee41f5f382eab7d2a530d4f
- Ingested
- 23 Sep 2026, 08:46:47 UTC
- Source record
- Official CVE record