diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-09-22 20:43:46 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-12 09:51:17 (GMT) |
commit | 77a4be89599c587f8b1ac6256ad7dc11a8ce28fa (patch) | |
tree | 8e4d0848360b44554692990030eb4f7570a43dd4 /arch/mips/pci | |
parent | e39b17143a5b5aac81f066d455e5d3a9877eb3ae (diff) | |
download | linux-77a4be89599c587f8b1ac6256ad7dc11a8ce28fa.tar.xz |
USB: devio: Don't corrupt user memory
commit fa1ed74eb1c233be6131ec92df21ab46499a15b6 upstream.
The user buffer has "uurb->buffer_length" bytes. If the kernel has more
information than that, we should truncate it instead of writing past
the end of the user's buffer. I added a WARN_ONCE() to help the user
debug the issue.
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/mips/pci')
0 files changed, 0 insertions, 0 deletions