Ad

CVE-2026-90587

MEDIUM CVSS 3.1: 4,6 EPSS 0.27%
Обновлено 12 ноября 2026
usbh_device_init
Параметр Значение
CVSS 4,6 (MEDIUM)
Тип уязвимости CWE-476 (Разыменование нулевого указателя)
Поставщик usbh_device_init
Публичный эксплойт Нет

usbh_device_init() в subsys/usb/host/usbh_device.c отклоняет устройство, дескриптор устройства которого рекламирует bNumConfigurations 0, но он только регистрирует ошибку и переходит на метку очистки, не устанавливая код возврата. В этот момент локальная ошибка все еще равна 0 от предыдущего успешного чтения дескриптора, поэтому функция возвращает успех при пропуске usbh_device_set_configuration () — единственное место, где выделен udev->cfg_desc. The device structure is zero-initialised by usbh_device_alloc(), so udev->cfg_desc remains NULL. usbh_device_connect() treats the zero return as a successful enumeration and calls usbh_class_probe_device(), which starts its descriptor walk from udev->cfg_desc. usbh_desc_get_next_function() passes that NULL pointer to usbh_desc_is_valid(), whose only guard compares the caller-supplied size, so head->bLength is read through a NULL pointer.

Условие запускается полностью подключенным периферийным устройством: подключение устройства USB (или любого гаджета USB, эмулирующего один), который сообщает, что bNumConfigurations 0 достигает дефекта непосредственно от обработчика событий UHC_EVT_DEV_CONNECTED_FS/_HS в subsys/usb/host/usbh_core.c, без аутентификации и взаимодействия с пользователем, кроме физического вложения. На объектах, где нулевая страница не отображается или включен CONFIG_NULL_POINTER_EXCEPTION_DETECTION, это вызывает фатальное исключение в потоке хоста USB, отказывая в обслуживании хосту. Там, где адрес ноль читается, дескриптор вместо этого анализирует низкую память как цепь дескриптора и может отправить зонд класса () с значениями, на которые влияют злоумышленники, что приводит к дальнейшему чтению out-of-bounds через все еще NULL udev->cfg_desc в usbh_desc_get_iface ().

Запись, контролируемая злоумышленником, не была идентифицирована, поэтому влияние заключается в доступности плюс ограниченное чтение out-of-bounds. Отметим, что CONFIG_USB_HOST_STACK маркируется как экспериментальный.

Показать оригинальное описание (EN)

usbh_device_init() in subsys/usb/host/usbh_device.c rejects a device whose device descriptor advertises bNumConfigurations == 0, but it only logs the error and jumps to the cleanup label without setting the return code. At that point the local err is still 0 from the preceding successful descriptor read, so the function returns success while having skipped usbh_device_set_configuration() — the only place udev->cfg_desc is allocated. The device structure is zero-initialised by usbh_device_alloc(), so udev->cfg_desc remains NULL. usbh_device_connect() treats the zero return as a successful enumeration and calls usbh_class_probe_device(), which starts its descriptor walk from udev->cfg_desc. usbh_desc_get_next_function() passes that NULL pointer to usbh_desc_is_valid(), whose only guard compares the caller-supplied size, so head->bLength is read through a NULL pointer. The condition is triggered entirely by the attached peripheral: attaching a USB device (or any USB gadget emulating one) that reports bNumConfigurations = 0 reaches the defect directly from the UHC_EVT_DEV_CONNECTED_FS/_HS event handler in subsys/usb/host/usbh_core.c, with no authentication and no user interaction beyond the physical attachment. On targets where page zero is unmapped or CONFIG_NULL_POINTER_EXCEPTION_DETECTION is enabled this raises a fatal exception in the USB host thread, denying service to the host. Where address zero is readable, the descriptor walker instead parses low memory as a descriptor chain and can dispatch a class probe() with attacker-influenced values, causing further out-of-bounds reads through the still-NULL udev->cfg_desc in usbh_desc_get_iface(). No attacker-controlled write was identified, so the impact is availability plus a bounded out-of-bounds read. Note that CONFIG_USB_HOST_STACK is marked experimental.

Характеристики атаки

Способ атаки
Физический
Нужен физический доступ
Сложность
Низкая
Легко эксплуатировать
Нужны права
Не требуются
Права не нужны
Участие пользователя
Не требуется
Не нужно действие пользователя

Последствия

Конфиденциальность
Нет
Нет утечки данных
Целостность
Нет
Нет модификации данных
Доступность
Высокое
Полный отказ в обслуживании

Строка CVSS v3.1