android_kernel_samsung_msm8976/drivers/usb/class
Marissa Wall f2fe8a544b BACKPORT: USB: core: harden cdc_parse_cdc_header
Andrey Konovalov reported a possible out-of-bounds problem for the
cdc_parse_cdc_header function.  He writes:
	It looks like cdc_parse_cdc_header() doesn't validate buflen
	before accessing buffer[1], buffer[2] and so on. The only check
	present is while (buflen > 0).

So fix this issue up by properly validating the buffer length matches
what the descriptor says it is.

(cherry picked from commit 2e1c42391ff2556387b3cb6308b24f6f65619feb)

(The original patch fixed the generic cdc_parser_cdc_header function.
That generic function did not exist in 3.10 but there are a couple
cdc parsers that suffer from the same underlying problem.)

Bug: 69052594
Change-Id: I75b16a1eaad8a06bd9ef1db66148f72e965a341f
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marissa Wall <marissaw@google.com>
2019-07-27 21:48:08 +02:00
..
ccid_bridge.c
cdc-acm.c BACKPORT: USB: core: harden cdc_parse_cdc_header 2019-07-27 21:48:08 +02:00
cdc-acm.h cdc-acm: fix wrong pipe type on rx interrupt xfers 2019-07-27 21:42:23 +02:00
cdc-wdm.c BACKPORT: USB: core: harden cdc_parse_cdc_header 2019-07-27 21:48:08 +02:00
Kconfig
Makefile
usblp.c usblp: do not set TASK_INTERRUPTIBLE before lock 2015-12-09 13:40:10 -05:00
usbtmc.c USB: usbtmc: add missing endpoint sanity check 2019-07-27 21:43:21 +02:00