Re: [PATCH 0/2] Cover Letter: HID: drop assumptions on non-empty report lists

From: Jiri Kosina
Date: Tue Jan 17 2023 - 07:10:50 EST


On Mon, 16 Jan 2023, Pietro Borrello wrote:

> We found potential misuses of list_entry() on lists in hid driver
> code that are not checked.
> Issuing a list_entry() on an empty list causes a type confusion making
> the list_entry point to the list_head itself.
> The most impactful seems the missing check for an empty list in
> hid_validate_values() which is supposed to check the validity of the
> reports themselves, potentially affecting all the drivers that rely on it.

Both applied to hid.git#for-6.2/upstream-fixes. Thanks Pietro,

--
Jiri Kosina
SUSE Labs