Critical Double Free Vulnerability in Linux Kernel - CVE-2025-39870
Summary
CVE-2025-39870: In the Linux kernel, the following vulnerability has been resolved: dmaengine: idxd: Fix double free in idxd_setup_wqs() The clean up in idxd_setup_wqs() has had a couple bugs because the error handling is a bit subtle. Affects linux versions < 6.1.153-1. Fixed in 6.1.153-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Linux kernel is the core component of many operating systems, providing essential services for hardware and software interaction. It is known for its stability, performance, and security features. However, like any complex software, it is susceptible to vulnerabilities. CVE-2025-39870 specifically affects the dmaengine subsystem, which is responsible for managing direct memory access (DMA) operations, crucial for efficient data transfer between devices and memory.
Vulnerability Detail
CVE-2025-39870 is a critical vulnerability in the Linux kernel's dmaengine subsystem, specifically in the idxd_setup_wqs() function. The vulnerability arises from improper error handling, leading to a double free condition. If the maximum number of work queues (max_wqs) is less than or equal to zero, the function attempts to release an uninitialized device pointer, resulting in potential memory corruption. Additionally, if memory allocation fails, the function may attempt to free an invalid pointer, exacerbating the risk of exploitation. This vulnerability could allow an attacker to execute arbitrary code or crash the system, posing significant security risks.
How To Fix
Minimum fixed version
6.1.153-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade linux
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
Currently, there are no specific workarounds provided for this vulnerability. Users are advised to apply the patch as soon as it becomes available for their respective Debian versions.
Conclusion
CVE-2025-39870 is a significant vulnerability in the Linux kernel that requires immediate attention. Users are encouraged to update their systems to the patched versions as soon as they are available to mitigate potential risks. Utilizing tools like Vulert can help in monitoring and managing open-source vulnerabilities effectively.
See every vulnerability recorded for linux →
FAQ
CVE-2025-39870 is a vulnerability in the Linux kernel that can lead to a double free condition in the dmaengine subsystem, potentially allowing attackers to execute arbitrary code.
You can use the Vulert platform to check if your application is affected by this vulnerability. Simply upload your manifest file like package-lock.json to monitor for vulnerabilities.
Exploitation of this vulnerability could lead to memory corruption, system crashes, or arbitrary code execution, posing serious security risks.
You can update your Linux kernel using package management commands specific to your distribution. For Debian, use 'apt-get' commands to install the patched versions.
While the primary risk is system instability and potential code execution, there is a possibility of data loss if the system crashes or behaves unexpectedly due to this vulnerability.
Related vulnerabilities
Recent vulnerabilities recorded for linux.