Re: [PATCH] hwmon: (gigabyte_waterforce) reject short input reports
From: Guenter Roeck
Date: Thu Sep 24 2026 - 12:38:45 EST
On Thu, Sep 24, 2026 at 11:11:32PM +0800, Jiale Yao wrote:
> The HID driver raw_event callback runs before HID core validates the
> received report length. waterforce_raw_event() reads the command bytes
> and then accesses fixed offsets for firmware or status data without any
> length checks. A truncated report can therefore cause out-of-bounds reads
> and update hwmon state with data beyond the received report.
>
> Require both command bytes before identifying a report, then check the
> minimum length needed by the firmware and status paths before accessing
> their payloads. Commit 47669bec44fe ("HID: asus: refactor the two
> workqueues and init sequence") added equivalent raw-event length
> validation to hid-asus.
Oh, and the reference to the other commit is pointless.
Guenter