diff options
author | Simon Glass <sjg@chromium.org> | 2021-03-23 14:04:10 +1300 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2021-03-23 12:13:06 +1100 |
commit | a2def5479950d066dcf829b8c1a22874d0aea9a4 (patch) | |
tree | 4ea530cd876d5c50808de77128abd9e375b553f7 /tests/testdata.h | |
parent | 4ca61f84dc210ae78376d992c1ce6ebe40ecb5be (diff) | |
download | dtc-a2def5479950d066dcf829b8c1a22874d0aea9a4.zip dtc-a2def5479950d066dcf829b8c1a22874d0aea9a4.tar.gz dtc-a2def5479950d066dcf829b8c1a22874d0aea9a4.tar.bz2 |
libfdt: Check that the root-node name is empty
The root node is supposed to have an empty name, but at present this is
not checked. The behaviour of such a tree is not well defined. Most
software rightly assumes that the root node is at offset 0 and does not
check the name. This oddity was discovered as part of a security
investigation into U-Boot verified boot.
Add a check for this to fdt_check_full().
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Arie Haenel <arie.haenel@intel.com>
Reported-by: Julien Lenoir <julien.lenoir@intel.com>
Message-Id: <20210323010410.3222701-2-sjg@chromium.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/testdata.h')
-rw-r--r-- | tests/testdata.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/testdata.h b/tests/testdata.h index d03f352..4f9e3ba 100644 --- a/tests/testdata.h +++ b/tests/testdata.h @@ -56,4 +56,5 @@ extern struct fdt_header ovf_size_strings; extern struct fdt_header truncated_string; extern struct fdt_header truncated_memrsv; extern struct fdt_header two_roots; +extern struct fdt_header named_root; #endif /* ! __ASSEMBLY */ |