Re: [PATCH 1/2] phy: marvell: a3700-comphy: Fix out of bounds read
From: Miquel Raynal
Date: Fri Mar 22 2024 - 03:25:29 EST
Hi Mikhail,
m.kobuk@xxxxxxxxx wrote on Thu, 21 Mar 2024 19:47:30 +0300:
> There is an out of bounds read access of 'gbe_phy_init_fix[fix_idx].addr'
> every iteration after 'fix_idx' reaches 'ARRAY_SIZE(gbe_phy_init_fix)'.
>
> Make sure 'gbe_phy_init[addr]' is used when all elements of
> 'gbe_phy_init_fix' array are handled.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 934337080c6c ("phy: marvell: phy-mvebu-a3700-comphy: Add native kernel implementation")
> Signed-off-by: Mikhail Kobuk <m.kobuk@xxxxxxxxx>
Reviewed-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
Thanks,
Miquèl