Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1567343

Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted

From Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted
Date 2017-01-26 12:30 +0100
Message-ID <t3QpB-6Hl-39@gated-at.bofh.it> (permalink)
References <t3CZk-6Zx-25@gated-at.bofh.it> <t3E53-7DH-17@gated-at.bofh.it>
Organization Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Show all headers | View raw


On Wed, Jan 25, 2017 at 03:12:45PM -0700, Jason Gunthorpe wrote:
> On Wed, Jan 25, 2017 at 11:03:48PM +0200, Jarkko Sakkinen wrote:
> > Fixes: 5ca4c20cfd37 ("keys, trusted: select hash algorithm for TPM2 chips")
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> 
> I think you need a commit message for this.. Is this following the
> spec?

Yes.

Format one commands the upper bits contain either handle, session or
parameter index. Bit 7 tells whether it the error code is format zero or
one. Format zero errors do not require masking. They do not have any
data in addition to value.

The reason why this bug was repeated in TPM space code was that I
originally melded that code form my trusted keys code (copy pasted and
edited message construction).

"The error code handling is bogus as any error code that has the bits
set that TPM_RC_HASH could pass. Implemented tpm2_rc_value() helper to
parse the error value from FMT0 and FMT1 error codes to use to check the
error so that these types of mistakes is prevented in the future."

Is that suitable or do you want me to add something?

Jarkko

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] tpm: fix RC value check in tpm2_seal_trusted Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-25 22:10 +0100
  Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2017-01-25 23:20 +0100
    Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-26 12:30 +0100
      Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2017-01-26 19:40 +0100
        Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-27 07:50 +0100
          Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2017-01-27 17:30 +0100
            Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-29 16:20 +0100

csiph-web