All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: am33xx: security: Fix size calculation on header
@ 2018-01-09 20:32 Andrew F. Davis
  2018-01-10  8:55 ` Lokesh Vutla
  2018-01-19 21:14 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew F. Davis @ 2018-01-09 20:32 UTC (permalink / raw)
  To: u-boot

From: Madan Srinivas <madans@ti.com>

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 <madans@ti.com>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 arch/arm/mach-omap2/sec-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c
index 2630e7d316..674517e30b 100644
--- a/arch/arm/mach-omap2/sec-common.c
+++ b/arch/arm/mach-omap2/sec-common.c
@@ -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 */
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] arm: am33xx: security: Fix size calculation on header
  2018-01-09 20:32 [U-Boot] [PATCH] arm: am33xx: security: Fix size calculation on header Andrew F. Davis
@ 2018-01-10  8:55 ` Lokesh Vutla
  2018-01-19 21:14 ` [U-Boot] " Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Lokesh Vutla @ 2018-01-10  8:55 UTC (permalink / raw)
  To: u-boot



On Wednesday 10 January 2018 02:02 AM, Andrew F. Davis wrote:
> From: Madan Srinivas <madans@ti.com>
> 
> 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 <lokeshvutla@ti.com>

Thanks and regards,
Lokesh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] arm: am33xx: security: Fix size calculation on header
  2018-01-09 20:32 [U-Boot] [PATCH] arm: am33xx: security: Fix size calculation on header Andrew F. Davis
  2018-01-10  8:55 ` Lokesh Vutla
@ 2018-01-19 21:14 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2018-01-19 21:14 UTC (permalink / raw)
  To: u-boot

On Tue, Jan 09, 2018 at 02:32:41PM -0600, Andrew F. Davis wrote:

> From: Madan Srinivas <madans@ti.com>
> 
> 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 <madans@ti.com>
> Signed-off-by: Dan Murphy <dmurphy@ti.com>
> Signed-off-by: Andrew F. Davis <afd@ti.com>
> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-19 21:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-09 20:32 [U-Boot] [PATCH] arm: am33xx: security: Fix size calculation on header Andrew F. Davis
2018-01-10  8:55 ` Lokesh Vutla
2018-01-19 21:14 ` [U-Boot] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.