]> git.baikalelectronics.ru Git - kernel.git/commit
HID: core: prevent out-of-bound readings
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Tue, 19 Jan 2016 11:34:58 +0000 (12:34 +0100)
committerJiri Kosina <jkosina@suse.cz>
Tue, 19 Jan 2016 13:09:34 +0000 (14:09 +0100)
commit7248feb5da3d67a9ccfe16b837e34f7b38185252
tree4310293cab681fe0072c600d32c83ca061c18c01
parentb98762ec500780b2e637029f961812f16dc49743
HID: core: prevent out-of-bound readings

Plugging a Logitech DJ receiver with KASAN activated raises a bunch of
out-of-bound readings.

The fields are allocated up to MAX_USAGE, meaning that potentially, we do
not have enough fields to fit the incoming values.
Add checks and silence KASAN.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c