arm: am33xx: security: Fix size calculation on header
Subsystems (3)
PATCH 1/1 arm: am33xx: security: Fix size calculation on header
From: Madan Srinivas <[email protected]>
Fix the size calculation in the verify boot. The header size should be subtracted from the image size, not be assigned to the image size.
Fixes 0830d72bb9f8 ("arm: am33xx: security: adds auth support for encrypted images")
Signed-off-by Madan Srinivas <[email protected]>
Signed-off-by Dan Murphy <[email protected]>
Signed-off-by Andrew F. Davis <[email protected]>
--- arch/arm/mach-omap2/sec-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/sec-common.c +1 -1
@@ -130,7 +130,7 @@ int secure_boot_verify_image(void **image, size_t *size) *size = sig_addr - cert_addr;/* Subtract out the signature size */ /* Subtract header if present */ if (strncmp ((char *)sig_addr,"CERT_ISW_" ,9 ) ==0 ) - *size = ((u32 *)*image)[HEADER_SIZE_OFFSET ]; + *size -= ((u32 *)*image)[HEADER_SIZE_OFFSET ]; cert_size = *size;/* Check if image load address is 32-bit aligned */
Signature · 1 line
2.15.1
PATCH 1/1 arm: am33xx: security: Fix size calculation on header
Quoted 5 lines · Andrew F. Davis
From: Madan Srinivas <[email protected]>
Fix the size calculation in the verify boot. The header size should be subtracted from the image size, not be assigned to the image size.
Reviewed-by Lokesh Vutla <[email protected]>
Thanks and regards,
Lokesh
Quoted 11 lines · Andrew F. Davis
From: Madan Srinivas <[email protected]>
Fix the size calculation in the verify boot. The header size should be subtracted from the image size, not be assigned to the image size.
Fixes 0830d72bb9f8 ("arm: am33xx: security: adds auth support for encrypted images")Signed-off-by Madan Srinivas <[email protected]>Signed-off-by Dan Murphy <[email protected]>Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Lokesh Vutla <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180119/493f03ee/attachment.sig>