HID: hid-cypress: validate length of report 06/155206/1
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jan 2017 14:33:36 +0000 (15:33 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 12 Oct 2017 09:29:22 +0000 (18:29 +0900)
commit8699667a7aef23746a8e455f18201dfc64b7a2f8
tree374a7bc933c538692274c6a7edb3725fb9d73854
parentdaf4044bbb0ec0275b650406d0f81807da3c1c40
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>
[sw0312.kim: cherry-pick from linux-3.10.y to fix CVE-2017-7273]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I09185d0aef09cbb8d052bf906695dae01f45a90e
drivers/hid/hid-cypress.c