Skip to content
Commit 8a7d4cf9 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

fdt_region: Check for a single root node of the correct name



At present fdt_find_regions() assumes that the FIT is a valid devicetree.
If the FIT has two root nodes this is currently not detected in this
function, nor does libfdt's fdt_check_full() notice. Also it is possible
for the root node to have a name even though it should not.

Add checks for these and return -FDT_ERR_BADSTRUCTURE if a problem is
detected.

CVE-2021-27097

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Reported-by: default avatarBruce Monroe <bruce.monroe@intel.com>
Reported-by: default avatarArie Haenel <arie.haenel@intel.com>
Reported-by: default avatarJulien Lenoir <julien.lenoir@intel.com>
parent 6144438f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment