[PATCH v3 3/3] test/py: test kernel_noload decompression buffer overflow
Simon Glass
sjg at chromium.org
Thu Jun 18 16:23:02 CEST 2026
On Fri, 5 Jun 2026 at 16:43, Aristo Chen <aristo.chen at canonical.com> wrote:
>
> Add sandbox tests that exercise the per-image decompression buffer that
> bootm_load_os() allocates for a compressed kernel_noload image
> (ALIGN(image_len * 8, SZ_1M)).
>
> The overflow test builds a FIT whose decompressed size far exceeds the
> per-image buffer and asserts that 'bootm loados' rejects it with a
> decompression error rather than overflowing.
>
> The boundary test builds a FIT whose decompressed size equals the
> per-image buffer exactly and asserts that 'bootm loados' succeeds,
> guarding against an off-by-one rejection at the buffer limit.
>
> Signed-off-by: Aristo Chen <aristo.chen at canonical.com>
> ---
> test/py/tests/test_fit.py | 125 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 125 insertions(+)
>
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list