linux/include/uapi
Masakazu Mokuno 689ec8ef4a USB: core: Add type-specific length check of BOS descriptors
commit 81cf4a4536 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>
History 2018-03-03 15:51:36 +00:00
..
asm-generic fcntl: Don't use ambiguous SIG_POLL si_codes 2017-11-26 13:50:14 +00:00
drm xdrm/i915: Use two 32bit reads for select 64bit REG_READ ioctls 2015-08-11 09:57:37 +01:00
linux USB: core: Add type-specific length check of BOS descriptors 2018-03-03 15:51:36 +00:00
mtd mtd: lpddr: add driver for LPDDR2-NVM PCM memories 2014-05-20 17:45:17 -07:00
rdma RDMA/uapi: Include socket.h in rdma_user_cm.h 2014-09-17 09:22:17 -07:00
scsi FCoE Updates for 3.9 2013-03-01 09:10:08 +00:00
sound ALSA: compress: fix the struct alignment to 4 bytes 2014-06-23 12:15:33 +02:00
video UAPI: (Scripted) Disintegrate include/video 2012-12-20 17:14:26 +00:00
xen xen: install xen/gntdev.h and xen/gntalloc.h 2014-02-11 10:12:36 -05:00
Kbuild UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00