OSDN Git Service

usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer
authorShuah Khan <shuahkh@osg.samsung.com>
Thu, 7 Dec 2017 21:16:50 +0000 (14:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:07:16 +0000 (10:07 +0100)
commit14513e49c43cd3149a03ff9e1c223c3d5803ad09
tree6bb9cec0e1587943a306e9eb8bdbf354e3b2fc1c
parentf3e957266ae56c200fb13a42309c50f84576c64a
usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer

commit be6123df1ea8f01ee2f896a16c2b7be3e4557a5a upstream.

stub_send_ret_submit() handles urb with a potential null transfer_buffer,
when it replays a packet with potential malicious data that could contain
a null buffer. Add a check for the condition when actual_length > 0 and
transfer_buffer is null.

Reported-by: Secunia Research <vuln@secunia.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/stub_tx.c