[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1592856871.4987.21.camel@linux.ibm.com>
Date: Mon, 22 Jun 2020 16:14:31 -0400
From: Mimi Zohar <zohar@...ux.ibm.com>
To: Maurizio Drocco <maurizio.drocco@....com>, roberto.sassu@...wei.com
Cc: Silviu.Vlasceanu@...wei.com, dmitry.kasatkin@...il.com,
jejb@...ux.ibm.com, jmorris@...ei.org,
linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org, serge@...lyn.com,
mdrocco@...ux.vnet.ibm.com
Subject: Re: [PATCH] ima_evm_utils: extended calc_bootaggr to PCRs 8 - 9
On Thu, 2020-06-18 at 16:11 -0400, Maurizio Drocco wrote:
> From: Maurizio <maurizio.drocco@....com>
>
> If PCRs 8 - 9 are set (i.e. not all-zeros), cal_bootaggr should include
> them into the digest.
>
> Signed-off-by: Maurizio Drocco <maurizio.drocco@....com>
> ---
> src/evmctl.c | 16 +++++++++++++++-
> 1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/src/evmctl.c b/src/evmctl.c
> index 1d065ce..554571e 100644
> --- a/src/evmctl.c
> +++ b/src/evmctl.c
> @@ -1930,6 +1930,18 @@ static void calc_bootaggr(struct tpm_bank_info *bank)
> }
> }
>
> + if (strcmp(bank->algo_name, "sha1") != 0) {
> + for (i = 8; i < 10; i++) {
> + if (memcmp(bank->pcr[i], zero, bank->digest_size) != 0) {
> + err = EVP_DigestUpdate(pctx, bank->pcr[i], bank->digest_size);
> + if (!err) {
> + log_err("EVP_DigestUpdate() failed\n");
> + return;
> + }
> + }
> + }
> + }
Roberto, now that we're only including the PCRs 8 & 9 in the non-sha1
"boot_aggregate", they can always be included.
Please reflect this change in the patch description and, here, in the
code.
thanks,
Mimi
Powered by blists - more mailing lists