linux/drivers/usb
Kuen-Han Tsai 380353c3a9 usb: gadget: f_rndis: Refactor bind path to use __free()
[ Upstream commit 0822894143 ]

After an bind/unbind cycle, the rndis->notify_req is left stale. If a
subsequent bind fails, the unified error label attempts to free this
stale request, leading to a NULL pointer dereference when accessing
ep->ops->free_request.

Refactor the error handling in the bind path to use the __free()
automatic cleanup mechanism.

Fixes: 45fe3b8e53 ("usb ethernet gadget: split RNDIS function")
Cc: stable@kernel.org
Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
Link: https://lore.kernel.org/r/20250916-ready-v1-6-4997bf277548@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250916-ready-v1-6-4997bf277548@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-10-23 16:20:26 +02:00
..
atm usb: atm: cxacru: Merge cxacru_upload_firmware() into cxacru_heavy_init() 2025-08-28 16:30:54 +02:00
c67x00 USB: c67x00: Remove unused declaration c67x00_hcd_msg_received() 2023-10-02 16:42:33 +02:00
cdns3 usb: cdns3: cdnsp-pci: remove redundant pci_disable_device() call 2025-10-15 12:00:25 +02:00
chipidea usb: chipidea: udc: disconnect/reconnect from host when do suspend/resume 2025-07-10 16:05:11 +02:00
class cdc-acm: fix race between initial clearing halt and open 2025-08-20 18:30:52 +02:00
common usb: common: usb-conn-gpio: use a unique name for usb connector device 2025-07-06 11:01:35 +02:00
core usb: core: Add 0x prefix to quirks debug output 2025-10-02 13:44:06 +02:00
dwc2 usb: dwc2: gadget: Fix enter to hibernation for UTMI+ PHY 2025-07-24 08:56:20 +02:00
dwc3 usb: dwc3: pci: add support for the Intel Wildcat Lake 2025-08-28 16:31:10 +02:00
early usb: early: xhci-dbc: Fix early_ioremap leak 2025-08-15 12:13:36 +02:00
fotg210 move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
gadget usb: gadget: f_rndis: Refactor bind path to use __free() 2025-10-23 16:20:26 +02:00
host Revert "usb: xhci: Avoid Stop Endpoint retry loop if the endpoint seems Running" 2025-10-15 12:00:13 +02:00
image scsi: core: Add a dma_alignment field to the host and host template 2024-04-11 21:37:48 -04:00
isp1760 move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
misc usb: misc: qcom_eud: Access EUD_MODE_MANAGER2 through secure calls 2025-10-15 12:00:05 +02:00
mon [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
mtu3 tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
musb usb: musb: omap2430: fix device leak at unbind 2025-08-28 16:30:54 +02:00
phy usb: phy: twl6030: Fix incorrect type for ret 2025-10-15 12:00:08 +02:00
renesas_usbhs usb: renesas_usbhs: Reorder clock handling and power management in probe 2025-06-19 15:32:11 +02:00
roles usb: roles: set switch registered flag early on 2025-02-21 14:01:30 +01:00
serial USB: serial: option: add SIMCom 8230C compositions 2025-10-12 12:57:15 +02:00
storage USB: storage: Ignore driver CD mode for Realtek multi-mode Wi-Fi dongles 2025-08-28 16:31:09 +02:00
typec usb: typec: tipd: Clear interrupts first 2025-10-15 12:00:25 +02:00
usbip usb: vhci-hcd: Prevent suspending virtually attached devices 2025-10-15 12:00:16 +02: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