Cyber Resilience

CVE-2025-38687

Race Condition in Linux Kernel 3.14 – 5.4.297

Published
04 September 2025
Modified
17 June 2026
Patch / advisory
CVSS Score v3.1 4.7
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS Score 0.0011 2th percentile
Risk Priority 35 floored blend · peak EPSS

Summary

CVE-2025-38687 is a medium-severity Race Condition (CWE-362) vulnerability in Linux Linux Kernel. Its CVSS base score is 4.7 (Medium).

Operationally, ranked at the 2th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to AC-3 (Access Enforcement) and SI-16 (Memory Protection) — see the control section below for these in your framework.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

In the Linux kernel, the following vulnerability has been resolved: comedi: fix race between polling and detaching syzbot reports a use-after-free in comedi in the below link, which is due to comedi gladly removing the allocated async area even though…

more

poll requests are still active on the wait_queue_head inside of it. This can cause a use-after-free when the poll entries are later triggered or removed, as the memory for the wait_queue_head has been freed. We need to check there are no tasks queued on any of the subdevices' wait queues before allowing the device to be detached by the `COMEDI_DEVCONFIG` ioctl. Tasks will read-lock `dev->attach_lock` before adding themselves to the subdevice wait queue, so fix the problem in the `COMEDI_DEVCONFIG` ioctl handler by write-locking `dev->attach_lock` before checking that all of the subdevices are safe to be deleted. This includes testing for any sleepers on the subdevices' wait queues. It remains locked until the device has been detached. This requires the `comedi_device_detach()` function to be refactored slightly, moving the bulk of it into new function `comedi_device_detach_locked()`. Note that the refactor of `comedi_device_detach()` results in `comedi_device_cancel_all()` now being called while `dev->attach_lock` is write-locked, which wasn't the case previously, but that does not matter. Thanks to Jens Axboe for diagnosing the problem and co-developing this patch.

CWE(s)

Related Threats

CVEs Like This One

CVE-2025-38078Same product: Debian Debian Linux
CVE-2024-26984Same product: Debian Debian Linux
CVE-2025-39813Same product: Debian Debian Linux
CVE-2024-35898Same product: Debian Debian Linux
CVE-2024-35848Same product: Debian Debian Linux
CVE-2024-26897Same product: Debian Debian Linux
CVE-2025-38561Same product: Debian Debian Linux
CVE-2024-35809Same product: Debian Debian Linux
CVE-2024-26960Same product: Debian Debian Linux
CVE-2024-27030Same product: Debian Debian Linux

Affected Assets

linux
linux kernel
3.14 — 5.4.297 · 5.5 — 5.10.241 · 5.11 — 5.15.190
debian
debian linux
11.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)
Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V10.4.2
  • V10.4.5
  • V15.1.3
  • V15.4.1

Mitigating Controls (NIST 800-53 r5) AI

prevent

The fix write-locks dev->attach_lock before testing subdevice wait queues and detaching, directly enforcing that concurrent poll operations cannot access freed memory.

prevent

Memory protection mechanisms can block exploitation of the use-after-free that occurs when poll wait_queue_head structures are accessed after comedi_device_detach frees them.

prevent

Process isolation limits the blast radius of a successful race condition in one kernel driver's attachment state from affecting unrelated tasks or memory.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require proper synchronization primitives and concurrency testing that prevent race conditions.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

detects

Security testing can detect race conditions, but does not prevent them at design or coding time.

prevents

Secure SDLC mandates concurrency controls and synchronization primitives that directly prevent race conditions.

prevents

Application security requirements can specify thread-safety and locking rules, but do not prescribe implementation details.

prevents

Secure architecture principles require proper synchronization and resource isolation, addressing the root cause of CWE-362.

prevents

Secure coding standards explicitly forbid unsafe concurrent access patterns and mandate atomic operations or locks.

none

Change management reduces introduction of concurrency bugs during updates, yet does not address the weakness itself.

References