linux/drivers/usb
Mathias Nyman fe465003bb xhci: fix possible null pointer dereference at secondary interrupter removal
commit a54a594d72 upstream.

Don't try to remove a secondary interrupter that is known to be invalid.
Also check if the interrupter is valid inside the spinlock that protects
the array of interrupters.

Found by smatch static checker

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-usb/ffaa0a1b-5984-4a1f-bfd3-9184630a97b9@moroto.mountain/
Fixes: c99b38c412 ("xhci: add support to allocate several interrupters")
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240125152737.2983959-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-05-09 09:44:08 +02:00
..
atm usb: atm: cxacru: fix a flaw in existing endpoint checks 2025-03-13 12:58:34 +01:00
c67x00 usb: c67x00-drv: Convert to platform remove callback returning void 2023-05-28 12:36:14 +01:00
cdns3 usb: cdns3: Fix deadlock when using NCM gadget 2025-05-02 07:50:50 +02:00
chipidea usb: chipidea: ci_hdrc_imx: implement usb_phy_init() error handling 2025-05-02 07:50:50 +02:00
class USB: wdm: add annotation 2025-05-02 07:50:52 +02:00
common usb: ulpi: Fix debugfs directory leak 2024-02-23 09:24:56 +01:00
core USB: VLI disk crashes if LPM is used 2025-05-02 07:50:51 +02:00
dwc2 usb: dwc2: gadget: remove of_node reference upon udc_stop 2025-02-21 13:57:14 +01:00
dwc3 usb: dwc3: gadget: Avoid using reserved endpoints on Intel Merrifield 2025-05-02 07:50:54 +02:00
early usb: early: xhci-dbc: Use memcpy_and_pad() 2023-01-31 10:40:54 +01:00
fotg210 usb: fotg210: Add missing kernel doc description 2024-06-12 11:12:31 +02:00
gadget usb: gadget: aspeed: Add NULL pointer check in ast_vhub_init_dev() 2025-05-02 07:50:55 +02:00
host xhci: fix possible null pointer dereference at secondary interrupter removal 2025-05-09 09:44:08 +02:00
image scsi: usb: uas: Declare two host templates and host template pointers const 2023-03-24 19:20:00 -04:00
isp1760 usb: isp1760: Convert to platform remove callback returning void 2023-05-28 12:38:01 +01:00
misc of: remove internal arguments from of_property_for_each_u32() 2025-02-08 09:51:51 +01:00
mon usb: mon: Fix atomicity violation in mon_bin_vma_fault 2024-01-25 15:35:43 -08:00
mtu3 usb: Explicitly include correct DT includes 2023-07-25 18:20:02 +02:00
musb usb: musb: Fix hardware lockup on first Rx endpoint request 2024-12-09 10:32:53 +01:00
phy usb: phy: generic: Use proper helper for property detection 2025-03-22 12:50:41 -07:00
renesas_usbhs usb: renesas_usbhs: Flush the notify_hotplug_work 2025-03-13 12:58:34 +01:00
roles usb: roles: set switch registered flag early on 2025-02-21 13:57:14 +01:00
serial USB: serial: simple: add OWON HDS200 series oscilloscope support 2025-05-02 07:50:50 +02:00
storage USB: storage: quirk for ADATA Portable HDD CH94 2025-05-02 07:50:48 +02:00
typec usb: typec: fix pm usage counter imbalance in ucsi_ccg_sync_control() 2025-04-25 10:45:56 +02:00
usbip usbip: Don't submit special requests twice 2024-09-08 07:54:44 +02:00
Kconfig usb: move config USB_USS720 to usb's misc Kconfig 2023-03-29 10:34:08 +02:00
Makefile USB: xen-hcd: Traverse host/ when CONFIG_USB_XEN_HCD is selected 2024-06-21 14:38:23 +02:00
usb-skeleton.c usb: add usb_set_intfdata() documentation 2022-11-29 08:56:09 +01:00