USB: usb_driver_claim_interface: add sanity checking
commit81a64abca5641a3cc9be841d745f1969c3aa89d1
authorOliver Neukum <oneukum@suse.com>
Wed, 16 Mar 2016 12:26:17 +0000 (16 13:26 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 30 Apr 2016 22:06:01 +0000 (1 00:06 +0200)
treeeac00e269b775eb68d49bfa5cf73cef7ff424e4c
parent0a72e1257a495f8f9cbe849cc5f49a8b5741f4b1
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/core/driver.c