Patch "usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer" has been added to the 3.18-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usbip-fix-stub_send_ret_submit-vulnerability-to-null-transfer_buffer.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
be6123df1ea8f01ee2f896a16c2b7be3e4557a5aMon Sep 17 00:00:00 2001
From: Shuah Khan <[email protected]>
Date: Thu, 7 Dec 2017 14:16:50 -0700
Subject: usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer
From: Shuah Khan <[email protected]>
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.
--- drivers/usb/usbip/stub_tx.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/usb/usbip/stub_tx.c +7 -0
@@ -178,6 +178,13 @@ static int stub_send_ret_submit(struct smemset (&pdu_header,0 ,sizeof (pdu_header));memset (&msg,0 ,sizeof (msg)); +if (urb->actual_length >0 && !urb->transfer_buffer) { +dev_err (&sdev->udev->dev, +"urb: actual_length %d transfer_buffer null\n" , + urb->actual_length); +return -1 ; + } +if (usb_pipetype (urb->pipe) ==PIPE_ISOCHRONOUS ) iovnum =2 + urb->number_of_packets;else
Patches currently in stable-queue which might be from [email protected] are
queue-3.18/usbip-fix-stub_send_ret_submit-vulnerability-to-null-transfer_buffer.patch