CVE-2026-10663: Use-after-free / double-free of the root USB device in the experimental USB host stack
In Zephyr's experimental USB host stack (CONFIGUSBHOSTSTACK), usbhdevicedisconnect() (subsys/usb/host/usbhdevice.c) freed the root usbdevice slab object without clearing the cached pointer ctx->root. The bus removal handler devremovedhandler() (subsys/usb/host/usbhcore.c) decides what to tear down solely from ctx->root, checking only that it is non-NULL.
Because UHC controller drivers (e.g. uhcmax3421e, uhcmcuxcommon) synthesize UHCEVTDEVREMOVED directly from physical bus line state with no debounce or state guard, an attacker with physical USB access (or a rogue device that bounces its connection) can deliver a second device-removed event after a root device disconnect. The handler then re-enters usbhdevicedisconnect() with the dangling pointer, locking a mutex inside the freed object (use-after-free), removing the freed node from the device list, and calling kmemslabfree() on the already-freed block (double-free). If the slab block has been reissued to a newly attached device in between, this corrupts a live object.
Impact is denial of service (crash) and memory corruption; the attack vector is physical/local. The flaw was introduced in v4.4.0 by the connect/disconnect refactor and is fixed by clearing ctx->root in usbhdevicedisconnect() before freeing.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in v4.4.0Patch clearing ctx->root in usbh_device_disconnect() before freeing
Event History
Frequently Asked Questions
What is the severity of CVE-2026-10663?
The severity of CVE-2026-10663 is rated as medium, with a score of 6.1.
What type of vulnerability is CVE-2026-10663?
CVE-2026-10663 is classified as a use-after-free and double-free vulnerability.
How can I mitigate CVE-2026-10663?
To mitigate CVE-2026-10663, ensure you are using the latest version of the Zephyr Project that addresses this vulnerability.
What systems are affected by CVE-2026-10663?
CVE-2026-10663 affects systems utilizing the Zephyr Project with the experimental USB host stack enabled.
What are the potential impacts of CVE-2026-10663?
The potential impacts of CVE-2026-10663 include denial of service or arbitrary code execution due to improper memory management.