USB: usb_driver_claim_interface: add sanity checking

[ Upstream commit 0b818e3956 ]

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: Sasha Levin <sasha.levin@oracle.com>
This commit is contained in:
Oliver Neukum 2016-03-16 13:26:17 +01:00 • committed by Sasha Levin
commit febfaffe4a