Control: severity 1025954 serious

On 2022-12-12, Arnaud Ferraris wrote:
> Using u-boot 21.10 (which does not have support for KASLR), the generated
> extlinux.conf makes the system unbootable.
> This is most likely a bug in u-boot, causing it to ignore any unknown command
> *and all the following ones*:
>
>   Retrieving file: /extlinux/extlinux.conf
>   843 bytes read in 17 ms (47.9 KiB/s)
>   Ignoring unknown command:     kaslrseed
>   Ignoring unknown command:     append
>   Ignoring unknown command:     kaslrseed
>   Ignoring unknown command:     append
>
> Attached is a patch working around this issue in u-boot-menu.

Oh wow, apologies for that... and thanks for the patch!

> From 3cd399d3c853f452711b6e5b37098b89e1633c51 Mon Sep 17 00:00:00 2001
> From: Arnaud Ferraris <arnaud.ferra...@collabora.com>
> Date: Mon, 12 Dec 2022 14:59:44 +0100
> Subject: [PATCH] u-boot-update: put `kaslrseed` last
>
> When using a version of u-boot without KASLR support (21.10 in this
> case), having this command set makes all following lines to be ignored,
> even though they contain valid commands:
>
>   Retrieving file: /extlinux/extlinux.conf
>   843 bytes read in 17 ms (47.9 KiB/s)
>   Ignoring unknown command:   kaslrseed
>   Ignoring unknown command:   append
>   Ignoring unknown command:   kaslrseed
>   Ignoring unknown command:   append
>
> Ensuring `kaslrseed` is the last command is enough this work around this
> `u-boot` bug.
> ---
>  u-boot-update | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/u-boot-update b/u-boot-update
> index effd304..f42cacb 100755
> --- a/u-boot-update
> +++ b/u-boot-update
> @@ -189,8 +189,8 @@ label l${_NUMBER}
>       ${_INITRD}
>       ${_FDT}
>       ${_FDTOVERLAYS}
> -     kaslrseed
> -     append ${U_BOOT_ROOT} ${U_BOOT_PARAMETERS}"
> +     append ${U_BOOT_ROOT} ${U_BOOT_PARAMETERS}
> +     kaslrseed"
>  
>       fi

I'd almost be more inclined to revert adding kaslrseed support, as this
seems to rely on undefined behavior...

I'll do a bit more testing and see what the best way forward is.

live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to