HID: lenovo-tpkbd: validate output report details
authorKees Cook <keescook@chromium.org>
Wed, 11 Sep 2013 19:56:55 +0000 (21:56 +0200)
committerBadhri Jagan Sridharan <Badhri@google.com>
Fri, 11 Jul 2014 21:04:08 +0000 (14:04 -0700)
commit255b0df27b1f2b590226f29a78169cc529e74cf0
treeed44e87fcada99242236ff904f890da2c46d1cdf
parentd87aff426add54f65131d450a06db618742a7dfe
HID: lenovo-tpkbd: validate output report details

A HID device could send a malicious output report that would cause the
lenovo-tpkbd HID driver to write just beyond the output report allocation
during initialization, causing a heap overflow:

[   76.109807] usb 1-1: New USB device found, idVendor=17ef, idProduct=6009
...
[   80.462540] BUG kmalloc-192 (Tainted: G        W   ): Redzone overwritten

CVE-2013-2894

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