linux/drivers/usb/core
Johan Hovold c67e87a22d USB: hub: fix non-SS hub-descriptor handling
commit bec444cd1c upstream.

Add missing sanity check on the non-SuperSpeed hub-descriptor length in
order to avoid parsing and leaking two bytes of uninitialised slab data
through sysfs removable-attributes (or a compound-device debug
statement).

Note that we only make sure that the DeviceRemovable field is always
present (and specifically ignore the unused PortPwrCtrlMask field) in
order to continue support any hubs with non-compliant descriptors. As a
further safeguard, the descriptor buffer is also cleared.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-05-25 15:44:41 +02:00
..
buffer.c usb: core: buffer: avoid NULL pointer dereferrence 2016-04-28 12:35:36 -07:00
config.c usb-core: Add LINEAR_FRAME_INTR_BINTERVAL USB quirk 2017-03-30 09:41:24 +02:00
devices.c usb: core: rename mutex usb_bus_list_lock to usb_bus_idr_lock 2016-02-06 21:55:57 -08:00
devio.c USB: core: replace %p with %pK 2017-05-25 15:44:30 +02:00
driver.c usb: hub: Do not attempt to autosuspend disconnected devices 2017-05-20 14:28:36 +02:00
endpoint.c usb: endpoint: convert spaces to tabs 2015-08-14 16:50:36 -07:00
file.c USB: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously 2017-05-20 14:28:34 +02:00
generic.c staging: usbip: convert usbip-host driver to usb_device_driver 2014-02-07 10:54:30 -08:00
hcd-pci.c usb: hcd: out of bounds access in for_each_companion 2016-04-13 12:06:18 -07:00
hcd.c USB: core: replace %p with %pK 2017-05-25 15:44:30 +02:00
hub.c USB: hub: fix non-SS hub-descriptor handling 2017-05-25 15:44:41 +02:00
hub.h usb: Support USB 3.1 extended port status request 2016-01-24 20:16:52 -08:00
Kconfig usb: core: Introduce a USB port LED trigger 2016-09-27 12:20:17 +02:00
ledtrig-usbport.c usb: core: usbport: Use proper LED API to fix potential crash 2017-01-06 10:40:11 +01:00
Makefile usb: core: Introduce a USB port LED trigger 2016-09-27 12:20:17 +02:00
message.c usb: core: setup dma_pfn_offset for USB devices and, interfaces 2016-09-13 17:25:35 +02:00
notify.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
of.c usb: core: of.c: fix defined but not declare warning 2016-08-09 16:16:13 +02:00
otg_whitelist.h usb: core: use IS_ENABLED() instead of checking for built-in or module 2016-09-02 14:36:33 +02:00
port.c Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping" 2016-05-02 08:44:31 -07:00
quirks.c usb-core: Add LINEAR_FRAME_INTR_BINTERVAL USB quirk 2017-03-30 09:41:24 +02:00
sysfs.c usb: no locking for reading descriptors in sysfs 2016-02-03 13:29:12 -08:00
urb.c USB: core: replace %p with %pK 2017-05-25 15:44:30 +02:00
usb-acpi.c usb: find internal hub tier mismatch via acpi 2014-05-27 16:38:52 -07:00
usb.c usb: core: setup dma_pfn_offset for USB devices and, interfaces 2016-09-13 17:25:35 +02:00
usb.h usb: define USB_SPEED_SUPER_PLUS speed for SuperSpeedPlus USB3.1 devices 2016-01-24 20:16:52 -08:00