# CVE-2025-39997: ALSA: usb-audio: fix race condition to UAF in snd\_usbmidi\_free

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.29% (percentile 14, 2026-11-26)
- **Published:** 2025-10-15T07:58:21.702Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 06513dd6d32c37d0364db8488cfdf3e14da238a8, \< e63f049c7764b615d1d50cb486745fa63372b42d; \>= efaf61052b8ff9ee8968912fbaf02c2847c78ede, \< e16985513e89466a236d2a7c202783b4dd0c5a46; \>= 647410a7da46067953a53c0d03f8680eff570959, \< dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba; \>= c611b9e55174e439dcd85a72969b43a95f3827a4, \< 647d6b8d22be12842fde6ed0c56859ebc615f21e; \>= 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1, \< af600e7f5526d16146b3ae99f6ad57bfea79ca33; \>= 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1, \< 353d8c715cc951a980728133c9dd64ca5a0a186c; \>= 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1, \< 9f2c0ac1423d5f267e7f1d1940780fc764b0fee3; 62066758d2ae169278e5d6aea5995b1b6f6ddeb5; \>= 6.1.167, \< 6.1.175; \>= 6.15.3, \< 6.16
- Anyone running Linux 6.16

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

## Affected and fixed versions

- Linux: \>= 06513dd6d32c37d0364db8488cfdf3e14da238a8, \< e63f049c7764b615d1d50cb486745fa63372b42d; \>= efaf61052b8ff9ee8968912fbaf02c2847c78ede, \< e16985513e89466a236d2a7c202783b4dd0c5a46; \>= 647410a7da46067953a53c0d03f8680eff570959, \< dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba; \>= c611b9e55174e439dcd85a72969b43a95f3827a4, \< 647d6b8d22be12842fde6ed0c56859ebc615f21e; \>= 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1, \< af600e7f5526d16146b3ae99f6ad57bfea79ca33; \>= 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1, \< 353d8c715cc951a980728133c9dd64ca5a0a186c; \>= 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1, \< 9f2c0ac1423d5f267e7f1d1940780fc764b0fee3; 62066758d2ae169278e5d6aea5995b1b6f6ddeb5; \>= 6.1.167, \< 6.1.175; \>= 6.15.3, \< 6.16 (cvelist)
- Linux: 6.16 (cvelist)

## Mitigation

- Upgrade Linux to 6.16 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-39997. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-39997.md
Affected: Linux >= 06513dd6d32c37d0364db8488cfdf3e14da238a8, < e63f049c7764b615d1d50cb486745fa63372b42d; >= efaf61052b8ff9ee8968912fbaf02c2847c78ede, < e16985513e89466a236d2a7c202783b4dd0c5a46; >= 647410a7da46067953a53c0d03f8680eff570959, < dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba; >= c611b9e55174e439dcd85a7…
Fixed in: Linux 647d6b8d22be12842fde6ed0c56859ebc615f21e, Linux 353d8c715cc951a980728133c9dd64ca5a0a186c, Linux 9f2c0ac1423d5f267e7f1d1940780fc764b0fee3, Linux 6.1.175, Linux 6.16

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-39997 being exploited?

There is no confirmed exploitation: CVE-2025-39997 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.29% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-39997?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2025-39997?

Linux \>= 06513dd6d32c37d0364db8488cfdf3e14da238a8, \< e63f049c7764b615d1d50cb486745fa63372b42d; \>= efaf61052b8ff9ee8968912fbaf02c2847c78ede, \< e16985513e89466a236d2a7c202783b4dd0c5a46; \>= 647410a7da46067953a53c0d03f8680eff570959, \< dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba; \>= c611b9e55174e439dcd85a72969b43a95f3827a4, \< 647d6b8d22be12842fde6ed0c56859ebc615f21e; \>= 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1, \< af600e7f5526d16146b3ae99f6ad57bfea79ca33; \>= 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1, \< 353d8c715cc951a980728133c9dd64ca5a0a186c; \>= 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1, \< 9f2c0ac1423d5f267e7f1d1940780fc764b0fee3; 62066758d2ae169278e5d6aea5995b1b6f6ddeb5; \>= 6.1.167, \< 6.1.175; \>= 6.15.3, \< 6.16; Linux 6.16.

### Is there a fix for CVE-2025-39997?

Yes. Fixed in Linux 647d6b8d22be12842fde6ed0c56859ebc615f21e, Linux 353d8c715cc951a980728133c9dd64ca5a0a186c, Linux 9f2c0ac1423d5f267e7f1d1940780fc764b0fee3, Linux 6.1.175, Linux 6.16. Upgrade Linux to 6.16 or later.

### How do I check if I'm affected by CVE-2025-39997?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/e63f049c7764b615d1d50cb486745fa63372b42d>
- other: <https://git.kernel.org/stable/c/e16985513e89466a236d2a7c202783b4dd0c5a46>
- other: <https://git.kernel.org/stable/c/dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba>
- other: <https://git.kernel.org/stable/c/647d6b8d22be12842fde6ed0c56859ebc615f21e>
- other: <https://git.kernel.org/stable/c/af600e7f5526d16146b3ae99f6ad57bfea79ca33>
- other: <https://git.kernel.org/stable/c/353d8c715cc951a980728133c9dd64ca5a0a186c>
- other: <https://git.kernel.org/stable/c/9f2c0ac1423d5f267e7f1d1940780fc764b0fee3>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-784472.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-39997>

HTML: <https://flawdb.com/CVE-2025-39997> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-39997>
