The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Michal Pecio <michal.pecio@gmail.com>
To: Artem Dinaburg <artem@trailofbits.com>
Cc: mathias.nyman@intel.com, stern@rowland.harvard.edu,
	gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: xhci: reject bulk transfers beyond mapped scatterlists
Date: Tue, 1 Dec 2026 22:45:21 +0100	[thread overview]
Message-ID: <20261201224521.11feb037.michal.pecio@gmail.com> (raw)
In-Reply-To: <20261201202438.32470.9674.04-xhci-sg-length-patch@trailofbits.com>

On Tue,  1 Dec 2026 15:24:40 -0500, Artem Dinaburg wrote:
> A bulk or interrupt URB can request more bytes than its mapped
> scatterlist covers. count_sg_trbs_needed() counts only the mapped
> entries, but xhci_queue_bulk_tx() queues TRBs until the requested length
> is reached. After the final entry it continues from the last DMA address
> and length, so the controller transfers data outside the mapping.
> 
> A USB device can cause this mismatch.

Which one and how exactly?

That's a driver bug, albeit one which could conceivably
be triggered by a nonconforming device.

Regards,
Michal

      parent reply	other threads:[~2026-12-01 21:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 20:24 [PATCH] usb: xhci: reject bulk transfers beyond mapped scatterlists Artem Dinaburg
2026-12-01 20:43 ` Alan Stern
2026-12-01 20:54   ` Artem Dinaburg
2026-12-01 21:45 ` Michal Pecio [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=20261201224521.11feb037.michal.pecio@gmail.com \
    --to=michal.pecio@gmail.com \
    --cc=artem@trailofbits.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=stern@rowland.harvard.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox