Files
linux/drivers/usb/chipidea
Li Jun b15cc0ef7d 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:43:53 +02:00
..
2021-05-31 09:50:26 +02:00
2018-07-05 14:22:47 +08:00