app: aboot: check for address overlap for the tags_addr
Validate the tags_addr to check if it overlaps with ABOOT
in case of DTB appened in the kernel image.
CRs-Fixed: 674071
Change-Id: I7535e75987a1963c3b55cb9a8f8988fb8354b09b
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index 4b887f0..0b6baf7 100755
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -951,6 +951,13 @@
#endif /* TZ_SAVE_KERNEL_HASH */
} else {
+
+ /* Validate the tags_addr */
+ if (check_aboot_addr_range_overlap(hdr->tags_addr, kernel_actual))
+ {
+ dprintf(CRITICAL, "Device tree addresses overlap with aboot addresses.\n");
+ return -1;
+ }
/*
* If appended dev tree is found, update the atags with
* memory address to the DTB appended location on RAM.