On 02/15/2017 01:09 PM, Jarkko Sakkinen wrote:
> 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 <[email protected]>
>> Acked-by: Mimi Zohar <[email protected]>
> Reviewed-by: Jarkko Sakkinen <[email protected]>
>
> /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


We should probably rename the above to EXTEND_PCR_BUFFER_SIZE. It's the 
input buffer that's size 34, the output is 30 bytes.

    Stefan


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
tpmdd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

Reply via email to