fuzzing: Validate FDT size before walking it
As a user of libfdt, the fuzzer is expected to fully validate the
untrusted DT before reading from it so call fdt_check_full(), which also
validates the size of the DT (as described in its header) against the
received buffer size, to prevent OOBs.
Bug: 230794395
Test: SANITIZE_HOST=address m libfdt_fuzzer
Test: out/host/linux-x86/fuzz/x86_64/libfdt_fuzzer/libfdt_fuzzer
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Change-Id: Ic4f4e7355e4978022001ee34b21fc7219adf1d56
1 file changed