arm-trusted-firmware/bl1
Sandrine Bailleux 949a52d24e Fix integer overflows in BL1 FWU code
Before adding a base address and a size to compute the end
address of an image to copy or authenticate, check this
won't result in an integer overflow. If it does then consider
the input arguments are invalid.

As a result, bl1_plat_mem_check() can now safely assume the
end address (computed as the sum of the base address and size
of the memory region) doesn't overflow, as the validation is
done upfront in bl1_fwu_image_copy/auth(). A debug assertion
has been added nonetheless in the ARM implementation in order
to help catching such problems, should bl1_plat_mem_check()
be called in a different context in the future.

Fixes TFV-1: Malformed Firmware Update SMC can result in copy
of unexpectedly large data into secure memory

Change-Id: I8b8f8dd4c8777705722c7bd0e8b57addcba07e25
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Signed-off-by: Dan Handley <dan.handley@arm.com>
2016-12-20 11:43:10 +00:00
..
aarch32 AArch32: Fix detection of virtualization support 2016-09-23 14:34:29 +01:00
aarch64 Define and use no_ret macro where no return is expected 2016-12-05 14:55:35 +00:00
tbbr Enable TRUSTED_BOARD_BOOT support for LOAD_IMAGE_V2=1 2016-12-14 14:37:53 +00:00
bl1.ld.S Introduce SEPARATE_CODE_AND_RODATA build flag 2016-07-08 14:55:11 +01:00
bl1.mk AArch32: Add generic changes in BL1 2016-09-21 16:27:27 +01:00
bl1_fwu.c Fix integer overflows in BL1 FWU code 2016-12-20 11:43:10 +00:00
bl1_main.c AArch32: Add generic changes in BL1 2016-09-21 16:27:27 +01:00
bl1_private.h AArch32: Add generic changes in BL1 2016-09-21 16:27:27 +01:00