linux_dsm_epyc7002/drivers/usb/misc
Dan Carpenter cb84f56861 usb: misc: usbtest: Fix overflow in usbtest_do_ioctl()
There used to be a test against "if (param->sglen > MAX_SGLEN)" but it
was removed during a refactor.  It leads to an integer overflow and a
stack overflow in test_queue() if we try to create a too large urbs[]
array on the stack.

There is a second integer overflow in test_queue() as well if
"param->iterations" is too high.  I don't immediately see that it's
harmful but I've added a check to prevent it and silence the static
checker warning.

Fixes: 18fc4ebdc7 ("usb: misc: usbtest: Remove timeval usage")
Acked-by: Deepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-10-11 13:14:09 +03:00
..
sisusbvga usb: misc: sisusbvga: compress return logic into one line 2017-07-17 13:13:44 +02:00
adutux.c USB: misc: remove unneeded MODULE_VERSION() usage 2017-07-22 15:56:52 +02:00
appledisplay.c USB: appledisplay: refactor endpoint retrieval 2017-03-23 13:53:16 +01:00
chaoskey.c USB: misc: remove unneeded MODULE_VERSION() usage 2017-07-22 15:56:52 +02:00
cypress_cy7c63.c usb: misc: cypress_cy7c63: don't print on ENOMEM 2016-08-30 19:17:37 +02:00
cytherm.c USB: misc: remove unneeded MODULE_VERSION() usage 2017-07-22 15:56:52 +02:00
ehset.c usb: ehci: Add support for SINGLE_STEP_SET_FEATURE test of EHSET 2013-08-12 13:13:32 -07:00
emi26.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
emi62.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
ezusb.c ezusb: constify local structures 2016-09-13 17:24:24 +02:00
ftdi-elan.c usb: misc: ftdi-elan: fix duplicated code for different branches 2017-08-28 11:17:58 +02:00
idmouse.c USB: misc: remove unneeded MODULE_VERSION() usage 2017-07-22 15:56:52 +02:00
iowarrior.c USB: misc: remove unneeded MODULE_VERSION() usage 2017-07-22 15:56:52 +02:00
isight_firmware.c Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2012-01-09 12:09:47 -08:00
Kconfig usb: typec: ucsi: Add ACPI driver 2017-06-27 17:55:45 +02:00
ldusb.c USB: misc: remove unneeded MODULE_VERSION() usage 2017-07-22 15:56:52 +02:00
legousbtower.c USB: misc: remove unneeded MODULE_VERSION() usage 2017-07-22 15:56:52 +02:00
lvstest.c usb: misc: lvstest: add entry to place port in compliance mode 2017-08-28 11:43:39 +02:00
Makefile usb: typec: ucsi: Add ACPI driver 2017-06-27 17:55:45 +02:00
rio500_usb.h
rio500.c USB: misc: remove unneeded MODULE_VERSION() usage 2017-07-22 15:56:52 +02:00
trancevibrator.c USB: misc: remove unneeded MODULE_VERSION() usage 2017-07-22 15:56:52 +02:00
usb251xb.c USB: misc: remove unneeded MODULE_VERSION() usage 2017-07-22 15:56:52 +02:00
usb3503.c usb: misc: usb3503: Clean up on driver unbind 2016-06-07 22:19:59 -07:00
usb4604.c usb: misc: Add driver for usb4604 2016-08-09 15:49:01 +02:00
usb_u132.h
usblcd.c USB: usblcd: refactor endpoint retrieval 2017-03-23 13:54:03 +01:00
usbsevseg.c usb: usbsevseg: constify attribute_group structures. 2017-08-10 11:31:27 -07:00
usbtest.c usb: misc: usbtest: Fix overflow in usbtest_do_ioctl() 2017-10-11 13:14:09 +03:00
uss720.c USB: misc: remove unneeded MODULE_VERSION() usage 2017-07-22 15:56:52 +02:00
yurex.c USB: yurex: refactor endpoint retrieval 2017-03-23 13:54:03 +01:00