From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Cheng Yongkang <teel4res@gmail.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] usb: usbfs: clamp the copied length to transfer_buffer_length
Date: Fri, 20 Nov 2026 09:03:31 +0100 [thread overview]
Message-ID: <2026112017-gala-enchanted-bf40@gregkh> (raw)
In-Reply-To: <179328314074.648427.8187049654053191605@gmail.com>
On Thu, Oct 29, 2026 at 07:12:20AM -0700, Cheng Yongkang wrote:
> copy_urb_data_to_user() uses urb->actual_length as the number of bytes to
> copy to userspace for non-isochronous URBs. The usbfs contract is that a
> driver must not report more data than the transfer buffer holds, but
> usbfs cannot rely on every HCD or device implementation to honor it; a
> malicious usbip peer can already set actual_length beyond
> transfer_buffer_length and trigger an out-of-bounds read:
No, every HCD must honor this.
thanks,
greg k-h
prev parent reply other threads:[~2026-11-20 8:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 14:12 [PATCH 0/2] usb: fix over-reported actual_length in usbip/usbfs Cheng Yongkang
2026-10-29 14:12 ` [PATCH 1/2] usbip: clear actual_length after a failed receive Cheng Yongkang
2026-10-29 14:32 ` sashiko-bot
2026-10-29 18:42 ` Shuah Khan
2026-10-30 4:13 ` Cheng Yongkang
2026-11-01 7:18 ` Cheng Yongkang
2026-11-10 18:57 ` Shuah Khan
2026-11-10 21:29 ` Alan Stern
2026-11-11 15:56 ` Shuah Khan
2026-10-29 14:12 ` [PATCH 2/2] usb: usbfs: clamp the copied length to transfer_buffer_length Cheng Yongkang
2026-10-29 14:46 ` sashiko-bot
2026-11-20 8:03 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026112017-gala-enchanted-bf40@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=teel4res@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.