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 'type_mismatch_v1' panic on boot when `CFG_CORE_ASLR=y`

Signed-off-by: Abhishek Revadekar <abhishek.rvdkr@yahoo.com>
  • Loading branch information
Abhishek-612 committed May 3, 2024
1 parent e44ccdb commit f062bcb
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 f062bcb

Please sign in to comment.