Closed dnoliver closed 5 years ago
This is the same issue as #778: it is not possible to use more than 8 PCRs due to limitations of the TPM 2.0 specification. Of course tpm2_createpolicy
shouldn't crash regardless, and this was fixed on master in #780, which produces the much more helpful error message
ERROR: Number of PCR is limited to 8
ERROR: Could not build pcr policy
ERROR: Unable to run tpm2_createpolicy
I have therefore opened #1633 to backport this fix to the 3.X branch as well.
This was already reported for tpm2-tools-3.1.4-1.fc30.x86_64 in #1389, but the commit 9685ea263f994537430323fb1681b210395eee7c referenced there doesn't seem to be sufficient to fix the issue: I can reproduce the crash with the Fedora binaries as well as with my self-compiled binaries based on the current 3.X branch. After applying the fix in #1633, the program exits cleanly with an error message instead of crashing.
Does #1633 and #1639 fix the issue?
We should also probably add a test for this...
@williamcroberts yes, there is no crash now.
From clevis, I get a Command 'clevis-encrypt-tpm-{.......}'
is invalid, instead of the previous stack smashing detected
problem.
@dnoliver I think the parser logic is limited to 8 pcrs as @martinezjavier mentioned. We could improve the parser to not suck, if someone wants to do that.
Clevis with
tpm2-tools-3.1.4-1.fc29.x86_64
worked fine, as noted in https://github.com/latchset/clevis/issues/102Clevis with
tpm2-tools-3.2.0-1.fc30.x86_64
is running into this issue, as noted in https://github.com/latchset/clevis/issues/109Error Message
Versions
@martinezjavier suggested that this is a problem with the
tpm2_createpolicy
command in https://github.com/latchset/clevis/issues/109#issuecomment-517039214I remember that there was some build with "hardening" enabled done lately, could that be causing this issue?