Installation fails with PCR4 mismatch

I am trying to install IncusOS on an HP ProDesk 600 G2 SFF, but the installation fails with the following error: IIncusOS failed to verify PE binaries: ERROR: computed PCR4 (12771355e46cd47c71ed1721fd5319b383cca3a1f9fce3aa1c8cd3bd37af20d7) doesn't match actual value (de62c5b65745b270487978ceae097095d915ba971c36202036d9ad4097859046)

This machine originally had TPM 1.2, but I updated it to TPM 2.0 via a firmware update. However, it appears that the SHA-256 digests are missing from the TPM event log.

As I am not highly familiar with TPM internals, I asked an AI (Mr. Opus 4.8) to analyze the situation. I have attached the generated report for reference.

I am happy to assist with further debugging or provide additional logs if needed.

incusos-pcr4-sha1-only-report.txt (3.5 KB)

eventlog.txt (29.4 KB)

Ah, fun – likely another implementation bug of some sort to figure out. :grinning_face:

Thanks for sharing the initial event log; I see three PCR4 measurements, but the log is lacking an initial expected EFIAction measurement.

Your TPM is performing SHA256 measurements, otherwise you’d see an error about failing to open /sys/class/tpm/tpm0/pcr-sha256/4. (And the reported SHA256 value isn’t sha256(nil), so something is getting measured into your TPM.)

Unfortunately the only way to skip the PE validation check is if you’re using swtpm, which would kind of defeat the purpose of getting a TPM event log directly from IncusOS.

There might be enough here in the provided event log for me to compare what IncusOS is expecting versus what your TPM is reporting to figure out a fix/workaround. I won’t have time to really dig into this until tomorrow, but will let you know if I need anything else.

I suspect you have a buggy TPM. :slightly_frowning_face: The first thing I would try is force-resetting the TPM’s state from the BIOS. I’d hope the firmware update would have done that, but maybe it left the TPM in a weird state. We’ve also seen some TPMs in the past that wouldn’t work properly until they had been reset; IncusOS does try to do this on its own, but sometimes this must be done from the BIOS. In the worst case, you’ve got a TPM with 1.2 hardware now running 2.0 firmware, but unable to properly deal with the newer 2.0 spec.

It’s also weird that your event log doesn’t provide any other PCR hash values. When I run tpm2_eventlog I see several different types of hashes reported, as expected.

You do have a buggy UEFI implementation that’s missing that EFIAction measurement, but we’ve already got a workaround for that. The error IncusOS is reporting is coming from an initial attempt to retrieve (and validate) the TPM’s event log prior to actually checking the PE binaries.

Thank you for your reply :grinning_face:

I reset the TPM from the BIOS as you suggested, but the situation has not changed. The PCR4 mismatch error still occurs.

Regarding the lack of other PCR hash values in the event log, I ran sudo tpm2_getcap pcrs from an Ubuntu live session. The output is as follows:

$ sudo tpm2_getcap pcrs
selected-pcrs:
  - sha1: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ]
  - sha256: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ]

This output seems to suggest that the TPM hardware itself has active SHA-256 PCR banks. Perhaps while the TPM 2.0 hardware is measuring SHA-256 hashes, this HP UEFI firmware is only exporting a legacy SHA-1 event log.