Re: [BUG] usb: gadgetfs: KASAN null-ptr-deref and intermittent UAF in ep_aio_cancel()

From: Andrey Konovalov

Date: Sun Aug 09 2026 - 18:20:21 EST


On Wed, Aug 5, 2026 at 6:17 PM Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
>
> However, I'm not sure it's worth working on them. Greg KH is talking
> about getting rid of almost all the drivers in the gadget/legacy
> directory. I don't know if that will include the gadgetfs driver. If
> it does, trying to fix up the driver will be a waste of time.

Hi Alan and Greg,

Gonna hijack the discussion here: Are there more details to what
exactly might be removed?

I would be in favor of keeping the Raw Gadget driver, at the very
least, as it powers the syzkaller's ability to fuzz USB drivers. The
composite framework is notably less flexible for emulating improper
USB devices (even with the FunctionFS-based composite function).

And as GadgetFS, unlike Raw Gadget right now, supports AIO, it might
make sense to keep it as well.

But I suppose it would be fine to remove the legacy modules that are
just wrappers around various composite functions.

Thank you!