Linux USB
 help / color / mirror / Atom feed
* Kernel crash during USB device enumeration or MSC mounting
@ 2020-07-04 15:15 Dan Halbert
  2020-07-04 15:34 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Halbert @ 2020-07-04 15:15 UTC (permalink / raw)
  To: Linux USB List

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.

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.

The crashes may be some kind of use-after-free bug in the kernel USB driver.

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).

The ports in use can be either USB2 or USB3. Sometimes interposing a 
USB2 hub helps.

The boards and underlying software are from Adafruit. I work for 
Adafruit on CircuitPython, and the maintainer of TinyUSB also works for 
Adafrui, so we can provide further help to track this down. We can 
provide Beagle 12 USB traces if that would be helpful.

I have reproduced these crashes using kernels as far back as 4.10 and up 
to 5.7, so it is a long-standing issue.

We're very happy to provide further information. See the Launchpad bug 
report for more details.

Dan

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-04 18:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-04 15:15 Kernel crash during USB device enumeration or MSC mounting Dan Halbert
2020-07-04 15:34 ` Greg KH
2020-07-04 15:36   ` Greg KH
2020-07-04 15:56     ` Dan Halbert
2020-07-04 16:09     ` Alan Stern
2020-07-04 16:33       ` Dan Halbert
2020-07-04 18:02         ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox