[PATCH] soc: xilinx: zynqmp: fix out of bounds array access

Michal Simek monstr at monstr.eu
Tue May 10 16:25:04 CEST 2022


st 20. 4. 2022 v 9:39 odesílatel Michal Simek <michal.simek at xilinx.com> napsal:
>
> The call to xilinx_pm_request requires an array of a larger size.
>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
>
> The same change was done for versal by
> https://lore.kernel.org/r/20220416181530.2311155-1-jorge@foundries.io
> ---
>  drivers/soc/soc_xilinx_zynqmp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/soc_xilinx_zynqmp.c b/drivers/soc/soc_xilinx_zynqmp.c
> index 7d33ce2163d8..a71115b17ccd 100644
> --- a/drivers/soc/soc_xilinx_zynqmp.c
> +++ b/drivers/soc/soc_xilinx_zynqmp.c
> @@ -49,7 +49,7 @@ static const struct soc_ops soc_xilinx_zynqmp_ops = {
>  static int soc_xilinx_zynqmp_probe(struct udevice *dev)
>  {
>         struct soc_xilinx_zynqmp_priv *priv = dev_get_priv(dev);
> -       u32 ret_payload[4];
> +       u32 ret_payload[PAYLOAD_ARG_CNT];
>         int ret;
>
>         priv->family = zynqmp_family;
> --
> 2.35.1
>

Applied.
M

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs


More information about the U-Boot mailing list