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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 31 Jan 2023 08:04:40 +0100
From:   Ard Biesheuvel <ardb@...nel.org>
To:     Jia He <justin.he@....com>
Cc:     Huacai Chen <chenhuacai@...nel.org>, linux-efi@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Alexandru Elisei <alexandru.elisei@....com>
Subject: Re: [PATCH 1/2] efi: libstub: Fix the retriving of supported rutime services

On Tue, 31 Jan 2023 at 05:04, Jia He <justin.he@....com> wrote:
>
> If retrieving UEFI configuration table is failed, the supported runtime
> services mask should be regarded as 0 instead of EFI_RT_SUPPORTED_ALL.
> Otherwise efi_novamap might be incorrectly assigned to "false" on the
> Ampere Emag server.
>
> Signed-off-by: Jia He <justin.he@....com>
> ---
>  drivers/firmware/efi/libstub/efi-stub.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/firmware/efi/libstub/efi-stub.c b/drivers/firmware/efi/libstub/efi-stub.c
> index 2955c1ac6a36..f24b5436729c 100644
> --- a/drivers/firmware/efi/libstub/efi-stub.c
> +++ b/drivers/firmware/efi/libstub/efi-stub.c
> @@ -111,6 +111,8 @@ static u32 get_supported_rt_services(void)
>         rt_prop_table = get_efi_config_table(EFI_RT_PROPERTIES_TABLE_GUID);
>         if (rt_prop_table)
>                 supported &= rt_prop_table->runtime_services_supported;
> +       else
> +               supported = 0;
>
>         return supported;
>  }

Hello Justin,

This is not how things are supposed to work. On systems that do not
implement the RT properties table, all runtime services are assumed to
be implemented.

Note that this table is informational only - the runtime services
themselves must be callable and return EFI_UNSUPPORTED if they are
marked as unavailable in the RT properties table.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ