{"id":"CVE-2025-40223","summary":"most: usb: Fix use-after-free in hdm_disconnect","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmost: usb: Fix use-after-free in hdm_disconnect\n\nhdm_disconnect() calls most_deregister_interface(), which eventually\nunregisters the MOST interface device with device_unregister(iface-\u003edev).\nIf that drops the last reference, the device core may call release_mdev()\nimmediately while hdm_disconnect() is still executing.\n\nThe old code also freed several mdev-owned allocations in\nhdm_disconnect() and then performed additional put_device() calls.\nDepending on refcount order, this could lead to use-after-free or\ndouble-free when release_mdev() ran (or when unregister paths also\nperformed puts).\n\nFix by moving the frees of mdev-owned allocations into release_mdev(),\nso they happen exactly once when the device is truly released, and by\ndropping the extra put_device() calls in hdm_disconnect() that are\nredundant after device_unregister() and most_deregister_interface().\n\nThis addresses the KASAN slab-use-after-free reported by syzbot in\nhdm_disconnect(). See report and stack traces in the bug link below.","modified":"2026-04-02T12:48:19.852218Z","published":"2025-12-04T15:31:15.158Z","related":["SUSE-SU-2026:0278-1","SUSE-SU-2026:0281-1","SUSE-SU-2026:0293-1","SUSE-SU-2026:0315-1","SUSE-SU-2026:20207-1","SUSE-SU-2026:20220-1","SUSE-SU-2026:20228-1","SUSE-SU-2026:20477-1","SUSE-SU-2026:20498-1","SUSE-SU-2026:20845-1","SUSE-SU-2026:20876-1","openSUSE-SU-2026:20145-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40223.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/33daf469f5294b9d07c4fc98216cace9f4f34cc6"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3a3b8e89c7201c5b3b76ac4a4069d1adde1477d6"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4b1270902609ef0d935ed2faa2ea6d122bd148f5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/578eb18cd111addec94c43f61cd4b4429e454809"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5b5c478f09b1b35e7fe6fc9a1786c9bf6030e831"},{"type":"WEB","url":"https://git.kernel.org/stable/c/72427dc6f87523995f4e6ae35a948bb2992cabce"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f93a84ffb884d761a9d4e869ba29c238711e81f1"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40223.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40223"},{"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":"97a6f772f36b7f52bcfa56a581bbd2470cffe23d"},{"fixed":"5b5c478f09b1b35e7fe6fc9a1786c9bf6030e831"},{"fixed":"578eb18cd111addec94c43f61cd4b4429e454809"},{"fixed":"33daf469f5294b9d07c4fc98216cace9f4f34cc6"},{"fixed":"72427dc6f87523995f4e6ae35a948bb2992cabce"},{"fixed":"f93a84ffb884d761a9d4e869ba29c238711e81f1"},{"fixed":"3a3b8e89c7201c5b3b76ac4a4069d1adde1477d6"},{"fixed":"4b1270902609ef0d935ed2faa2ea6d122bd148f5"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40223.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.9.0"},{"fixed":"5.10.246"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.196"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.158"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.115"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.56"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.17.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40223.json"}}],"schema_version":"1.7.5"}