Re: [PATCH v8 4/4] usb: gadget: f_tcm: clear the scatter list when reusing the BOT status request
From: Yehyeong Lee
Date: Fri Nov 20 2026 - 06:32:40 EST
On Fri, Nov 20, 2026 at 11:55:56AM +0100, Greg KH wrote:
> On Wed, Nov 18, 2026 at 09:40:05PM +0900, Yehyeong Lee wrote:
> > A test module that stands in for the controller's queue path, so that it
> > dereferences req->sg the way an sg-capable UDC would, reports a KASAN
> > slab-use-after-free on the freed entry for a read command followed by a
> > rejected command that reuses bot_req_in: 20 runs out of 20 without this
> > patch and 0 out of 20 with it. A normal sg read still queues its own
> > scatter list.
>
> Why is this paragraph here? What does it mean?
Sorry, that is how I tested it. dummy_hcd doesn't do sg, so I used a
small test module in place of the UDC to hit the stale req->sg. It
doesn't belong in the changelog, I'll drop it in v9.
Best regards,
Yehyeong Lee