tpm2-software / tpm2-tools

The source repository for the Trusted Platform Module (TPM2.0) tools
https://tpm2-software.github.io
719 stars 378 forks source link

PCR0 from tpm2_eventlog reconstruction and tpm2_pcrread is not in sync #3256

Closed hairongchen closed 1 year ago

hairongchen commented 1 year ago

version: 1 events:

Host Security ID: HSI:1! (v1.7.9)

HSI-1 ✔ CSME manufacturing mode: Locked ✔ CSME override: Locked ✔ CSME v0:15.0.21.1549: Valid ✔ Intel DCI debugger: Disabled ✔ SPI BIOS region: Locked ✔ SPI lock: Enabled ✔ SPI write: Disabled ✔ TPM empty PCRs: Valid ✔ TPM v2.0: Found ✔ UEFI platform key: Valid

HSI-2 ✔ Intel BootGuard: Enabled ✔ Intel BootGuard ACM protected: Valid ✔ Intel BootGuard OTP fuse: Valid ✔ Intel BootGuard verified boot: Valid ✔ Intel DCI debugger: Locked ✔ TPM PCR0 reconstruction: Valid ✘ IOMMU: Not found

HSI-3 ✔ Intel BootGuard error policy: Valid ✔ Pre-boot DMA protection: Enabled ✘ Intel CET Enabled: Not supported ✘ Suspend-to-idle: Disabled ✘ Suspend-to-ram: Enabled

HSI-4 ✔ Intel SMAP: Enabled ✘ Encrypted RAM: Not supported

Runtime Suffix -! ✔ Linux kernel: Untainted ✔ Linux kernel lockdown: Enabled ✔ fwupd plugins: Untainted ✘ Linux swap: Unencrypted

This system has HSI runtime issues. » https://github.com/fwupd/fwupd/wiki/Host-security-ID-runtime-issues

JuergenReppSIT commented 1 year ago

@hairongchen Could you please check whether there are more EV_NO_ACTION_EVENTS in the log: tpm2_eventlog /sys/kernel/security/tpm0/binary_bios_measurements | grep NO_ACTION There is a fix #3230 if beside the first specid event there are more EV_NO_ACTION events which should not be extended to PCR0.

hairongchen commented 1 year ago

Hi, there are two of them in the beginning of the result: tpm2_eventlog /sys/kernel/security/tpm0/binary_bios_measurements | grep NO_ACTION EventType: EV_NO_ACTION EventType: EV_NO_ACTION


version: 1 events:

JuergenReppSIT commented 1 year ago

@hairongchen Thank you for the information. That explains the out of syn. If you could compile and install the current master the error should not occur.

hairongchen commented 1 year ago

@hairongchen Thank you for the information. That explains the out of syn. If you could compile and install the current master the error should not occur.

The fix would work, Thanks!