]> www.infradead.org Git - users/jedix/linux-maple.git/commit
USB: usbip: fix potential out-of-bounds write
authorIgnat Korchagin <ignat.korchagin@gmail.com>
Thu, 17 Mar 2016 18:00:29 +0000 (18:00 +0000)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 22:22:01 +0000 (17:22 -0500)
commitd35c66edca6c34e632ffceb7523009d32abcfb4b
tree8be0b11b7a9d5929dc37c49ce612b8ba482d72ab
parent5f8df046ced60b354c84d323c95af00b0aa5b9fb
USB: usbip: fix potential out-of-bounds write

Orabug: 25308066

[ Upstream commit b348d7dddb6c4fbfc810b7a0626e8ec9e29f7cbb ]

Fix potential out-of-bounds write to urb->transfer_buffer
usbip handles network communication directly in the kernel. When receiving a
packet from its peer, usbip code parses headers according to protocol. As
part of this parsing urb->actual_length is filled. Since the input for
urb->actual_length comes from the network, it should be treated as untrusted.
Any entity controlling the network may put any value in the input and the
preallocated urb->transfer_buffer may not be large enough to hold the data.
Thus, the malicious entity is able to write arbitrary data to kernel memory.

Signed-off-by: Ignat Korchagin <ignat.korchagin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 25c871c07f37b8cbaebc97403233185479af095d)
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/usb/usbip/usbip_common.c