USB: whiteheat: Added bounds checking for bulk command response
authorJames Forshaw <forshaw@google.com>
Sat, 23 Aug 2014 21:39:48 +0000 (14:39 -0700)
committerZefan Li <lizefan@huawei.com>
Thu, 25 Sep 2014 03:49:14 +0000 (11:49 +0800)
commit2f2c7048ff5a577ff268140e66ae26be69c808a7
tree6c2b9ab42c2064d16c8b1b1b6d96cf9ce969dc61
parent1d37c3ed4792831e34460bb6d7c6bfc388927941
USB: whiteheat: Added bounds checking for bulk command response

commit 6817ae225cd650fb1c3295d769298c38b1eba818 upstream.

This patch fixes a potential security issue in the whiteheat USB driver
which might allow a local attacker to cause kernel memory corrpution. This
is due to an unchecked memcpy into a fixed size buffer (of 64 bytes). On
EHCI and XHCI busses it's possible to craft responses greater than 64
bytes leading a buffer overflow.

Signed-off-by: James Forshaw <forshaw@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/usb/serial/whiteheat.c