diff options
| author | Raymond Mao <[email protected]> | 2026-05-06 10:55:33 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-05-08 15:49:27 -0600 |
| commit | 0a31d3128ee6928d7eac5b830ef79d0a27e3f0a7 (patch) | |
| tree | 4a9bde626515521f5ec66fce3a98c3ec7d71fdaa /include | |
| parent | 26b17dbdb0f19efa67365b30d939d3572871e8ca (diff) | |
lib: fdtdec: validate bloblist FDT before consuming libfdt size
Coverity Scan defects are observed in fdtdec_apply_bloblist_dtos(),
since the live FDT taken from the bloblist is passed to libfdt helpers
which consume header size/offset fields:
- fdt_open_into()
- fdt_pack()
Validate the bloblist FDT with fdt_check_full() before calling
fdt_open_into() and again after applying overlays before calling
fdt_pack(). This makes the libfdt consumers operate on a checked FDT
blob while keeping the existing flow unchanged.
Also normalize libfdt return codes from this path to errno values,
including the overlay callback path through bloblist_apply_blobs().
Fixes: b70cbbfbf94f ("fdtdec: apply DT overlays from bloblist")
Addresses-Coverity-ID: CID 645837: (TAINTED_SCALAR)
Signed-off-by: Raymond Mao <[email protected]>
Reviewed-by: Alexander Sverdlin <[email protected]>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
