From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: efi_loader: efi_variable_parse_signature() returns NULL on error
Date: Thu, 7 May 2020 16:15:29 +0900 [thread overview]
Message-ID: <20200507071529.GE3330@laputa> (raw)
In-Reply-To: <20200507001318.GA6451@nox.fritz.box>
On Thu, May 07, 2020 at 02:13:18AM +0200, Patrick Wildt wrote:
> efi_variable_parse_signature() returns NULL on error, so IS_NULL()
> is an incorrect check. The goto err leads to pkcs7_free_message(),
> which works fine on a NULL ptr.
>
> Signed-off-by: Patrick Wildt <patrick@blueri.se>
Reviewed-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
>
> diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c
> index 58f8fae358..c5fe896de2 100644
> --- a/lib/efi_loader/efi_variable.c
> +++ b/lib/efi_loader/efi_variable.c
> @@ -519,9 +519,8 @@ static efi_status_t efi_variable_authenticate(u16 *variable,
> var_sig = efi_variable_parse_signature(auth->auth_info.cert_data,
> auth->auth_info.hdr.dwLength
> - sizeof(auth->auth_info));
> - if (IS_ERR(var_sig)) {
> + if (!var_sig) {
> debug("Parsing variable's signature failed\n");
> - var_sig = NULL;
> goto err;
> }
>
next prev parent reply other threads:[~2020-05-07 7:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 0:13 efi_loader: efi_variable_parse_signature() returns NULL on error Patrick Wildt
2020-05-07 7:14 ` AKASHI Takahiro
2020-05-07 7:15 ` AKASHI Takahiro [this message]
2020-05-07 13:53 ` Heinrich Schuchardt
2020-05-07 23:18 ` Patrick Wildt
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=20200507071529.GE3330@laputa \
--to=takahiro.akashi@linaro.org \
--cc=u-boot@lists.denx.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 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.