linux/drivers/usb/core
Mathias Nyman 07b9f12864 USB: Fix off by one in type-specific length check of BOS SSP capability
USB 3.1 devices are not detected as 3.1 capable since 4.15-rc3 due to a
off by one in commit 81cf4a4536 ("USB: core: Add type-specific length
check of BOS descriptors")

It uses USB_DT_USB_SSP_CAP_SIZE() to get SSP capability size which takes
the zero based SSAC as argument, not the actual count of sublink speed
attributes.

USB3 spec 9.6.2.5 says "The number of Sublink Speed Attributes = SSAC + 1."

The type-specific length check patch was added to stable and needs to be
fixed there as well

Fixes: 81cf4a4536 ("USB: core: Add type-specific length check of BOS descriptors")
Cc: linux-stable <stable@vger.kernel.org>
CC: Masakazu Mokuno <masakazu.mokuno@gmail.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-19 11:40:54 +01:00
..
Kconfig docs-rst: fix usb cross-references 2017-04-11 14:41:29 -06:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
buffer.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
config.c USB: Fix off by one in type-specific length check of BOS SSP capability 2017-12-19 11:40:54 +01:00
devices.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
devio.c USB: usbfs: Filter flags passed in from user space 2017-11-28 15:17:48 +01:00
driver.c usb: core: introduce a new usb_get_std_status() helper 2017-11-07 15:47:19 +01:00
endpoint.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
file.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
generic.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
hcd-pci.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
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 USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
ledtrig-usbport.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
message.c usb: core: message: remember to reset 'ret' to 0 when necessary 2017-11-09 13:02:23 +01:00
notify.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
of.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
otg_whitelist.h USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
port.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
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 USB/PHY patches for 4.15-rc1 2017-11-13 21:14:07 -08:00
urb.c sound updates for 4.15-rc1 2017-11-14 18:01:46 -08:00
usb-acpi.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
usb.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
usb.h USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00