[PATCH v3 5/5] tpm: ensure that output of PCR read contains the correct digest size

Jarkko Sakkinen jarkko.sakkinen at linux.intel.com
Thu Nov 1 14:32:48 UTC 2018


On Wed, 31 Oct 2018, Roberto Sassu wrote:
> On 10/30/2018 8:52 PM, Jarkko Sakkinen wrote:
>> On Tue, 30 Oct 2018, Roberto Sassu wrote:
>>> This patch ensures that the digest size returned by the TPM during a PCR
>>> read matches the size of the algorithm passed as argument to
>>> tpm2_pcr_read(). The check is performed after information about the PCR
>>> banks has been retrieved.
>>> 
>>> Signed-off-by: Roberto Sassu <roberto.sassu at huawei.com>
>> 
>> What is the scenarion when this can happen (should be explained in
>> the commit message)?
>
> Without an HMAC session, the request/response payload can be modified.
> This patch ensures that the digest size in the payload is equal to the
> size of the algorithm specified by the caller.

i.e. it protect against memory corruption that could happen in the bus?
Please state this.

> For me it is ok to remove this patch from the set. It was requested by
> Mimi.

For me it is not ok remove this patch :-) I just want that note to the
commit message in order to have it documented.

/Jarkko



More information about the Linux-security-module-archive mailing list