Re: [PATCH v3] HID: intel-thc-hid: intel-quickspi: validate GET REPORT response size

From: Jiri Kosina

Date: Thu Nov 19 2026 - 16:45:42 EST


On Wed, 28 Oct 2026, Even Xu wrote:

> From: HyeongJun An <sammiee5311@xxxxxxxxx>
>
> quickspi_handle_input_data() copies GET_FEATURE and
> GET_INPUT_REPORT responses into qsdev->report_buf. The response length
> is derived from data supplied by the controller, but was not checked
> against the destination buffer size.
>
> Adjust qsdev->report_buf_size to store the data length of report buffer,
> reject responses that exceed it before copying. This prevents an
> oversized response from overflowing report_buf. The rejected response
> does not complete the GET REPORT request, so quickspi_get_report()
> follows its existing timeout path.
>
> Fixes: 9d8d51735a3a ("HID: intel-thc-hid: intel-quickspi: Add HIDSPI protocol implementation")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: HyeongJun An <sammiee5311@xxxxxxxxx>
> Signed-off-by: Even Xu <even.xu@xxxxxxxxx>
> Tested-by: Rui Zhang <rui1.zhang@xxxxxxxxx>
> ---
> Change log:
> V3:
> - Correct the data size used in the get report check

Applied, thanks.

--
Jiri Kosina
SUSE Labs