usbip: fix vudc_rx: harden CMD_SUBMIT path to handle malicious input
authorShuah Khan <shuahkh@osg.samsung.com>
Sat, 23 Dec 2017 02:23:46 +0000 (19:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Jan 2018 16:07:26 +0000 (17:07 +0100)
commitb78d830f0049ef1966dc1e0ebd1ec2a594e2cf25
tree1a10a829712741d12df492bb2a56dae4cddb1248
parent30a7acd573899fd8b8ac39236eff6468b195ac7d
usbip: fix vudc_rx: harden CMD_SUBMIT path to handle malicious input

Harden CMD_SUBMIT path to handle malicious input that could trigger
large memory allocations. Add checks to validate transfer_buffer_length
and number_of_packets to protect against bad input requesting for
unbounded memory allocations.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/vudc_rx.c