On Wed, 26 Aug 2026 17:44:06 +0200, Greg Kroah-Hartman wrote: > On Wed, Aug 26, 2026 at 05:35:49PM +0200, Michal Pecio wrote: > > You can't bind random drivers to random devices out of the box, > > you need ID overrides. And then you don't need to bind manually, > > the kernel will happily select the wrong driver by default. > > > > Authors of the recent xhci and thunderbolt patches admitted that > > 'driver_override' was involved in both cases. > > I'll be glad to taint if driver_override is also written to, but it's > bind() that triggers the actual action happening. Or so the traces > show.
Well, I suppose probe() is the first victim to crash in such cases. But if Syzbot is binding random drivers to random devices, the obvious solution is to ban 'driver_override'. Using that is just cheating. If it still manages to crash drivers by binding them to appropriate devices then I would say it will finally be doing its job right :) > > Meanwhile, Syzbot also found a stupid write to freed memory in USB > > core when HCs are unbound. You may say it doesn't matter, but: > > > > * USB HCs are hotpluggable thunderbolt "gadgets" these days > > We support PCI devices being removed, but that falls under the PCI > hotplug rules/requirements, right? Anyway, sure, we can fix those bugs > when found, but that's not the majority of what we are seeing at the > moment. Look at all of the dumb platform drivers that are getting hit > with this on the syzbot reports... > > > * there were plans to alter this code so that UAF is triggered by > > hot removal of the USB device, not its parent HC > > I don't understand what you mean by this. There are ideas to change some code to use per-device data instead of per-HCD data. Coincidentally, Syzbot found that this use races with freeing the HCD and it would also race with freeing the device, making the UAF easier to trigger after proposed changes. I gave it as an example of Syzbot doing something useful with 'unbind' when it isn't wasting time on driver overrides. Regards, Michal
