Closed oberien closed 5 years ago
Appears fixed on 9381559b055b4b7:
$ tpm2_pcrlist -L sha1:0,1,2,3,4,5,6,7,8,9,10,11,12 -o pcrs.out
$ tpm2_createpolicy --policy-pcr -F pcrs.out -g sha1 -L sha1:0,1,2,3,4,5,6,7,8,9,10,11,12 -o policy.dat
ERROR: Number of PCR is limited to 8
ERROR: Could not build pcr policy
ERROR: Unable to run tpm2_createpolicy
Duplicate of #778
When executing the following command with tpm2-tools 3.0.4
if more than 12 registers are specified (like 13 in this example), the function
Tss2_Sys_GetTctiContext
segfaults in the functionsapi_teardown_full
. The passedsapi_context
pointer points to nonexistent memory according to gdb.The policy is sucessfully written to the file, because it only segfaults in the teardown after command execution is finished.
https://github.com/tpm2-software/tpm2-tools/blob/12bfda88f02fa056ac10fbe8f1f901afa9b0ee67/tools/tpm2_tool.c#L59-L69