CVE-2025-40223
most: usb: Fix use-after-free in hdm_disconnect
Mitigation
- Upgrade Linux to 4b1270902609ef0d935ed2faa2ea6d122bd148f5 or later.
Who should check
- Anyone running Linux >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 5b5c478f09b1b35e7fe6fc9a1786c9bf6030e831; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 578eb18cd111addec94c43f61cd4b4429e454809; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 33daf469f5294b9d07c4fc98216cace9f4f34cc6; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 72427dc6f87523995f4e6ae35a948bb2992cabce; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < f93a84ffb884d761a9d4e869ba29c238711e81f1; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 3a3b8e89c7201c5b3b76ac4a4069d1adde1477d6; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 4b1270902609ef0d935ed2faa2ea6d122bd148f5
- Anyone running Linux 5.9
Vulnerability facts
- Affected
- Linux >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 5b5c478f09b1b35e7fe6fc9a1786c9bf6030e831; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 578eb18cd111addec94c43f61cd4b4429e454809; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 33daf469f5294b9d07c4fc98216cace9f4f34cc6; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 72427dc6f87523995f4e6ae35a948bb2992cabce; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < f93a84ffb884d761a9d4e869ba29c238711e81f1; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 3a3b8e89c7201c5b3b76ac4a4069d1adde1477d6; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 4b1270902609ef0d935ed2faa2ea6d122bd148f5; Linux 5.9
- Fixed in
- Linux 5b5c478f09b1b35e7fe6fc9a1786c9bf6030e831, Linux 578eb18cd111addec94c43f61cd4b4429e454809, Linux 33daf469f5294b9d07c4fc98216cace9f4f34cc6, Linux 72427dc6f87523995f4e6ae35a948bb2992cabce, Linux 3a3b8e89c7201c5b3b76ac4a4069d1adde1477d6, Linux 4b1270902609ef0d935ed2faa2ea6d122bd148f5
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Unknown
- CVSS
- Not scored yet
- EPSS
- 0.29% chance of exploitation in 30 days (percentile 14, 2026-11-26)
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: most: usb: Fix use-after-free in hdm_disconnect hdm_disconnect() calls most_deregister_interface(), which eventually unregisters the MOST interface device with device_unregister(iface->dev). If that drops the last reference, the device core may call release_mdev() immediately while hdm_disconnect() is still executing. The old code also freed several mdev-owned allocations in hdm_disconnect() and then performed additional put_device() calls. Depending on refcount order, this could lead to use-after-free or double-free when release_mdev() ran (or when unregister paths also performed puts). Fix by moving the frees of mdev-owned allocations into release_mdev(), so they happen exactly once when the device is truly released, and by dropping the extra put_device() calls in hdm_disconnect() that are redundant after device_unregister() and most_deregister_interface(). This addresses the KASAN slab-use-after-free reported by syzbot in hdm_disconnect(). See report and stack traces in the bug link below.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 5b5c478f09b1b35e7fe6fc9a1786c9bf6030e831; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 578eb18cd111addec94c43f61cd4b4429e454809; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 33daf469f5294b9d07c4fc98216cace9f4f34cc6; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 72427dc6f87523995f4e6ae35a948bb2992cabce; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < f93a84ffb884d761a9d4e869ba29c238711e81f1; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 3a3b8e89c7201c5b3b76ac4a4069d1adde1477d6; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 4b1270902609ef0d935ed2faa2ea6d122bd148f5 | — | cvelist |
| Linux | 5.9 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-40223. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-40223.md Affected: Linux >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 5b5c478f09b1b35e7fe6fc9a1786c9bf6030e831; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 578eb18cd111addec94c43f61cd4b4429e454809; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 33daf469f5294b9d07c4fc98216cace9f4f34cc6; >= 97a6f772f36b7f52bcfa56a… Fixed in: Linux 5b5c478f09b1b35e7fe6fc9a1786c9bf6030e831, Linux 578eb18cd111addec94c43f61cd4b4429e454809, Linux 33daf469f5294b9d07c4fc98216cace9f4f34cc6, Linux 72427dc6f87523995f4e6ae35a948bb2992cabce, Linux 3a3b8e89c7201c5b3b76ac4a4069d1adde1477d6, Linux 4b1270902609ef0d935ed2faa2ea6d122bd148f5 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.
References
Other
- https://git.kernel.org/stable/c/5b5c478f09b1b35e7fe6fc9a1786c9bf6030e831
- https://git.kernel.org/stable/c/578eb18cd111addec94c43f61cd4b4429e454809
- https://git.kernel.org/stable/c/33daf469f5294b9d07c4fc98216cace9f4f34cc6
- https://git.kernel.org/stable/c/72427dc6f87523995f4e6ae35a948bb2992cabce
- https://git.kernel.org/stable/c/f93a84ffb884d761a9d4e869ba29c238711e81f1
- https://git.kernel.org/stable/c/3a3b8e89c7201c5b3b76ac4a4069d1adde1477d6
- https://git.kernel.org/stable/c/4b1270902609ef0d935ed2faa2ea6d122bd148f5
FAQ
Is CVE-2025-40223 being exploited?
There is no confirmed exploitation: CVE-2025-40223 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-40223?
It has no CVSS score yet. Unknown.
Which versions are affected by CVE-2025-40223?
Linux >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 5b5c478f09b1b35e7fe6fc9a1786c9bf6030e831; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 578eb18cd111addec94c43f61cd4b4429e454809; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 33daf469f5294b9d07c4fc98216cace9f4f34cc6; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 72427dc6f87523995f4e6ae35a948bb2992cabce; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < f93a84ffb884d761a9d4e869ba29c238711e81f1; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 3a3b8e89c7201c5b3b76ac4a4069d1adde1477d6; >= 97a6f772f36b7f52bcfa56a581bbd2470cffe23d, < 4b1270902609ef0d935ed2faa2ea6d122bd148f5; Linux 5.9.
Is there a fix for CVE-2025-40223?
Yes. Fixed in Linux 5b5c478f09b1b35e7fe6fc9a1786c9bf6030e831, Linux 578eb18cd111addec94c43f61cd4b4429e454809, Linux 33daf469f5294b9d07c4fc98216cace9f4f34cc6, Linux 72427dc6f87523995f4e6ae35a948bb2992cabce, Linux 3a3b8e89c7201c5b3b76ac4a4069d1adde1477d6, Linux 4b1270902609ef0d935ed2faa2ea6d122bd148f5. Upgrade Linux to 4b1270902609ef0d935ed2faa2ea6d122bd148f5 or later.
How do I check if I'm affected by CVE-2025-40223?
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.