HID: zeroplus: validate output report details
authorKees Cook <keescook@chromium.org>
Wed, 11 Sep 2013 19:56:51 +0000 (21:56 +0200)
committerBadhri Jagan Sridharan <Badhri@google.com>
Fri, 11 Jul 2014 20:53:33 +0000 (13:53 -0700)
commit728a564fa767d186ea1f95fbf81b43e9d865dc0b
treef18dbce165f14928d60078addbf3c6a4f6c666fa
parentb8b84374b4876b2a62187102392f72a8beaf217e
HID: zeroplus: validate output report details

The zeroplus HID driver was not checking the size of allocated values
in fields it used. A HID device could send a malicious output report
that would cause the driver to write beyond the output report allocation
during initialization, causing a heap overflow:

[ 1442.728680] usb 1-1: New USB device found, idVendor=0c12, idProduct=0005
...
[ 1466.243173] BUG kmalloc-192 (Tainted: G        W   ): Redzone overwritten

CVE-2013-2889

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-zpff.c