CVE-2025-39997

ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free

State
Published
Severity
Not scored
Published
Oct 15, 2025
Updated
Oct 15, 2026
Reserved
Apr 16, 2025

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 06513dd6d32c37d0364db8488cfdf3e14da238a8 to before e63f049c7764b615d1d50cb486745fa63372b42dAffected
  • efaf61052b8ff9ee8968912fbaf02c2847c78ede to before e16985513e89466a236d2a7c202783b4dd0c5a46Affected
  • 647410a7da46067953a53c0d03f8680eff570959 to before dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647baAffected
  • c611b9e55174e439dcd85a72969b43a95f3827a4 to before 647d6b8d22be12842fde6ed0c56859ebc615f21eAffected
  • 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1 to before af600e7f5526d16146b3ae99f6ad57bfea79ca33Affected
  • 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1 to before 353d8c715cc951a980728133c9dd64ca5a0a186cAffected
  • 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1 to before 9f2c0ac1423d5f267e7f1d1940780fc764b0fee3Affected
  • 62066758d2ae169278e5d6aea5995b1b6f6ddeb5Affected
  • 6.1.167 to before 6.1.175Affected
  • 6.15.3 to before 6.16Affected
LinuxLinux
  • 6.16Affected
  • before 6.16Not affected
  • 6.1.175 through 6.1.*Not affected
  • 6.16.11 through 6.16.*Not affected
  • 6.17.1 through 6.17.*Not affected
  • 6.18 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.