From: Sascha Hauer <s.hauer@pengutronix.de>
To: Marc Kleine-Budde <mkl@pengutronix.de>, g@pengutronix.de
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] bootm: bootm_open_initrd_uimage(): propagate error if initrd verification fails
Date: Wed, 20 Sep 2017 08:21:22 +0200 [thread overview]
Message-ID: <20170920062122.gxn7guk4fqc5y7pl@pengutronix.de> (raw)
In-Reply-To: <20170919114907.17916-1-mkl@pengutronix.de>
On Tue, Sep 19, 2017 at 01:49:07PM +0200, Marc Kleine-Budde wrote:
> 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>
Applied, thanks
Sascha
> ---
> 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
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2017-09-20 6:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 11:49 Marc Kleine-Budde
2017-09-20 6:21 ` Sascha Hauer [this message]
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=20170920062122.gxn7guk4fqc5y7pl@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=g@pengutronix.de \
--cc=mkl@pengutronix.de \
/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