linux/drivers/usb/core
Sean O. Stalley e57e780b34 usb: rh_call_control tbuf overflow fix
rh_call_control() contains a buffer, tbuf, which it uses to hold
USB descriptors. These discriptors are eventually copied into the
transfer_buffer in the URB. The buffer in the URB is dynamically
defined and is always large enough to hold the amount of data it
requests.

tbuf is currently statically allocated on the stack with a size
of 15 bytes, regardless of the size specified in the URB.
This patch dynamically allocates tbuf, and ensures that tbuf is
at least as big as the buffer in the URB.

If an hcd attempts to write a descriptor containing more than
15 bytes ( such as the Standard BOS Descriptor for hubs, defined
in the USB3.0 Spec, section 10.13.1 ) the write would overflow
the buffer and corrupt the stack. This patch addresses this
behavior.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sean O. Stalley <sean.stalley@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-14 12:18:26 -07:00
..
buffer.c usb: fix some scripts/kernel-doc warnings 2013-08-03 11:30:14 +08:00
config.c usb: config->desc.bLength may not exceed amount of data returned by the device 2013-08-12 12:24:27 -07:00
devices.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
devio.c usbfs: Allow printer class 'get_device_id' without needing to claim the intf 2013-07-25 12:01:12 -07:00
driver.c usb: fix some scripts/kernel-doc warnings 2013-08-03 11:30:14 +08:00
endpoint.c USB: remove unneeded idr.h include 2013-07-24 14:43:05 -07:00
file.c usb: fix some scripts/kernel-doc warnings 2013-08-03 11:30:14 +08:00
generic.c USB: avoid error messages when a device is disconnected 2013-03-28 11:05:52 -07:00
hcd-pci.c usb: fix some scripts/kernel-doc warnings 2013-08-03 11:30:14 +08:00
hcd.c usb: rh_call_control tbuf overflow fix 2013-08-14 12:18:26 -07:00
hub.c usb: fix some scripts/kernel-doc warnings 2013-08-03 11:30:14 +08:00
hub.h USB: global suspend and remote wakeup don't mix 2013-07-16 15:33:02 -07:00
Kconfig USB: remove remaining instances of USB_SUSPEND 2013-05-15 13:44:44 -04:00
Makefile usb: Add driver/usb/core/(port.c,hub.h) files 2013-01-18 15:49:00 -08:00
message.c usb: fix some scripts/kernel-doc warnings 2013-08-03 11:30:14 +08:00
notify.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
otg_whitelist.h
port.c Power management and ACPI updates for 3.11-rc1 2013-07-03 14:35:40 -07:00
quirks.c USB: reset resume quirk needed by a hub 2013-05-16 17:28:28 -07:00
sysfs.c usb: add usb2 Link PM variables to sysfs and usb_device 2013-06-05 16:48:40 -07:00
urb.c USB: introduce usb_device_no_sg_constraint() helper 2013-08-12 11:56:16 -07:00
usb-acpi.c usb/acpi: binding xhci root hub usb port with ACPI 2013-03-25 10:39:17 -07:00
usb.c usb: fix some scripts/kernel-doc warnings 2013-08-03 11:30:14 +08:00
usb.h USB: remove CONFIG_USB_SUSPEND option 2013-03-28 11:10:22 -07:00