linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Highly critical bug in XHCI Controller
@ 2024-11-17  7:33 Markus Rechberger
  2024-11-17 12:44 ` Markus Rechberger
  2024-11-17 13:12 ` Greg KH
  0 siblings, 2 replies; 12+ messages in thread
From: Markus Rechberger @ 2024-11-17  7:33 UTC (permalink / raw)
  To: linux-usb, linux-kernel

Hi,


the issue was first reported at vdr-portal.de
https://www-vdr--portal-de.translate.goog/forum/index.php?thread/136541-empfehlung-dvb-s2-tuner-oder-satip/&postID=1376196&_x_tr_sl=de&_x_tr_tl=en&_x_tr_hl=de&_x_tr_pto=wapp#post1376196

we've got around a highly critical bug in the xhci driver.

https://sundtek.de/support/uxvd32.txt

In xhci.c

The bug is still active in Mainline:
https://github.com/torvalds/linux/blob/master/drivers/usb/host/xhci.c#L2382

static int xhci_check_bw_table(struct xhci_hcd *xhci,
        struct xhci_virt_device *virt_dev,
        int old_active_eps)

bw_table can end up with a NULL pointer.

This problem will lead to a complete kernel crash, rendering the entire
system unusable without any access to the actual linux system.

How to trigger the problem?
Short D+/D- or pull them to ground on a USB device while connecting the
device.

The problem can happen due to following cases:
* a device is getting suddenly disconnected during enumeration
* a faulty cable
* a faulty device 
* a malicious device triggers this issue on purpose
* if there are electrical issues during connecting a device.

A quick hotfix would be to check if bw_table is NULL in
xhci_check_bw_table, however the check should be performed earlier - in
the area where bw_table is supposed to be assigned.

Best Regards,
Markus

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

end of thread, other threads:[~2024-11-18 21:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-17  7:33 Highly critical bug in XHCI Controller Markus Rechberger
2024-11-17 12:44 ` Markus Rechberger
2024-11-17 13:12   ` Greg KH
2024-11-17 14:35   ` Michał Pecio
2024-11-17 15:03     ` Markus Rechberger
2024-11-17 15:18   ` Alan Stern
2024-11-17 15:47     ` Markus Rechberger
2024-11-17 21:02       ` Alan Stern
2024-11-18  5:14         ` Markus Rechberger
2024-11-18 16:03           ` Alan Stern
2024-11-18 21:23           ` Michał Pecio
2024-11-17 13:12 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).