android_kernel_oneplus_msm8998/drivers/usb/wusbcore
Johan Hovold a7cb1fafe4 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-30 09:35:17 +02:00
..
cbaf.c
crypto.c wusb: delete double assignment 2014-09-23 22:03:54 -07:00
dev-sysfs.c wusb: replace memset by memzero_explicit 2014-12-02 16:15:02 -08:00
devconnect.c usb: hub: rename khubd to hub_wq in documentation and comments 2014-09-23 22:33:19 -07:00
Kconfig usb: wusbcore: USB_WUSB_CBAF depends on USB 2014-09-23 22:06:33 -07:00
Makefile
mmc.c usb: wusbcore: fix panic in wusbhc_chid_set 2014-04-24 12:45:41 -07:00
pal.c
reservation.c usb: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:38 -08:00
rh.c wusbcore: rh: use USB_DT_HUB 2015-04-03 19:03:15 +02:00
security.c wusb: replace memset by memzero_explicit 2014-12-02 16:15:02 -08:00
wa-hc.c USB: wusbcore: fix NULL-deref at probe 2017-03-30 09:35:17 +02:00
wa-hc.h usb: hub: rename khubd to hub_wq in documentation and comments 2014-09-23 22:33:19 -07:00
wa-nep.c USB: wusbcore: fix up coding style issues in wa-nep.c 2014-01-07 16:19:31 -08:00
wa-rpipe.c usb: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:38 -08:00
wa-xfer.c usb: wusbcore: skip done segs before completing aborted transfer 2014-09-23 22:06:59 -07:00
wusbhc.c usb: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:38 -08:00
wusbhc.h usb: wusbcore: fix device disconnect on rekey timeout 2014-09-23 22:06:59 -07:00