diff options
author | Emanuele Ghidoli <emanuele.ghidoli@toradex.com> | 2024-04-03 12:32:14 +0200 |
---|---|---|
committer | Emanuele Ghidoli <emanuele.ghidoli@toradex.com> | 2024-04-04 09:23:47 +0200 |
commit | 3428b470191ca0f5bb48d95e77e8ba48d9708a42 (patch) | |
tree | e38a0a2e505058150e2ed1d10b7e9624680c16de /arch/xtensa/cpu | |
parent | d262075124dcfe2170acfc7db25a1a6155658ec6 (diff) |
imx: spl: fix u-boot fit loading
Override weak spl_load_simple_fix_load function only when necessary
to manage signature verification via High Assurance Boot (HAB).
In particular if spl_load_simple_fix_load function is overridden also
the board_spl_fit_size_align must be overridden to provide the correct
buffer size.
This ensures correct sizing of the upload buffer and prevents buffer
overflows which may lead to memory corruption and system reset.
Since an IVT header is checked using just a byte magic number, and the
memory beyond the buffer size is random, this fix addresses an issue
where the presence of an apparently valid IVT header beyond the buffer
size could result in unintended memcpy operations to random memory
addresses, often leading to system reset.
Upstream-Status: Inappropriate [downstream specific]
Upstream U-Boot fixed this differently in combination with binman to
create the final bootcontainer.
Commit 6039e0edc854 ("imx: hab: Simplify the mechanism")
Fixes: 9de354485800 ("imx: spl: implement spl_load_simple_fit_fix_load")
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Diffstat (limited to 'arch/xtensa/cpu')
0 files changed, 0 insertions, 0 deletions