android_kernel_motorola_sm6375/drivers/phy
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Harshit Mogalapalli 195e806b2a phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe()
[ Upstream commit 13c088cf3657d70893d75cf116be937f1509cc0f ]

The size of array 'priv->ports[]' is INNO_PHY_PORT_NUM.

In the for loop, 'i' is used as the index for array 'priv->ports[]'
with a check (i > INNO_PHY_PORT_NUM) which indicates that
INNO_PHY_PORT_NUM is allowed value for 'i' in the same loop.

This > comparison needs to be changed to >=, otherwise it potentially leads
to an out of bounds write on the next iteration through the loop

Fixes: ba8b0ee81f ("phy: add inno-usb2-phy driver for hi3798cv200 SoC")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20230721090558.3588613-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:53:47 +02:00
..
allwinner
amlogic
broadcom
cadence
freescale
hisilicon phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe() 2023-08-11 11:53:47 +02:00
lantiq
marvell
mediatek
motorola phy: mapphone-mdm6600: Fix PM error handling in phy_mdm6600_probe 2022-05-09 09:03:24 +02:00
mscc
qualcomm phy: qualcomm: call clk_disable_unprepare in the error handling 2022-10-26 13:22:40 +02:00
ralink
renesas
rockchip phy: rockchip-typec: Fix unsigned comparison with less than zero 2023-03-11 16:44:15 +01:00
samsung phy: samsung: exynos5250-sata: fix missing device put in probe error paths 2022-05-09 09:03:23 +02:00
socionext
st phy: st: miphy28lp: use _poll_timeout functions for waits 2023-05-30 12:44:04 +01:00
tegra phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port 2023-05-17 11:35:54 +02:00
ti phy: ti: Add missing pm_runtime_disable() in serdes_am654_probe 2022-05-09 09:03:24 +02:00
Kconfig
Makefile
phy-core-mipi-dphy.c phy: dphy: Correct lpx parameter and its derivatives(ta_{get,go,sure}) 2022-04-15 14:18:18 +02:00
phy-core.c
phy-lpc18xx-usb-otg.c
phy-pistachio-usb.c
phy-xgene.c