{"id":"CVE-2025-39997","summary":"ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free\n\nThe previous commit 0718a78f6a9f (\"ALSA: usb-audio: Kill timer properly at\nremoval\") patched a UAF issue caused by the error timer.\n\nHowever, because the error timer kill added in this patch occurs after the\nendpoint delete, a race condition to UAF still occurs, albeit rarely.\n\nAdditionally, since kill-cleanup for urb is also missing, freed memory can\nbe accessed in interrupt context related to urb, which can cause UAF.\n\nTherefore, to prevent this, error timer and urb must be killed before\nfreeing the heap memory.","modified":"2026-04-02T12:48:14.546382Z","published":"2025-10-15T07:58:21.702Z","related":["SUSE-SU-2025:21040-1","SUSE-SU-2025:21052-1","SUSE-SU-2025:21056-1","SUSE-SU-2025:21064-1","SUSE-SU-2025:21080-1","SUSE-SU-2025:21147-1","SUSE-SU-2025:21180-1","SUSE-SU-2025:4057-1","SUSE-SU-2025:4128-1","SUSE-SU-2025:4132-1","SUSE-SU-2025:4140-1","SUSE-SU-2025:4141-1","SUSE-SU-2025:4189-1","SUSE-SU-2025:4301-1","openSUSE-SU-2025:15671-1","openSUSE-SU-2025:20091-1","openSUSE-SU-2026:10301-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39997.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/353d8c715cc951a980728133c9dd64ca5a0a186c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/647d6b8d22be12842fde6ed0c56859ebc615f21e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9f2c0ac1423d5f267e7f1d1940780fc764b0fee3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/af600e7f5526d16146b3ae99f6ad57bfea79ca33"},{"type":"WEB","url":"https://git.kernel.org/stable/c/dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39997.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39997"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"647410a7da46067953a53c0d03f8680eff570959"},{"fixed":"dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"c611b9e55174e439dcd85a72969b43a95f3827a4"},{"fixed":"647d6b8d22be12842fde6ed0c56859ebc615f21e"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1"},{"fixed":"af600e7f5526d16146b3ae99f6ad57bfea79ca33"},{"fixed":"353d8c715cc951a980728133c9dd64ca5a0a186c"},{"fixed":"9f2c0ac1423d5f267e7f1d1940780fc764b0fee3"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0"},{"last_affected":"efaf61052b8ff9ee8968912fbaf02c2847c78ede"},{"last_affected":"62066758d2ae169278e5d6aea5995b1b6f6ddeb5"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39997.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.16.0"},{"fixed":"6.16.11"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.17.0"},{"fixed":"6.17.1"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39997.json"}}],"schema_version":"1.7.5"}