mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
990c2a26f7
Coverity from Synopsys complains "Illegal address computation (OVERRUN)" on status_reg. After below code executed, port_index = wIndex & 0xff; port_index -= (port_index > 0); the static analysis tool see the value of port_index is now between 0 and 254 (inclusive). However, ehci_def.h define port_status as below: #define HCS_N_PORTS_MAX 15 u32 port_status[HCS_N_PORTS_MAX]; So the tool think illegal array pointer may be obtained. status_reg = &ehci->regs->port_status[port_index]; This will follow "846cbf98cbef USB: EHCI: Improve port index sanitizing" to improve port index sanitizing. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Acked-by: Peter Chen <peter.chen@kernel.org> Link: https://lore.kernel.org/r/20241202083453.704533-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
bits.h | ||
ci_hdrc_imx.c | ||
ci_hdrc_imx.h | ||
ci_hdrc_msm.c | ||
ci_hdrc_npcm.c | ||
ci_hdrc_pci.c | ||
ci_hdrc_tegra.c | ||
ci_hdrc_usb2.c | ||
ci.h | ||
core.c | ||
debug.c | ||
host.c | ||
host.h | ||
Kconfig | ||
Makefile | ||
otg_fsm.c | ||
otg_fsm.h | ||
otg.c | ||
otg.h | ||
trace.c | ||
trace.h | ||
udc.c | ||
udc.h | ||
ulpi.c | ||
usbmisc_imx.c |