[PATCH v1 2/2] test/py: test kernel_noload decompression buffer overflow

Simon Glass sjg at chromium.org
Wed May 27 07:00:24 CEST 2026


On 2026-05-20T04:45:49, Aristo Chen <aristo.chen at canonical.com> wrote:
> test/py: test kernel_noload decompression buffer overflow
>
> Add a sandbox test that builds a FIT containing a compressed
> kernel_noload kernel whose uncompressed size far exceeds four times its
> compressed size. bootm_load_os() sizes the decompression buffer to
> ALIGN(image_len * 4, SZ_1M), so such an image must be rejected with a
> decompression error rather than overflowing the buffer.
>
> The test verifies that 'bootm loados' reports the failure instead of
> decompressing past the end of the buffer.
>
> Signed-off-by: Aristo Chen <aristo.chen at canonical.com>
>
> test/py/tests/test_fit.py | 84 +++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 84 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list