projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34f11e5
)
uas: Fix bounds check in uas_find_endpoints
author
Hans de Goede
<hdegoede@redhat.com>
Tue, 29 Oct 2013 08:06:54 +0000
(09:06 +0100)
committer
Sarah Sharp
<sarah.a.sharp@linux.intel.com>
Tue, 4 Mar 2014 23:38:18 +0000
(15:38 -0800)
The loop uses up to 3 bytes of the endpoint extra data.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
drivers/usb/storage/uas.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/storage/uas.c
b/drivers/usb/storage/uas.c
index 1ac66f290fbf7db62e49c61be96c6016638deb95..7662b3e13c4dc305e64fc7d93360b00fff59f1cf 100644
(file)
--- a/
drivers/usb/storage/uas.c
+++ b/
drivers/usb/storage/uas.c
@@
-907,7
+907,7
@@
static int uas_find_endpoints(struct usb_host_interface *alt,
for (i = 0; i < n_endpoints; i++) {
unsigned char *extra = endpoint[i].extra;
int len = endpoint[i].extralen;
- while (len >
1
) {
+ while (len >
= 3
) {
if (extra[1] == USB_DT_PIPE_USAGE) {
unsigned pipe_id = extra[2];
if (pipe_id > 0 && pipe_id < 5)