FWU: Check for overlaps when loading images
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Thu, 1 Jun 2017 12:40:17 +0000 (13:40 +0100)
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Thu, 1 Jun 2017 13:52:11 +0000 (14:52 +0100)
commit128daee29868a8a4a7cf00508126ea68311fd1cc
treea92dead477d6afb662f0a366011b6a4821d6efd2
parent79eb1aff7850f6b23a302835d7a08936d74e8ce2
FWU: Check for overlaps when loading images

Added checks to FWU_SMC_IMAGE_COPY to prevent loading data into a
memory region where another image data is already loaded.

Without this check, if two images are configured to be loaded in
overlapping memory regions, one of them can be loaded and
authenticated and the copy function is still able to load data from
the second image on top of the first one. Since the first image is
still in authenticated state, it can be executed, which could lead to
the execution of unauthenticated arbitrary code of the second image.

Firmware update documentation updated.

Change-Id: Ib6871e569794c8e610a5ea59fe162ff5dcec526c
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
bl1/bl1_fwu.c
docs/firmware-update.md
docs/porting-guide.md