All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: tpmdd-devel@lists.sourceforge.net, james.l.morris@oracle.com,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org, zohar@linux.vnet.ibm.com
Subject: Re: [PATCH] tpm: Fix expected number of response bytes of TPM1.2 PCR Extend
Date: Wed, 15 Feb 2017 20:09:03 +0200	[thread overview]
Message-ID: <20170215180903.3simazptqnlhbqi6@intel.com> (raw)
In-Reply-To: <1487177783-15687-1-git-send-email-stefanb@linux.vnet.ibm.com>

On Wed, Feb 15, 2017 at 11:56:23AM -0500, Stefan Berger wrote:
> The TPM1.2 PCR Extend operation only returns 20 bytes in the body,
> which is the size of the PCR state.
> 
> This fixes a problem where IMA gets errors with every PCR Extend.
> 
> Fixes: c659af78eb7b ("tpm: Check size of response before accessing data")
> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> Acked-by: Mimi Zohar <zohar@us.ibm.com>

Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

/Jarkko

> ---
>  drivers/char/tpm/tpm-interface.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
> index 6e368ee..bd2128e 100644
> --- a/drivers/char/tpm/tpm-interface.c
> +++ b/drivers/char/tpm/tpm-interface.c
> @@ -767,7 +767,7 @@ EXPORT_SYMBOL_GPL(tpm_pcr_read);
>  
>  #define TPM_ORD_PCR_EXTEND cpu_to_be32(20)
>  #define EXTEND_PCR_RESULT_SIZE 34
> -#define EXTEND_PCR_RESULT_BODY_SIZE 24
> +#define EXTEND_PCR_RESULT_BODY_SIZE 20
>  static const struct tpm_input_header pcrextend_header = {
>  	.tag = TPM_TAG_RQU_COMMAND,
>  	.length = cpu_to_be32(34),
> -- 
> 2.4.3
> 

  reply	other threads:[~2017-02-15 18:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 16:56 [PATCH] tpm: Fix expected number of response bytes of TPM1.2 PCR Extend Stefan Berger
2017-02-15 18:09 ` Jarkko Sakkinen [this message]
     [not found]   ` <20170215180903.3simazptqnlhbqi6-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-02-15 18:17     ` Stefan Berger
2017-02-17 12:46   ` Mimi Zohar
2017-02-17 18:45     ` Jarkko Sakkinen
     [not found]       ` <20170217184546.ik2vv5bleahqhkwv-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-02-17 18:48         ` Mimi Zohar
2017-02-17 18:48           ` Mimi Zohar

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=20170215180903.3simazptqnlhbqi6@intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=james.l.morris@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=stefanb@linux.vnet.ibm.com \
    --cc=tpmdd-devel@lists.sourceforge.net \
    --cc=zohar@linux.vnet.ibm.com \
    /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.