CVE-2025-39997 Details
Description
In the Linux kernel, the following vulnerability has been resolved: ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free The previous commit 0718a78f6a9f ("ALSA: usb-audio: Kill timer properly at removal") patched a UAF issue caused by the error timer. However, because the error timer kill added in this patch occurs after the endpoint delete, a race condition to UAF still occurs, albeit rarely. Additionally, since kill-cleanup for urb is also missing, freed memory can be accessed in interrupt context related to urb, which can cause UAF. Therefore, to prevent this, error timer and urb must be killed before freeing the heap memory.
A use-after-free vulnerability has been addressed in the Linux kernel's ALSA USB-Audio subsystem, specifically within the snd_usbmidi_free function. This vulnerability arose from a race condition related to the handling of error timers and USB request blocks (URBs). The issue was initially introduced when the error timer was not properly synchronized with the deletion of USB endpoints, allowing for a rare race condition that could be exploited. Furthermore, the absence of proper cleanup for URBs meant that freed memory could be accessed in interrupt context, exacerbating the use-after-free condition. The vulnerability has been resolved by ensuring that the error timer and URBs are properly managed before freeing the associated memory.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 15, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/353d8c715cc951a980728133c9dd64ca5a0a186c | kernel.org | Source CodeVendor |
| https://git.kernel.org/stable/c/647d6b8d22be12842fde6ed0c56859ebc615f21e | kernel.org | Source CodeVendor |
| https://git.kernel.org/stable/c/9f2c0ac1423d5f267e7f1d1940780fc764b0fee3 | kernel.org | Source CodeVendor |
| https://git.kernel.org/stable/c/af600e7f5526d16146b3ae99f6ad57bfea79ca33 | kernel.org | Source CodeVendor |
| https://git.kernel.org/stable/c/dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba | kernel.org | Source CodeVendor |
| https://git.kernel.org/stable/c/e16985513e89466a236d2a7c202783b4dd0c5a46 | kernel.org | |
| https://git.kernel.org/stable/c/e63f049c7764b615d1d50cb486745fa63372b42d | kernel.org |
Weakness Enumeration
No weakness enumeration is available for this CVE.
Affected Products
| Product | Versions |
|---|---|
| Linux kernel | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | kernel.org |
| Jun 1, 2026 | CVE Modified | kernel.org |
| Oct 15, 2025 | New CVE Received | kernel.org |
Volerion