{"id":27202,"date":"2026-09-22T04:30:42","date_gmt":"2026-09-21T20:30:42","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-17050"},"modified":"2026-09-22T04:30:42","modified_gmt":"2026-09-21T20:30:42","slug":"cve-2026-17050","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-17050","title":{"rendered":"CVE-2026-17050 [MEDIUM] &#8211; The experimental USB host stack allocates a per-device configuration-descriptor buffer, ud"},"content":{"rendered":"<p>The experimental USB host stack allocates a per-device configuration-descriptor buffer, udev-&gt;cfg_desc, from the dedicated usb_device_heap in usbh_device_set_configuration() (subsys\/usb\/host\/usbh_device.c). On three failure paths \u2014 a failed full-length GET_DESCRIPTOR(CONFIGURATION) read, a mismatch between the short and full descriptor reads, and a rejected descriptor in parse_configuration_descriptor() \u2014 the buffer was released with k_heap_free() but the pointer was left dangling. The cleanup in usbh_device_free() is guarded only by if (udev-&gt;cfg_desc != NULL), so it frees the same block a second time.<\/p>\n<p>The path is driven entirely by the attached peripheral: usbh_device_connect() calls usbh_device_init(), which ends in usbh_device_set_configuration(), and on failure usbh_device_connect() calls usbh_device_free(). On v4.4.x this happens during the same enumeration, with no unplug required; on v4.1.0\u2013v4.3.x the second free instead arrives via dev_removed_handler()\/dev_connected_handler() in subsys\/usb\/host\/usbh_core.c, so it requires a removal or duplicate-connect event after the failed enumeration \u2014 a sequence the attached device fully controls. A malicious or malformed USB device only has to answer the first 9-byte configuration-descriptor request with a well-formed header and then fail any of the three checks, for example by returning a full descriptor whose interface count disagrees with bNumInterfaces, or by answering the second read with different bytes.<\/p>\n<p>The result is a double free on usb_device_heap. On builds where lib\/heap hardening is active (the current default CONFIG_SYS_HEAP_HARDENING_BASIC), sys_heap_free() detects the already-free chunk and calls k_panic(), giving a deterministic, peripheral-triggered denial of service of the USB host. On builds without that detection \u2014 earlier releases, or CONFIG_SYS_HEAP_HARDENING_NONE \u2014 the second free manipulates a chunk already on the free list, corrupting the heap&#8217;s free list so that later allocations can return overlapping or invalid blocks.<\/p>\n<p>Exploitation beyond denial of service is bounded by the fact that usb_device_heap is a small dedicated heap (CONFIG_USBH_USB_DEVICE_HEAP, default 1024 bytes) whose only client is this descriptor buffer, and by CONFIG_USB_HOST_STACK being marked experimental and disabled by default. The fix sets udev-&gt;cfg_desc = NULL after every k_heap_free(), making the cleanup guard sound.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The experimental USB host stack allocates a per-device configuration-descriptor buffer, udev-&gt;cfg_desc, from the dedicated usb_device_heap in usbh_device_set_configuration() (subsys\/usb\/host\/usbh_devi<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-27202","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/27202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}