]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: LG: validate HID output report details
authorKees Cook <keescook@chromium.org>
Wed, 11 Sep 2013 19:56:54 +0000 (19:56 +0000)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 May 2014 05:53:28 +0000 (07:53 +0200)
commit36d004160cbbe860c42feb24b02905fd50621cf6
treee2310426bcc7b0803b14db2bef95d775fa8c1d4c
parentb7f1dbb911bfc70e750c02a573d7387e727224e6
HID: LG: validate HID output report details

commit 0fb6bd06e06792469acc15bbe427361b56ada528 upstream

A HID device could send a malicious output report that would cause the
lg, lg3, and lg4 HID drivers to write beyond the output report allocation
during an event, causing a heap overflow:

[  325.245240] usb 1-1: New USB device found, idVendor=046d, idProduct=c287
...
[  414.518960] BUG kmalloc-4096 (Not tainted): Redzone overwritten

Additionally, while lg2 did correctly validate the report details, it was
cleaned up and shortened.

CVE-2013-2893

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>
[jmm: backported to 2.6.32]
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/hid/hid-lg2ff.c
drivers/hid/hid-lgff.c