Ad

CVE-2026-63896

NONE EPSS 0.17%
Обновлено 27 июля 2026
Linux
Параметр Значение
Поставщик Linux
Публичный эксплойт Нет

В ядре Linux устранена следующая уязвимость: usb: гаджет: составной: исправление целочисленного переполнения при обработке WebUSB GET_URL Обработчик WebUSB GET_URL в Composite_setup() сужается. Landing_page_length в соответствии с предоставленной хостом wLength, используя Landing_page_length = w_length - WEBUSB_URL_DESCRIPTOR_HEADER_LENGTH + Landing_page_offset; Если wLength меньше WEBUSB_URL_DESCRIPTOR_HEADER_LENGTH, переносы беззнакового вычитания и последующие memcpy(url_descriptor->URL, cdev->landing_page + Landing_page_offset, Landing_page_length - Landing_page_offset); заканчивается копированием байтов, близких к UINT_MAX, из cdev->landing_page в cdev->req->buf. KASAN сообщает о выходе плиты за пределы поля в Composite_setup при выделении гаджета kmalloc-2k, а FORTIFY_SOURCE перехватывает memcpy как запись по полю размером 4294967293 байта в url_descriptor->URL (размер 252). Хост USB может достичь этого из одного пакета SETUP против любого гаджет с параметром webusb/use=1 и настроенной целевой страницей.

Обработайте случай small-wLength перед математическими вычислениями: когда хост запросил меньше байтов, чем заголовок дескриптора URL, только заголовок имеет смысл, и байты URL-адреса не нужно копировать. Настройка значение Landing_page_length до Landing_page_offset превращает существующую memcpy в no-op и оставляет дескриптор, возвращаемый хосту, неизменным для всех большие значения wLength.

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

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: composite: fix integer underflow in WebUSB GET_URL handling The WebUSB GET_URL handler in composite_setup() narrows landing_page_length to fit the host-supplied wLength using landing_page_length = w_length - WEBUSB_URL_DESCRIPTOR_HEADER_LENGTH + landing_page_offset; If wLength is smaller than WEBUSB_URL_DESCRIPTOR_HEADER_LENGTH the unsigned subtraction wraps, and the subsequent memcpy(url_descriptor->URL, cdev->landing_page + landing_page_offset, landing_page_length - landing_page_offset); ends up copying close to UINT_MAX bytes from cdev->landing_page into cdev->req->buf. KASAN reports a slab-out-of-bounds in composite_setup on the kmalloc-2k gadget_info allocation, and FORTIFY_SOURCE traps the memcpy as a 4294967293-byte field-spanning write into url_descriptor->URL (size 252). A USB host can reach this from a single SETUP packet against any gadget that has webusb/use=1 and a landingPage configured. Handle the small-wLength case before the math: when the host requested fewer bytes than the URL descriptor header, only the header is meaningful and no URL bytes need to be copied. Setting landing_page_length to landing_page_offset makes the existing memcpy a no-op and leaves the descriptor returned to the host unchanged for all larger wLength values.