* [3/4] usb: Remove stack VLA usage
@ 2018-03-09 5:55 Tobin C. Harding
0 siblings, 0 replies; 2+ messages in thread
From: Tobin C. Harding @ 2018-03-09 5:55 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Tobin C. Harding, kernel-hardening, linux-kernel, linux-usb,
Tycho Andersen, Kees Cook, Felipe Balbi, Alan Stern
Signed-off-by: Tobin C. Harding <me@tobin.cc>
---
drivers/usb/misc/usbtest.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index 90028ef541e3..9e1142b8b91b 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -2028,11 +2028,14 @@ test_queue(struct usbtest_dev *dev, struct usbtest_param_32 *param,
unsigned i;
unsigned long packets = 0;
int status = 0;
- struct urb *urbs[param->sglen];
+ struct urb *urbs[MAX_SGLEN];
if (!param->sglen || param->iterations > UINT_MAX / param->sglen)
return -EINVAL;
+ if (param->sglen > MAX_SGLEN)
+ return -EINVAL;
+
memset(&context, 0, sizeof(context));
context.count = param->iterations * param->sglen;
context.dev = dev;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [3/4] usb: Remove stack VLA usage
@ 2018-03-09 6:05 Tobin C. Harding
0 siblings, 0 replies; 2+ messages in thread
From: Tobin C. Harding @ 2018-03-09 6:05 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: kernel-hardening, linux-kernel, linux-usb, Tycho Andersen,
Kees Cook, Felipe Balbi, Alan Stern
On Fri, Mar 09, 2018 at 04:55:35PM +1100, Tobin C. Harding wrote:
> Signed-off-by: Tobin C. Harding <me@tobin.cc>
> ---
Please drop this. To much on github not writing proper commit logs :(
v2 to come.
thanks,
Tobin.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-09 6:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-09 6:05 [3/4] usb: Remove stack VLA usage Tobin C. Harding
-- strict thread matches above, loose matches on Subject: below --
2018-03-09 5:55 Tobin C. Harding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).