diff options
| author | Guenter Roeck <linux@roeck-us.net> | 2026-10-29 23:57:16 -0700 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-11-02 07:00:04 -0800 |
| commit | b7743c6dbe3ab94045164ef298f65cfb9b0b450a (patch) | |
| tree | 07869108c3b5f1a5fa40824b27322ae347d7cf85 /scripts/const_structs.checkpatch | |
| parent | 8c02722be2caa6604a837b81faeaba78250eda4a (diff) | |
hwmon: (aquacomputer_d5next) Check maxcollection when probing AQUAERO devices
When a USB HID device matching USB_PRODUCT_ID_AQUAERO presents a
malformed report descriptor, an out-of-bounds array access occurs in
aqc_probe() due to an unchecked index into the parsed collections array.
During device initialization, the driver distinguishes between the
multiple logical interfaces exposed by the Aquaero device by evaluating
the type of the second element in the collection array. The driver
unconditionally accesses hdev->collection[1] without verifying that
hdev->maxcollection is greater than 1. Because the collection array is
dynamically allocated by the HID core based on the number of collections
found in the report descriptor, a crafted device exposing fewer than two
collections causes an immediate heap out-of-bounds read or NULL pointer
dereference. This leads to a kernel panic during the device probe phase.
Add the missing check to fix the problem.
Fixes: 2c55211104b4 ("hwmon: (aquacomputer_d5next) Support sensors for Aquacomputer Aquaero")
Cc: stable@vger.kernel.org
Cc: Aleksa Savic <savicaleksa83@gmail.com>
Cc: Jack Doan <me@jackdoan.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions
