boxscore/security
CVE · referencelatest edition

Reference page — cumulative record through Wednesday, August 19, 2026 UTC. Reference pages update as the archive grows; only dated daily editions are immutable pages of record.

CVE-2025-38687MEDIUM
Linux Linux — comedi: fix race between polling and detaching
  AV  AC  PR  UI  S  C  I  A   CVSS    EPSS   %ile   KEV
   L   H   L   N  U  N  N  H    4.7   .0012    2.5     —
AFFECTED
  Product  Versions                                    Fixed
  Linux    2f3fdcd7ce935f6f2899ceab57dc8fe5286db3e1 –  —
  Linux    3.14 –                                      5.4.297
TIMELINE
  Apr 16  Reserved by Linux
  Sep 4   Published (CNA: Linux)
  Jul 30  RESCORED — CVE-2025-38687 (Linux). CVSS 7.3 → 4.7 (NVD).
CWE-362 · CNA: Linux · CVSS v3.1 · 12 references · NVD status: Modified

Description

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

Lifecycle

Complete event history — 3 events, chronological
DateEventDetail
April 16, 2025ReservedReserved by Linux
September 4, 2025PublishedPublished (CNA: Linux)
July 30, 2026RESCOREDRESCORED — CVE-2025-38687 (Linux). CVSS 7.3 → 4.7 (NVD).

Affected

Affected products and packages — 2 rows
VendorProduct / PackageEcosystemVersion introducedFixed
LinuxLinux2f3fdcd7ce935f6f2899ceab57dc8fe5286db3e1
LinuxLinux3.145.4.297

Weaknesses

CWE-362

References (12)

Related

Authoritative record: CVE-2025-38687 at cve.org

Vendors: linux

Weaknesses: CWE-362

About this page

This is a reference page, not a dated page of record. It assembles the complete lifecycle of CVE-2025-38687 from the CVE Program record, NVD enrichment, the CISA KEV catalog, EPSS, and OSV advisories. The box score's numbers (CVSS, EPSS, KEV status) are current as of Wednesday, August 19, 2026 UTC and are re-derived as the archive grows; only dated daily editions are immutable pages of record. The authoritative source for this identifier is cve.org.