PolicyTemplate calculation incorrect
Closed this issue · 1 comments
Spec Command Spec:
policyDigest_new ≔ H_policyAlg(policyDigest_old || TPM_CC_PolicyTemplate || templateHash)
However, we do not include policyDigest_old
in the policy digest calculation. I am working on a fix.
tpm2-tss/src/tss2-fapi/ifapi_policy_calculate.c
Lines 1271 to 1281 in f5d851e
@JuergenReppSIT Please correct me if I have missed something
I think this was not caught by our tests due to a bug in tpm2-tss/test/integration/policy-execute.int.c where if an error occurs (see line 787), we do not set the return code variable r
accordingly.
tpm2-tss/test/integration/policy-execute.int.c
Lines 778 to 809 in f5d851e
I will also have this be part of the fix.