Re: AW: AW: AW: KASAN: use-after-free Read in usbhid_power

2019-08-10 Thread Hans de Goede
Hi, On 09-08-19 14:38, Schmid, Carsten wrote: Hi again, Hey, i did not want to trigger an eartquake in the basement of the kernel ;-) My intention was to prevent some crashes, and help developers to find their bugs. I think my patch exactly does this. Hehe, actually drivers not being able

Re: AW: AW: KASAN: use-after-free Read in usbhid_power

2019-08-09 Thread Greg KH
On Fri, Aug 09, 2019 at 01:00:25PM +, Schmid, Carsten wrote: > >> > >> @Greg: > >> I am still confident that my patch in __release_region should be taken in. > > > > Ok, submit it in a "real" way and we can consider it :) > > > > thanks, > > > > greg k-h > > Already done, linux-ker...@vger.ker

AW: AW: AW: KASAN: use-after-free Read in usbhid_power

2019-08-09 Thread Schmid, Carsten
>> >> @Greg: >> I am still confident that my patch in __release_region should be taken in. > > Ok, submit it in a "real" way and we can consider it :) > > thanks, > > greg k-h Already done, linux-ker...@vger.kernel.org, see https://www.spinics.net/lists/kernel/msg3218180.html Thanks, and have a n

Re: AW: AW: KASAN: use-after-free Read in usbhid_power

2019-08-09 Thread Greg KH
On Fri, Aug 09, 2019 at 12:38:35PM +, Schmid, Carsten wrote: > Hi again, > > >> > >> Hey, i did not want to trigger an eartquake in the basement of the kernel > >> ;-) > >> My intention was to prevent some crashes, and help developers to find > >> their bugs. > >> I think my patch exactly do

AW: AW: AW: KASAN: use-after-free Read in usbhid_power

2019-08-09 Thread Schmid, Carsten
Hi again, >> >> Hey, i did not want to trigger an eartquake in the basement of the kernel ;-) >> My intention was to prevent some crashes, and help developers to find their >> bugs. >> I think my patch exactly does this. > > Hehe, actually drivers not being able to block unbind has been bugging

AW: AW: KASAN: use-after-free Read in usbhid_power

2019-08-09 Thread Schmid, Carsten
> > We are talking memory-mapped io here, so it cannot just be "re-used", it > is wat it is. I guess the PCI BAR could be released and then the physical > address the resource was at could be re-used for another piece of MMIo, > but AFAIK outside of PI=CI hotplug we never release BARs. > > Maybe

Re: AW: AW: KASAN: use-after-free Read in usbhid_power

2019-08-09 Thread Hans de Goede
Hi, On 8/9/19 12:47 PM, Schmid, Carsten wrote: We are talking memory-mapped io here, so it cannot just be "re-used", it is wat it is. I guess the PCI BAR could be released and then the physical address the resource was at could be re-used for another piece of MMIo, but AFAIK outside of PI=CI ho

Re: AW: KASAN: use-after-free Read in usbhid_power

2019-08-09 Thread Hans de Goede
Hi, On 8/9/19 11:34 AM, Schmid, Carsten wrote: -Ursprüngliche Nachricht- Von: Greg KH [mailto:gre...@linuxfoundation.org] Gesendet: Freitag, 9. August 2019 09:56 An: Schmid, Carsten Cc: Alan Stern ; Andrey Konovalov ; Oliver Neukum ; syzkaller-bugs ; syzbot ; USB list ; Hillf Danton Be

AW: KASAN: use-after-free Read in usbhid_power

2019-08-09 Thread Schmid, Carsten
> -Ursprüngliche Nachricht- > Von: Greg KH [mailto:gre...@linuxfoundation.org] > Gesendet: Freitag, 9. August 2019 09:56 > An: Schmid, Carsten > Cc: Alan Stern ; Andrey Konovalov > ; Oliver Neukum ; > syzkaller-bugs ; syzbot > ; USB list > ; Hillf Danton > Betreff: Re: KASAN: use-after-fr

AW: KASAN: use-after-free Read in usbhid_power

2019-08-09 Thread Schmid, Carsten
Hi all having use-after-free issues in USB shutdowns: I hunted for a similar case in the intel_xhci_usb_sw driver. What i have found and proposed is (from yesterday): --- [PATCH] kernel/resource.c: invalidate parent when freed resource has childs When a resource is freed and has children, the chil