Linux Kernel up to 6.16.1 comedi comedi_device_detach use after free

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 6.2 | $0-$5k | 0.00 |
Summary
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.
Details
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
Product
Type
Vendor
Name
Version
- 5.4.296
- 5.10.240
- 5.15.189
- 6.1.148
- 6.6.102
- 6.12.0
- 6.12.1
- 6.12.2
- 6.12.3
- 6.12.4
- 6.12.5
- 6.12.6
- 6.12.7
- 6.12.8
- 6.12.9
- 6.12.10
- 6.12.11
- 6.12.12
- 6.12.13
- 6.12.14
- 6.12.15
- 6.12.16
- 6.12.17
- 6.12.18
- 6.12.19
- 6.12.20
- 6.12.21
- 6.12.22
- 6.12.23
- 6.12.24
- 6.12.25
- 6.12.26
- 6.12.27
- 6.12.28
- 6.12.29
- 6.12.30
- 6.12.31
- 6.12.32
- 6.12.33
- 6.12.34
- 6.12.35
- 6.12.36
- 6.12.37
- 6.12.38
- 6.12.39
- 6.12.40
- 6.12.41
- 6.12.42
- 6.15.0
- 6.15.1
- 6.15.2
- 6.15.3
- 6.15.4
- 6.15.5
- 6.15.6
- 6.15.7
- 6.15.8
- 6.15.9
- 6.15.10
- 6.16.0
- 6.16.1
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 6.4VulDB 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: 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Use after freeCWE: 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-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 261545
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2025-38687
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
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
Timeline
04/16/2025 CVE reserved09/04/2025 Advisory disclosed
09/04/2025 VulDB entry created
02/10/2026 VulDB entry last update
Sources
Vendor: kernel.orgAdvisory: 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
Entry
Created: 09/04/2025 18:31Updated: 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.
No comments yet. Languages: en.
Please log in to comment.