Closed diabonas closed 5 years ago
Thank you for reporting the issue! I was able to reproduce it, and we'll look into it.
I found the problem and will post a fix. If you want to get ahead of the update, just go to TableDrivenDMarshal.c and change TPM_RC_ATTRIBUTES to TPM_RC_RESERVED_BITS (it's around line 531).
That's what this pull request does ;)
According to the TPM 2.0 Library specification, Part 2 (rev. 1.38), Table 2, a
TPM_RC_RESERVED_BITS
error shall be used if "a non-zero value was found in a reserved field of an attribute structure (TPMA_)". This is done correctly when compiling withTABLE_DRIVEN_MARSHAL=NO
, cf.Marshal.c
, but forTABLE_DRIVEN_MARSHAL=YES
the incorrect errorTPM_RC_ATTRIBUTES
is used instead.This issue came up when experimenting with using the simulator for tpm2-tss (cf. https://github.com/tpm2-software/tpm2-tss/pull/1544) because it caused a test failure in
test/tpmclient/tpmclient.int
.