[PATCH] test: dm: fdtdec: Validate FDT size in unit test

Tom Rini trini at konsulko.com
Wed Dec 10 19:09:33 CET 2025


On Wed, Dec 10, 2025 at 11:12:51AM -0600, Tom Rini wrote:
> On Tue, 09 Dec 2025 07:55:38 -0800, Adriana Nicolae wrote:
> 
> > The current FDT decoding tests calculate the memory required
> > for FDT manipulation by directly adding a fixed margin to
> > fdt_totalsize(gd->fdt_blob). The static analyzer flagged
> > "gd->fdt_blob->totalsize" as a tainted value being passed
> > to fdt_open_into().
> > 
> > Ensure the size is validated by checking that the total size
> > is within a reasonable maximum FDT limit for unit tests.
> > 
> > [...]
> 
> Applied to u-boot/master, thanks!
> 
> [1/1] test: dm: fdtdec: Validate FDT size in unit test
>       commit: 93d000bc5237a82e74d437b5fc3c5fdf5237df2d

Now, frustratingly, this did not make Coverity happy. Functionally,
we've got validation going on now, so I'm going to just mark this as
intentional or acceptable risk, depending on what the exact phrase
Coverity provides in the dashboard. Thanks for looking at this!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20251210/dcc0cab6/attachment.sig>


More information about the U-Boot mailing list