WSL2-Linux-Kernel/drivers/usb
Anssi Hannula f6121a746f xhci: fix uninitialized string returned by xhci_decode_ctrl_ctx()
commit 05519b8589 upstream.

xhci_decode_ctrl_ctx() returns the untouched buffer as-is if both "drop"
and "add" parameters are zero.

Fix the function to return an empty string in that case.

It was not immediately clear from the possible call chains whether this
issue is currently actually triggerable or not.

Note that before commit 4843b4b5ec ("xhci: fix even more unsafe memory
usage in xhci tracing") the result effect in the failure case was different
as a static buffer was used here, but the code still worked incorrectly.

Fixes: 90d6d5731d ("xhci: Add tracing for input control context")
Cc: stable@vger.kernel.org
Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
commit 4843b4b5ec ("xhci: fix even more unsafe memory usage in xhci tracing")
Link: https://lore.kernel.org/r/20220303110903.1662404-4-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08 14:22:49 +02:00
..
atm
c67x00
cdns3 usb: cdnsp: Fix segmentation fault in cdns_lost_power function 2022-02-01 17:27:04 +01:00
chipidea usb: chipidea: ci_hdrc_imx: fix potential error pointer dereference in probe 2021-12-01 09:04:40 +01:00
class usb: usbtmc: Fix bug in pipe direction for control transfers 2022-03-23 09:16:43 +01:00
common usb: ulpi: Call of_node_put correctly 2022-02-16 12:56:34 +01:00
core USB: core: Fix hang in usb_kill_urb by adding memory barriers 2022-02-01 17:27:04 +01:00
dwc2 usb: dwc2: drd: fix soft connect when gadget is unconfigured 2022-03-02 11:48:05 +01:00
dwc3 usb: dwc3: pci: add support for the Intel Raptor Lake-S 2022-03-16 14:23:40 +01:00
early Revert "usb: early: convert to readl_poll_timeout_atomic()" 2021-12-22 09:32:45 +01:00
gadget usb: gadget: Fix use-after-free bug by not setting udc->dev.driver 2022-03-23 09:16:43 +01:00
host xhci: fix uninitialized string returned by xhci_decode_ctrl_ctx() 2022-04-08 14:22:49 +02:00
image
isp1760 usb: isp1760: otg control register access 2021-08-27 16:11:39 +02:00
misc usb: ftdi-elan: fix memory leak on device disconnect 2022-01-27 11:03:40 +01:00
mon
mtu3 usb: mtu3: fix interval value for intr and isoc 2022-01-11 15:35:17 +01:00
musb usb: musb: tusb6010: check return value after calling platform_get_resource() 2021-11-25 09:48:25 +01:00
phy usb: phy: tahvo: add IRQ check 2021-08-16 18:57:19 +02:00
renesas_usbhs usb: renesas_usbhs: Fix spelling mistake "faile" -> "failed" 2021-08-27 10:29:32 +02:00
roles
serial USB: serial: simple: add Nokia phone driver 2022-04-08 14:22:46 +02:00
storage USB: usb-storage: Fix use of bitfields for hardware data in ene_ub6250.c 2022-04-08 14:22:48 +02:00
typec usb: typec: tipd: Forward plug orientation to typec subsystem 2022-04-08 14:22:48 +02:00
usbip usbip:vhci_hcd USB port can get stuck in the disabled state 2021-08-26 13:29:27 +02:00
Kconfig usb: remove reference to deleted config STB03xxx 2021-08-18 15:32:19 +02:00
Makefile usb: host: remove line for obsolete config USB_HWA_HCD 2021-08-18 15:32:19 +02:00
usb-skeleton.c