ACK: [SRU][Trusty][PATCH 1/1] usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer
Stefan Bader
stefan.bader at canonical.com
Tue Jul 24 12:27:51 UTC 2018
On 24.07.2018 13:28, Kleber Sacilotto de Souza wrote:
> From: Shuah Khan <shuahkh at osg.samsung.com>
>
> 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 at secunia.com>
> Cc: stable <stable at vger.kernel.org>
> Signed-off-by: Shuah Khan <shuahkh at osg.samsung.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
>
> CVE-2017-16914
> (backported from commit be6123df1ea8f01ee2f896a16c2b7be3e4557a5a)
> [ klebers: adjusted the file path, the usbip is still under staging on
> kernel 3.13. ]
> Signed-off-by: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
> ---
> drivers/staging/usbip/stub_tx.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/staging/usbip/stub_tx.c b/drivers/staging/usbip/stub_tx.c
> index cd5326ae38cc..570713533a1f 100644
> --- a/drivers/staging/usbip/stub_tx.c
> +++ b/drivers/staging/usbip/stub_tx.c
> @@ -173,6 +173,13 @@ static int stub_send_ret_submit(struct stub_device *sdev)
> memset(&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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20180724/76c9f924/attachment.sig>
More information about the kernel-team
mailing list