USB: usb_driver_claim_interface: add sanity checking
authorOliver Neukum <oneukum@suse.com>
Wed, 16 Mar 2016 12:26:17 +0000 (13:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Jun 2016 08:42:45 +0000 (10:42 +0200)
commit1b282e30c7e0ee96c89de0faa6cb5e4e6be45e7b
tree9503b39a3e78d3dd709debeb6b4f076811128431
parent28fa0e461bedf9c74932a9fca4b0be9eb440312d
USB: usb_driver_claim_interface: add sanity checking

commit 0b818e3956fc1ad976bee791eadcbb3b5fec5bfd upstream.

Attacks that trick drivers into passing a NULL pointer
to usb_driver_claim_interface() using forged descriptors are
known. This thwarts them by sanity checking.

Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/usb/core/driver.c