Re: [v1,0/3] fit: cipher: bounds checks on the ciphered image path

Simon Glass <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <CAFLszTiGNt5cmztM-c+irvFF3jnSmbVrh0EAVqio9jM3kL7Ruw@mail.gmail.com>
Hi Pranav,

On 2026-08-15T22:07:52, Pranav Rajendran <[email protected]> wrote:

> I have kept them as separate patches since they are independent defects
> with different consequences, but I am happy to squash 1 and 3 if you
> would rather have one change per function.

Please keep them separate - distinct Fixes: targets, and easier to
back-port independently.

Since these are security fixes, how about adding regression tests?
test/lib/test_aes.c covers the primitive, but nothing exercises
image_aes_decrypt() or fit_image_get_data_size_unciphered() against a
malformed FIT. A small sandbox test constructing a FIT with a
non-block-aligned 'data', a truncated 'data-size-unciphered', and an
oversized unciphered size would pin all three down. What do you think?

Regards,
Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.