From a359f7da402e257330484bc48081442b070277e8 Mon Sep 17 00:00:00 2001 From: Abhishek Revadekar Date: Tue, 7 May 2024 12:22:39 -0400 Subject: [PATCH] core: arm: use fdt64_ld() to read possibly unaligned kaslr-seed Read possibly unaligned kaslr-seed using `fdt64_ld()` to avoid ubsan panic while booting with `CFG_CORE_ASLR=y` Acked-by: Jens Wiklander Reviewed-by: Jerome Forissier Signed-off-by: Abhishek Revadekar --- core/arch/arm/kernel/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/arch/arm/kernel/boot.c b/core/arch/arm/kernel/boot.c index e30b9b46c11..9ce891f55b9 100644 --- a/core/arch/arm/kernel/boot.c +++ b/core/arch/arm/kernel/boot.c @@ -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 */