]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: sony: validate HID output report details
authorKees Cook <keescook@chromium.org>
Wed, 11 Sep 2013 19:56:52 +0000 (21:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Oct 2013 16:40:59 +0000 (09:40 -0700)
commit17ef9210ba84f30031dd9ee1536eebeeba767b9c
tree245103a37c9acb5339d8e10bff35ecf4e710eba0
parent8fbcdb237b5020cbe3cf9582b838898f6028dea3
HID: sony: validate HID output report details

commit 9446edb9a1740989cf6c20daf7510fb9a23be14a upstream.

This driver must validate the availability of the HID output report and
its size before it can write LED states via buzz_set_leds(). This stops
a heap overflow that is possible if a device provides a malicious HID
output report:

[  108.171280] usb 1-1: New USB device found, idVendor=054c, idProduct=0002
...
[  117.507877] BUG kmalloc-192 (Not tainted): Redzone overwritten

CVE-2013-2890

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-sony.c