linux/drivers/usb
Johan Hovold 7501ecfe3e usb: phy: isp1301: fix non-OF device reference imbalance
commit b4b64fda4d upstream.

A recent change fixing a device reference leak in a UDC driver
introduced a potential use-after-free in the non-OF case as the
isp1301_get_client() helper only increases the reference count for the
returned I2C device in the OF case.

Increment the reference count also for non-OF so that the caller can
decrement it unconditionally.

Note that this is inherently racy just as using the returned I2C device
is since nothing is preventing the PHY driver from being unbound while
in use.

Fixes: c84117912b ("USB: lpc32xx_udc: Fix error handling in probe")
Cc: stable@vger.kernel.org
Cc: Ma Ke <make24@iscas.ac.cn>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Link: https://patch.msgid.link/20251218153519.19453-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-02 12:57:13 +01:00
..
atm usb: atm: cxacru: Merge cxacru_upload_firmware() into cxacru_heavy_init() 2025-07-24 11:33:31 +02:00
c67x00 usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
cdns3 usb: cdns3: Fix double resource release in cdns3_pci_probe 2025-10-28 15:46:16 +01:00
chipidea usb: chipidea: imx: improve usbmisc_imx7d_pullup() 2025-08-13 17:19:10 +02:00
class usb: usblp: Use min_t() to improve usblp_read() 2025-09-06 15:20:22 +02:00
common usb: common: usb-conn-gpio: use a unique name for usb connector device 2025-04-11 16:08:34 +02:00
core USB: Fix descriptor count when handling invalid MBIM extended descriptor 2025-12-18 14:02:27 +01:00
dwc2 usb: dwc2: fix hang during suspend if set as peripheral 2025-12-18 14:03:10 +01:00
dwc3 usb: dwc3: dwc3_power_off_all_roothub_ports: Use ioremap_np when required 2025-12-18 14:03:42 +01:00
early usb: early: xhci-dbc: Fix early_ioremap leak 2025-07-07 11:04:46 +02:00
fotg210 usb: fotg210-hcd: Switch to use hrtimer_setup() 2025-02-18 11:19:02 +01:00
gadget USB: lpc32xx_udc: Fix error handling in probe 2026-01-02 12:57:13 +01:00
host usb: ohci-nxp: fix device leak on probe failure 2026-01-02 12:57:13 +01:00
image scsi: Rename .slave_alloc() and .slave_destroy() 2024-12-04 15:34:28 -05:00
isp1760 treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
misc usb: chaoskey: fix locking for O_NONBLOCK 2025-12-18 14:03:10 +01:00
mon usb: mon: Increase BUFF_MAX to 64 MiB to support multi-MB URBs 2025-09-17 12:40:05 +02:00
mtu3 Driver core and debugfs updates 2025-01-28 12:25:12 -08:00
musb usb: musb: dsps: use platform_get_irq_byname_optional() for vbus IRQ 2025-09-06 15:22:20 +02:00
phy usb: phy: isp1301: fix non-OF device reference imbalance 2026-01-02 12:57:13 +01:00
renesas_usbhs usb: renesas_usbhs: Fix synchronous external abort on unbind 2025-10-28 15:45:22 +01:00
roles usb: roles: set switch registered flag early on 2025-02-14 09:26:25 +01:00
serial USB: serial: kobil_sct: fix TIOCMBIS and TIOCMBIC 2025-12-12 18:42:46 +01:00
storage usb: usb-storage: Maintain minimal modifications to the bcdDevice range. 2026-01-02 12:57:12 +01:00
typec usb: typec: altmodes/displayport: Drop the device reference in dp_altmode_probe() 2026-01-02 12:57:13 +01:00
usbip usbip: Fix locking bug in RT-enabled kernels 2026-01-02 12:57:01 +01:00
Kconfig usb: pci-quirks: handle HAS_IOPORT dependency for AMD quirk 2023-10-02 16:19:12 +02:00
Makefile USB: xen-hcd: Traverse host/ when CONFIG_USB_XEN_HCD is selected 2024-06-04 15:33:38 +02:00
usb-skeleton.c usb: add usb_set_intfdata() documentation 2022-11-29 08:56:09 +01:00