Not scored
ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free
- Severity
- Not scored
- Exploit likelihood
- 0.21% (higher than 12% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
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
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 06513dd6d32c37d0364db8488cfdf3e14da238a8 before e63f049c7764b615d1d50cb486745fa63372b42d, from efaf61052b8ff9ee8968912fbaf02c2847c78ede before e16985513e89466a236d2a7c202783b4dd0c5a46, from 647410a7da46067953a53c0d03f8680eff570959 before dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba, from c611b9e55174e439dcd85a72969b43a95f3827a4 before 647d6b8d22be12842fde6ed0c56859ebc615f21e, from 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1 before af600e7f5526d16146b3ae99f6ad57bfea79ca33, from 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1 before 353d8c715cc951a980728133c9dd64ca5a0a186c, from 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1 before 9f2c0ac1423d5f267e7f1d1940780fc764b0fee3, 62066758d2ae169278e5d6aea5995b1b6f6ddeb5 and 3 more Not affected: before 6.16, from 6.1.175 up to 6.1.*, from 6.16.11 up to 6.16.*, from 6.17.1 up to 6.17.*, from 6.18 up to * | CVE List |
What each source says
CVE List
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.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: ALSA: usb-audio: corregir condición de carrera a UAF en snd_usbmidi_free El commit anterior 0718a78f6a9f ('ALSA: usb-audio: Eliminar temporizador correctamente al retirar') parcheó un problema de UAF causado por el temporizador de error. Sin embargo, debido a que la eliminación del temporizador de error añadida en este parche ocurre después de la eliminación del punto final, una condición de carrera a UAF todavía ocurre, aunque raramente. Además, dado que la limpieza de eliminación para urb también falta, la memoria liberada puede ser accedida en contexto de interrupción relacionado con urb, lo que puede causar UAF. Por lo tanto, para prevenir esto, el temporizador de error y urb deben ser eliminados antes de liberar la memoria del montón.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-39997 changed 2026-10-15 | CVE Terms of Use |
| NVD | CVE-2025-39997 changed 2026-10-19 | Public domain |