Re: Kernel crash during USB device enumeration or MSC mounting

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

 



On Sat, Jul 04, 2020 at 05:34:29PM +0200, Greg KH wrote:
> On Sat, Jul 04, 2020 at 11:15:29AM -0400, Dan Halbert wrote:
> > Hi -- I was referred to this list by Kai-Heng Feng after filing an issue on
> > the Ubuntu bug tracker here:
> > 
> >   https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1871143.
> > 
> > Many further details are in that report, including "lsusb -v", "lspci -v",
> > dmesg, and call trace output.
> 
> Where is the kernel crash in those logs?  I don't seem to be able to
> find the correct one, can you just send it here so we can read and
> comment on it in the email thread?  I see something odd with the fat
> driver, are you sure you are creating a correct filesystem image for it
> to handle?
> 
> > We are seeing kernel crashes from certain composite USB devices that present
> > as MSC, CDC, HID, and MIDI. The devices are microcontroller boards running
> > CircuitPython (https://github.com/adafruit/circuitpython), which uses the
> > TinyUSB USB stack: https://github.com/hathach/tinyusb.
> > 
> > The board is commanded to forcibly reformat its MSC FAT12 filesystem and
> > then reset. This causes a USB reset and re-enumeration, which can often
> > (though not all the time) cause a kernel crash.
> 
> What do you mean by "reset"?  Are you disconnecting the device from the
> USB bus causing it to electronically be removed and then added back?  Or
> doing something else?
> 
> > The crashes may be some kind of use-after-free bug in the kernel USB driver.
> 
> Maybe, but the traces seem _very_ short on the stuff on the web page,
> can you send us the full traceback from the crash?
> 
> > We have seen this or similar crashes caused by several different boards that
> > use different microcontrollers. The hosts are x64, including Dell
> > Intel-chipset desktops and an older Mac Mini running Linux (also Intel
> > chipset).
> 
> That's not good, but might mean it is a filesystem issue, not a USB
> issue.

Ok, this trace:
	https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1871143/comments/4

seems to point at the filesystem code.  Are you sure you are creating
the image correctly?

If you unplug and plug the device back in with that same filesystem
image, does it work, or still crash?

thanks,

greg k-h



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux