[PATCH v1 2/2] test: spl: check load_simple_fit() rejects an oversized data-size
Simon Glass
sjg at chromium.org
Thu Jun 25 10:03:50 CEST 2026
On 2026-06-18T15:47:45, Aristo Chen <aristo.chen at canonical.com> wrote:
> test: spl: check load_simple_fit() rejects an oversized data-size
>
> Add a regression test that builds a FIT with external data, inflates
> the data-size property far beyond the image and any plausible load
> region, and confirms that spl_load_simple_fit() returns -EFBIG instead
> of reading the declared size off the device. Without the bounds check
> in load_simple_fit() this test overruns memory and crashes; with it the
> load is rejected cleanly.
>
> Signed-off-by: Aristo Chen <aristo.chen at canonical.com>
>
> test/image/spl_load.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list