HID: intel-thc-hid: intel-quickspi: bound GET_REPORT response to the caller buffer
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.507.2.47.3In 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.
From the CVE record · Linux
The Linux kernel's intel-quickspi HID driver can copy a touch controller's GET_REPORT response beyond the caller's buffer. This can happen when a local caller requests a report through hidraw and the device returns more data than the requested buffer can hold; authentication requirements are not specified.
Engineers running Linux kernels with the intel-quickspi HID driver should check their systems; affected versions are not specified.