CVE-2025-38717

net: kcm: Fix race condition in kcm_unattach()

MEDIUM
4.7
CVSS Score
Published: September 4, 2025 at 03:33 PM UTC
Updated: October 19, 2026 at 09:10 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.7
Exploit prediction
EPSS 0.1%

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

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.6 ≤ v < 6.12.436.13 ≤ v < 6.15.116.16 ≤ v < 6.16.26.176.17 rc1ab7ac4eb9832e32a09f4e8042705484d2fb0aad3
Vendor states this is fixed in 52565a935213cd6a8662ddb8efe5b4219343a25d (fixed)
Vendor states this is fixed in 7275dc3bb8f91b23125ff3f47b6529935cf46152 (fixed)
Vendor states this is fixed in 798733ee5d5788b12e8a52db1519abc17e826f69 (fixed)
Vendor states this is fixed in c0bffbc92a1ca3960fb9cdb8e9f75a68468eb308 (fixed)
Vendor states this is fixed in 4.6 (unaffected)
Vendor states this is fixed in 6.12.43 (unaffected)
Vendor states this is fixed in 6.15.11 (unaffected)
Vendor states this is fixed in 6.16.2 (unaffected)
Vendor states this is fixed in 6.17 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/52565a935213cd6a8662ddb8efe5b4219343a25d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7275dc3bb8f91b23125ff3f47b6529935cf46152
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/798733ee5d5788b12e8a52db1519abc17e826f69
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c0bffbc92a1ca3960fb9cdb8e9f75a68468eb308

CVSS

Attack Vector
LOCAL
Complexity
HIGH
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-362

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card