linux-stable/drivers/usb/chipidea
Li Jun 2d3fab9cea usb: chipidea: host: fix port index underflow and UBSAN complains
[ Upstream commit e5d6a7c6cf ]

If wIndex is 0 (and it often is), these calculations underflow and
UBSAN complains, here resolve this by not decrementing the index when
it is equal to 0, this copies the solution from commit 85e3990bea
("USB: EHCI: avoid undefined pointer arithmetic and placate UBSAN")

Reported-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Link: https://lore.kernel.org/r/1624004938-2399-1-git-send-email-jun.li@nxp.com
Signed-off-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-18 13:40:30 +02:00
..
bits.h
ci.h
ci_hdrc_imx.c usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data() 2021-01-12 20:18:19 +01:00
ci_hdrc_imx.h usb: chipidea: imx: add two samsung picophy parameters tuning implementation 2020-08-23 11:40:08 +08:00
ci_hdrc_msm.c usb: chipidea: msm: Ensure proper controller reset using role switch API 2020-05-07 08:46:35 +02:00
ci_hdrc_pci.c usb: chipidea: ci_hdrc_pci: Fix improper use of kerneldoc format 2020-07-09 17:19:56 +02:00
ci_hdrc_tegra.c
ci_hdrc_usb2.c
core.c ENDIAN issue fix and one query controller role API is introduced. 2020-07-29 13:57:09 +02:00
debug.c usb: chipidea: debug: Demote obvious misuse of kerneldoc to standard comment blocks 2020-07-09 16:46:58 +02:00
host.c usb: chipidea: host: fix port index underflow and UBSAN complains 2021-09-18 13:40:30 +02:00
host.h
Kconfig
Makefile
otg.c usb: chipidea: otg: Fix kerneldoc issues relating to description of 'ci' 2020-07-09 16:46:58 +02:00
otg.h
otg_fsm.c
otg_fsm.h
udc.c usb: chipidea: udc: assign interrupt number to USB gadget structure 2021-06-16 12:01:35 +02:00
udc.h
ulpi.c
usbmisc_imx.c usb: chipidea: imx: Fix Battery Charger 1.2 CDP detection 2021-06-23 14:42:50 +02:00