[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <169019617956.466731.9761851242432174423.b4-ty@kernel.org>
Date: Mon, 24 Jul 2023 16:26:19 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Kishon Vijay Abraham I <kishon@...nel.org>,
Sergio Paracuellos <sergio.paracuellos@...il.com>,
Heiko Stuebner <heiko@...ech.de>,
Rob Herring <robh@...nel.org>,
Marc Kleine-Budde <mkl@...gutronix.de>,
David Yang <mmyangfl@...il.com>,
Shawn Guo <shawn.guo@...aro.org>,
Pengcheng Li <lpc.li@...ilicon.com>,
Jiancheng Xue <xuejiancheng@...ilicon.com>,
linux-phy@...ts.infradead.org, linux-kernel@...r.kernel.org,
Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
Cc: dan.carpenter@...aro.org, christophe.jaillet@...adoo.fr,
julia.lawall@...ia.fr, kernel-janitors@...r.kernel.org,
error27@...il.com
Subject: Re: [PATCH] phy: hisilicon: Fix an out of bounds check in
hisi_inno_phy_probe()
On Fri, 21 Jul 2023 02:05:55 -0700, Harshit Mogalapalli wrote:
> 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
>
> [...]
Applied, thanks!
[1/1] phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe()
commit: 13c088cf3657d70893d75cf116be937f1509cc0f
Best regards,
--
~Vinod
Powered by blists - more mailing lists