linux/drivers/usb
Nathan Rebello 5a1140404c usb: typec: ucsi: skip connector validation before init
Notifications can arrive before ucsi_init() has populated
ucsi->cap.num_connectors via GET_CAPABILITY. At that point
num_connectors is still 0, causing all valid connector numbers to be
incorrectly rejected as bogus.

Skip the bounds check when num_connectors is 0 (not yet initialized).
Pre-init notifications are already handled safely by the early-event
guard in ucsi_connector_change().

Reported-by: Takashi Iwai <tiwai@suse.de>
Fixes: d2d8c17ac0 ("usb: typec: ucsi: validate connector number in ucsi_notify_common()")
Cc: stable@vger.kernel.org
Signed-off-by: Nathan Rebello <nathan.c.rebello@gmail.com>
Tested-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260407063958.863-1-nathan.c.rebello@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-07 13:35:44 +02:00
..
atm Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
c67x00 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cdns3 usb: cdns3: gadget: fix state inconsistency on gadget init failure 2026-04-02 09:38:00 +02:00
chipidea treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
class cdc-acm: new quirk for EPSON HMD 2026-03-18 16:17:22 +01:00
common usb: ulpi: fix double free in ulpi_register_interface() error path 2026-04-02 09:36:56 +02:00
core usb: core: use dedicated spinlock for offload state 2026-04-02 09:43:26 +02:00
dwc2 usb: dwc2: gadget: Fix spin_lock/unlock mismatch in dwc2_hsotg_udc_stop() 2026-03-30 17:05:07 +02:00
dwc3 usb: dwc3: imx8mp: fix memory leak on probe failure path 2026-04-02 09:37:45 +02:00
early
fotg210 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
gadget usb: gadget: f_hid: move list and spinlock inits from bind to alloc 2026-04-02 09:55:28 +02:00
host usb: host: xhci-sideband: delegate offload_usage tracking to class drivers 2026-04-02 09:43:30 +02:00
image usb: image: mdc800: kill download URB on timeout 2026-02-25 10:27:01 -08:00
isp1760 Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
misc usb: misc: usbio: Fix URB memory leak on submit failure 2026-04-02 09:36:36 +02:00
mon Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
mtu3 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
musb Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
phy Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
renesas_usbhs usb: renesas_usbhs: fix use-after-free in ISR during device removal 2026-03-11 16:18:16 +01:00
roles usb: roles: get usb role switch from parent only for usb-b-connector 2026-03-11 16:22:22 +01:00
serial USB: serial: option: add MeiG Smart SRM825WN 2026-04-01 11:32:08 +02:00
storage Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
typec usb: typec: ucsi: skip connector validation before init 2026-04-07 13:35:44 +02:00
usbip Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
Kconfig
Makefile usb: isp1362-hcd: remove Philips ISP1362 USB OTG controller driver 2026-01-07 16:13:19 +01:00
usb-skeleton.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00