android_kernel_lge_bullhead/drivers/usb/wusbcore
Johan Hovold 626f2770d9 USB: wusbcore: fix NULL-deref at probe
commit 03ace948a4eb89d1cf51c06afdfc41ebca5fdb27 upstream.

Make sure to check the number of endpoints to avoid dereferencing a
NULL-pointer or accessing memory beyond the endpoint array should a
malicious device lack the expected endpoints.

This specifically fixes the NULL-pointer dereference when probing HWA HC
devices.

Fixes: df3654236e ("wusb: add the Wire Adapter (WA) core")
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Cc: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2017-06-08 00:47:05 +02:00
..
Kconfig USB: regroup all depends on USB within an if USB block 2013-04-09 16:49:07 -07:00
Makefile usb: makefile cleanup 2010-10-22 10:22:07 -07:00
cbaf.c USB: convert drivers/usb/* to use module_usb_driver() 2011-11-18 09:34:02 -08:00
crypto.c Fix common misspellings 2011-03-31 11:26:23 -03:00
dev-sysfs.c uwb: use dev_dbg() for debug messages 2008-12-22 18:22:50 +00:00
devconnect.c WUSB: remove an unnused variable 2012-10-22 11:33:34 -07:00
mmc.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
pal.c uwb: add basic radio manager 2008-11-19 14:46:33 +00:00
reservation.c Fix common misspellings 2011-03-31 11:26:23 -03:00
rh.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
security.c wusb: Fix potential memory leak in wusb_dev_sec_add() 2012-08-10 12:06:38 -07:00
wa-hc.c USB: wusbcore: fix NULL-deref at probe 2017-06-08 00:47:05 +02:00
wa-hc.h trivial: fix typos "man[ae]g?ment" -> "management" 2009-09-21 15:14:56 +02:00
wa-nep.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wa-rpipe.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
wa-xfer.c wusbcore: fix kernel panic when disconnecting a wireless USB->serial device 2013-08-20 08:43:05 -07:00
wusbhc.c wusb: fix find_first_zero_bit() return value check 2011-03-02 19:52:28 -05:00
wusbhc.h Fix common misspellings 2011-03-31 11:26:23 -03:00