mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] bootm: bootm_open_initrd_uimage(): propagate error if initrd verification fails
@ 2017-09-19 11:49 Marc Kleine-Budde
  2017-09-20  6:21 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Kleine-Budde @ 2017-09-19 11:49 UTC (permalink / raw)
  To: barebox

If the verification of an initrd inside of an uImage fails an error message is
printed but the error is not propagated. Although this is not security
relevant, as the verification is currently only a CRC32 check, the error should
be returned. This patch fixes the problem.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 common/bootm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/bootm.c b/common/bootm.c
index 81625d9157cc..eebaa799f548 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -173,6 +173,7 @@ static int bootm_open_initrd_uimage(struct image_data *data)
 			if (ret) {
 				printf("Checking data crc failed with %s\n",
 					strerror(-ret));
+				return ret;
 			}
 		}
 		uimage_print_contents(data->initrd);
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2017-09-20  6:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-19 11:49 [PATCH] bootm: bootm_open_initrd_uimage(): propagate error if initrd verification fails Marc Kleine-Budde
2017-09-20  6:21 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox