Skip to content

Commit

Permalink
core: arm: use fdt64_ld() to read possibly unaligned kaslr-seed
Browse files Browse the repository at this point in the history
Read possibly unaligned kaslr-seed using `fdt64_ld()`
to avoid ubsan panic while booting with `CFG_CORE_ASLR=y`

Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Abhishek Revadekar <abhishek.rvdkr@yahoo.com>
  • Loading branch information
Abhishek-612 authored and jforissier committed May 8, 2024
1 parent 59c7dfb commit a359f7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/arch/arm/kernel/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ unsigned long __weak get_aslr_seed(void)
goto err;
}

return fdt64_to_cpu(*seed);
return fdt64_to_cpu(fdt64_ld(seed));

err:
/* Try platform implementation */
Expand Down

0 comments on commit a359f7d

Please sign in to comment.