В ядре Linux была устранена следующая уязвимость: HID: cp2112: проверка длины отчета об ответе The HID вызывает обратные вызовы raw_event перед проверкой длины отчета. cp2112_raw_event() считывает каждое поле ответа о состоянии передачи без проверки размера. Для ответа данных он считывает длину при смещении два и копирует, что многие байты от смещения три, опять же, не гарантируя, что входной отчет содержит их. Требуется полная структура статуса передачи.
Для ответов на данные сначала требуется заголовок, а затем убедитесь, что зажатая длина полезной нагрузки соответствует полученному отчету, прежде чем копировать его. Commit 47669bec44fe ("HID: asus: refactor the two workqueues and init sequence") added the same kind of raw_event length validation to hid-asus.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: HID: cp2112: validate response report lengths The HID core invokes raw_event callbacks before validating the report length. cp2112_raw_event() reads every field of a transfer status response without checking size. For a data response, it reads the length at offset two and copies that many bytes from offset three, again without ensuring that the input report contains them. Require a complete transfer status structure. For data responses, first require the header and then ensure the clamped payload length fits in the received report before copying it. Commit 47669bec44fe ("HID: asus: refactor the two workqueues and init sequence") added the same kind of raw_event length validation to hid-asus.