lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMj1kXHxHDEVbUz9L5d6pSMRB6wLFL_GiqA18X6XN4XbnifsXQ@mail.gmail.com>
Date:   Fri, 26 Mar 2021 14:57:36 +0100
From:   Ard Biesheuvel <ardb@...nel.org>
To:     Changbin Du <changbin.du@...il.com>
Cc:     linux-efi <linux-efi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] efi/fdt: fix panic when no valid fdt found

On Wed, 24 Mar 2021 at 15:54, Changbin Du <changbin.du@...il.com> wrote:
>
> setup_arch() would invoke efi_init()->efi_get_fdt_params(). If no
> valid fdt found then initial_boot_params will be null. So we
> should stop further fdt processing here. I encountered this
> issue on risc-v.
>
> Signed-off-by: Changbin Du <changbin.du@...il.com>

I'll queue this up, thanks.

> ---
>  drivers/firmware/efi/fdtparams.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/firmware/efi/fdtparams.c b/drivers/firmware/efi/fdtparams.c
> index bb042ab7c2be..e901f8564ca0 100644
> --- a/drivers/firmware/efi/fdtparams.c
> +++ b/drivers/firmware/efi/fdtparams.c
> @@ -98,6 +98,9 @@ u64 __init efi_get_fdt_params(struct efi_memory_map_data *mm)
>         BUILD_BUG_ON(ARRAY_SIZE(target) != ARRAY_SIZE(name));
>         BUILD_BUG_ON(ARRAY_SIZE(target) != ARRAY_SIZE(dt_params[0].params));
>
> +       if (!fdt)
> +               return 0;
> +
>         for (i = 0; i < ARRAY_SIZE(dt_params); i++) {
>                 node = fdt_path_offset(fdt, dt_params[i].path);
>                 if (node < 0)
> --
> 2.30.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ