HID: hid-cypress: validate length of report
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jan 2017 14:33:36 +0000 (15:33 +0100)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:17:07 +0000 (13:17 +0000)
commit4c313647d3e1f032dd36c624e81d58aa823bb4c5
treea0185371340f2407f529321a4aa53aa315889ecd
parenta9607250a1f810d8eccbee32d68ac42e241bd176
HID: hid-cypress: validate length of report

commit 1ebb71143758f45dc0fa76e2f48429e13b16d110 upstream.

Make sure we have enough of a report structure to validate before
looking at it.

Reported-by: Benoit Camredon <benoit.camredon@airbus.com>
Tested-by: Benoit Camredon <benoit.camredon@airbus.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/hid/hid-cypress.c