Kernel crash during USB device enumeration or MSC mounting

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

 



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



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

  Powered by Linux