summaryrefslogtreecommitdiff
path: root/doc/develop
diff options
context:
space:
mode:
authorJames Hilliard <[email protected]>2026-02-23 13:40:04 -0700
committerTom Rini <[email protected]>2026-02-24 10:28:37 -0600
commit0b2939464feef001e4d4b69578f29a7a4d572fcd (patch)
tree20ebac65c565954a0f6b4b345a09e587bb9a3d6b /doc/develop
parent26048cdb4ce35b4119e82df2aafb1ebf3f611480 (diff)
boot: fit: validate FDT/DTO payload before fdt_open_into()
boot_get_fdt_fit_into_buffer() calls fdt_open_into() for both the base FDT and overlay DTO blobs loaded from a FIT image. Those blobs come from FIT payload data. In the overlay path, fit_image_load() is called with FIT_LOAD_IGNORED, so the IH_TYPE_FLATDT header check in fit_image_load() is skipped. This leaves fdt_open_into() to consume header-derived offsets/sizes from unvalidated input. Validate the full blob against the payload length first with fdt_check_full(fdtsrcbuf, srclen), then proceed with fdt_totalsize() and fdt_open_into(). This fixes Coverity CID 644638 (TAINTED_SCALAR). Fixes: 5ebf0c55a23 ("image: fit: Apply overlays using aligned writable FDT copies") Link: https://lore.kernel.org/all/20260223195109.GG3233182@bill-the-cat/ Signed-off-by: James Hilliard <[email protected]> Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'doc/develop')
0 files changed, 0 insertions, 0 deletions