android_kernel_samsung_msm8976/include/uapi
Masakazu Mokuno ded0acf2fb USB: core: Add type-specific length check of BOS descriptors
commit 81cf4a45360f70528f1f64ba018d61cb5767249a upstream.

As most of BOS descriptors are longer in length than their header
'struct usb_dev_cap_header', comparing solely with it is not sufficient
to avoid out-of-bounds access to BOS descriptors.

This patch adds descriptor type specific length check in
usb_get_bos_descriptor() to fix the issue.

Signed-off-by: Masakazu Mokuno <masakazu.mokuno@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.16: drop handling of USB_PTM_CAP_TYPE and USB_SSP_CAP_TYPE]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 21:46:13 +02:00
..
asm-generic allow O_TMPFILE to work with O_WRONLY 2018-12-03 11:52:37 +01:00
drm
linux USB: core: Add type-specific length check of BOS descriptors 2019-07-27 21:46:13 +02:00
media Import latest Samsung release 2017-04-18 03:43:52 +02:00
mtd
rdma
scsi BACKPORT: sg: relax 16 byte cdb restriction 2017-04-22 23:03:02 +02:00
sound ASoC: wcd9335: Add support to enable vbat feature 2015-08-14 06:25:40 -07:00
video
xen
Kbuild