Linux Kernel up to 6.16.1 comedi comedi_device_detach use after free

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
6.2$0-$5k0.00

Summaryinfo

A vulnerability identified as critical has been detected in Linux Kernel up to 6.16.1. Impacted is the function comedi_device_detach of the component comedi. Performing a manipulation results in use after free. This vulnerability is cataloged as CVE-2025-38687. There is no exploit available. You should upgrade the affected component.

Detailsinfo

A vulnerability classified as critical has been found in Linux Kernel up to 6.16.1. This affects the function comedi_device_detach of the component comedi. The manipulation with an unknown input leads to a use after free vulnerability. CWE is classifying the issue as CWE-416. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. This is going to have an impact on confidentiality, integrity, and availability. The summary by CVE is:

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.

The advisory is shared at git.kernel.org. This vulnerability is uniquely identified as CVE-2025-38687 since 04/16/2025. The exploitability is told to be easy. Technical details are known, but no exploit is available. The price for an exploit might be around USD $0-$5k at the moment (estimation calculated on 02/10/2026).

The vulnerability scanner Nessus provides a plugin with the ID 261545 (Linux Distros Unpatched Vulnerability : CVE-2025-38687), which helps to determine the existence of the flaw in a target environment.

Upgrading to version 5.4.297, 5.10.241, 5.15.190, 6.1.149, 6.6.103, 6.12.43, 6.15.11, 6.16.2 or 6.17-rc1 eliminates this vulnerability. Applying the patch fe67122ba781df44a1a9716eb1dfd751321ab512/cd4286123d6948ff638ea9cd5818ae4796d5d252/d85fac8729c9acfd72368faff1d576ec585e5c8f/0f989f9d05492028afd2bded4b42023c57d8a76e/5c4a2ffcbd052c69bbf4680677d4c4eaa5a252d4/017198079551a2a5cf61eae966af3c4b145e1f3b/71ca60d2e631cf9c63bcbc7017961c61ff04e419/5724e82df4f9a4be62908362c97d522d25de75dd/35b6fc51c666fc96355be5cd633ed0fe4ccf68b2 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the databases at Tenable (261545), EUVD (EUVD-2025-26782) and CERT Bund (WID-SEC-2025-1976). Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Affected

  • Debian Linux
  • Amazon Linux 2
  • Open Source Linux Kernel
  • Red Hat Enterprise Linux
  • Ubuntu Linux
  • SUSE Linux
  • Oracle Linux
  • SUSE openSUSE
  • RESF Rocky Linux
  • Microsoft Azure
  • Dell Secure Connect Gateway
  • IBM QRadar SIEM
  • IBM Security Verify Access
  • Dell NetWorker

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.4
VulDB Meta Temp Score: 6.2

VulDB Base Score: 8.0
VulDB Temp Score: 7.6
VulDB Vector: 🔒
VulDB Reliability: 🔍

NVD Base Score: 4.7
NVD Vector: 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Use after free
CWE: CWE-416 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒

Physical: Partially
Local: Yes
Remote: Partially

Availability: 🔒
Status: Not defined

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 261545
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2025-38687

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: Kernel 5.4.297/5.10.241/5.15.190/6.1.149/6.6.103/6.12.43/6.15.11/6.16.2/6.17-rc1
Patch: fe67122ba781df44a1a9716eb1dfd751321ab512/cd4286123d6948ff638ea9cd5818ae4796d5d252/d85fac8729c9acfd72368faff1d576ec585e5c8f/0f989f9d05492028afd2bded4b42023c57d8a76e/5c4a2ffcbd052c69bbf4680677d4c4eaa5a252d4/017198079551a2a5cf61eae966af3c4b145e1f3b/71ca60d2e631cf9c63bcbc7017961c61ff04e419/5724e82df4f9a4be62908362c97d522d25de75dd/35b6fc51c666fc96355be5cd633ed0fe4ccf68b2

Timelineinfo

04/16/2025 CVE reserved
09/04/2025 +141 days Advisory disclosed
09/04/2025 +0 days VulDB entry created
02/10/2026 +159 days VulDB entry last update

Sourcesinfo

Vendor: kernel.org

Advisory: git.kernel.org
Status: Confirmed

CVE: CVE-2025-38687 (🔒)
GCVE (CVE): GCVE-0-2025-38687
GCVE (VulDB): GCVE-100-322569
EUVD: 🔒
CERT Bund: WID-SEC-2025-1976 - Linux Kernel: Mehrere Schwachstellen ermöglichen Denial of Service

Entryinfo

Created: 09/04/2025 18:31
Updated: 02/10/2026 04:39
Changes: 09/04/2025 18:31 (59), 09/05/2025 12:08 (7), 09/07/2025 23:45 (2), 09/29/2025 11:28 (1), 10/08/2025 15:42 (1), 12/02/2025 08:20 (1), 01/09/2026 21:03 (11), 01/10/2026 09:33 (1), 01/14/2026 17:34 (1), 02/10/2026 04:39 (1)
Complete: 🔍
Cache ID: 216::103

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Might our Artificial Intelligence support you?

Check our Alexa App!