linux/drivers/usb/core
Alan Stern 48a4ff1c7b USB: core: prevent malicious bNumInterfaces overflow
A malicious USB device with crafted descriptors can cause the kernel
to access unallocated memory by setting the bNumInterfaces value too
high in a configuration descriptor.  Although the value is adjusted
during parsing, this adjustment is skipped in one of the error return
paths.

This patch prevents the problem by setting bNumInterfaces to 0
initially.  The existing code already sets it to the proper value
after parsing is complete.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Andrey Konovalov <andreyknvl@google.com>
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13 12:28:43 +01:00
..
Kconfig
Makefile
buffer.c
config.c USB: core: prevent malicious bNumInterfaces overflow 2017-12-13 12:28:43 +01:00
devices.c
devio.c USB: usbfs: Filter flags passed in from user space 2017-11-28 15:17:48 +01:00
driver.c
endpoint.c
file.c
generic.c
hcd-pci.c
hcd.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
hub.c usb: hub: Cycle HUB power when initialization fails 2017-11-28 15:17:49 +01:00
hub.h
ledtrig-usbport.c
message.c
notify.c
of.c
otg_whitelist.h
port.c
quirks.c usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub 2017-11-28 15:17:49 +01:00
sysfs.c
urb.c
usb-acpi.c
usb.c
usb.h