mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] bootm: bootm_open_initrd_uimage(): propagate error if initrd verification fails
Date: Tue, 19 Sep 2017 13:49:07 +0200	[thread overview]
Message-ID: <20170919114907.17916-1-mkl@pengutronix.de> (raw)

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

             reply	other threads:[~2017-09-19 11:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 11:49 Marc Kleine-Budde [this message]
2017-09-20  6:21 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170919114907.17916-1-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox