В ядре Linux устранена следующая уязвимость:
HID: intel-thc-hid: intel-quickspi: привязан ответ GET_REPORT к буферу вызывающего абонента
Quickspi_hid_raw_request() получает длину буфера вызывающего объекта в len, но
Quickspi_get_report() никогда не видит его и копирует весь предоставленный устройством
ответ в buf независимо:
memcpy(buf, qsdev->report_buf, qsdev->report_len);
qsdev->report_len берется из входного отчета, который возвращает сенсорный контроллер,
в то время как размер buf соответствует тому, что вызывающий абонент запросил у hidraw через
HIDIOCGFEATURE или HIDIOCGINPUT. Ответ большего размера переполняет buf
с контентом, управляемым устройством. Родственный брат Intel-quicki2c уже передает длину вызывающего абонента до
fasti2c_get_report() и проверяет ответ на него перед
копия.
Сделайте то же самое здесь.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: HID: intel-thc-hid: intel-quickspi: bound GET_REPORT response to the caller buffer quickspi_hid_raw_request() receives the caller's buffer length in len, but quickspi_get_report() never sees it and copies the whole device-supplied response into buf regardless: memcpy(buf, qsdev->report_buf, qsdev->report_len); qsdev->report_len comes from the input report the touch controller returns, while buf is sized to whatever the caller asked hidraw for through HIDIOCGFEATURE or HIDIOCGINPUT. A response larger than that overflows buf with device-controlled content. The intel-quicki2c sibling already passes the caller length down to quicki2c_get_report() and validates the response against it before the copy. Do the same here.
Характеристики атаки
Последствия
Строка CVSS v3.1