RE: [PATCH] HID: USB: Fix general protection fault caused by Logitech driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Andrey Konovalov [andreyknvl@xxxxxxxxxx]
> Sent: Tuesday, September 03, 2019 3:46 AM
> To: Colenbrander, Roderick
> Cc: Jiri Kosina; Alan Stern; Gustavo A. R. Silva; Hillf Danton; syzkaller-bugs; linux-input@xxxxxxxxxxxxxxx; USB list
> Subject: Re: [PATCH] HID: USB: Fix general protection fault caused by Logitech driver

> On Sat, Aug 24, 2019 at 2:41 AM <Roderick.Colenbrander@xxxxxxxx> wrote:
>
> On Thu, 22 Aug 2019, Alan Stern wrote:
> >
> > > > > > > I've ran the fuzzer with your patches applied overnight and noticed
> > > > > > > another fallout of similar bugs. I think they are caused by a similar
> > > > > > > issue in the sony HID driver. There's no hid_hw_stop() call in the "if
> > > > > > > (!(hdev->claimed & HID_CLAIMED_INPUT))" case in sony_probe(). Does it
> > > > > > > look like a bug to you?
> > > > > >
> > > > > > It looks like the relevant hid_hw_stop() call is the one at the end of
> > > > > > sony_configure_input().  But I can't tell if doing that way is valid or
> > > > > > not -- in practice the code would end up calling hid_disconnect() while
> > > > > > hid_connect() was still running, which doesn't seem like a good idea.
> > > > > >
> > > > > > There's a comment about this near the end of sony_probe().  I suspect
> > > > > > it would be better to call hid_hw_stop() in the conditional code
> > > > > > following that comment rather than in sony_configure_input().
> > > > > >
> > > > > > Either way, these are all things Jiri should know about or check up on.
> > > > > >
> > > > > > Have you gotten any test results from syzbot exercising these pathways?
> > > > > > You ought to be able to tell which HID driver is involved by looking
> > > > > > through the console output.
> > > > >
> > > > > Yes, a typical crash is below, that's why I thought it's the sony
> > > > > driver. Adding hid_hw_stop() in sony_probe() stops the issue from
> > > > > happening, but I don't know whether it's the right fix.
> > > >
> > > > Probably you have to add hid_hw_stop() in sony_probe() and remove it
> > > > from sony_configure_input().  But like I said above, Jiri should look
> > > > into this.
> >
> > > It almost certainly is, thanks.
> >
> > > Adding Roderick to CC ... Roderick, will you be able to test and submit
> > > a patch fixing that?
> > >
> > > --
> > > Jiri Kosina
> > > SUSE Labs
> >
> > Sure we will have a look and do some testing. Hopefully we can share a patch some time next week.

> Hi Roderick,
> 
> I was wondering if you had a chance to look into this?
> 
> Once the Logitech fix is upstream, this similar Sony bug will start
> producing a large number of similar syzbot reports since it causes a
> major memory corruption and we'll need to triage them all again. It
> would be nice to get the Sony fix merged together with the Logitech
> one. Or at least to have it available so I can apply it manually until
> it is merged.
> 
> Thanks!

Hi Andrey,

We are still looking at the issue. I had one of my guys try the fix (and trigger an error in sony_input_configured), but he claimed he crashed his kernel. Due to the long weekend in the US, we didn't get back to looking at it yet. We are looking at it some more today or tomorrow.

Thanks,
Roderick



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux