You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pcrlock: tweak error messages when we are not looking at a TPM2 event log
If we are looking at a TPM1.2 event log the first log record will not be
the "EfiSpecIdEvent" but something else. Let's improve the log messages
about this, and say explicitly that this is likely not a TPM2.0 event
log.
(cherry picked from commit 5005522)
Copy file name to clipboardExpand all lines: src/pcrlock/pcrlock-firmware.c
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -100,12 +100,12 @@ int validate_firmware_header(
100
100
if (size< (uint64_t) offsetof(TCG_PCClientPCREvent, event) + (uint64_t) h->eventDataSize)
101
101
returnlog_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Event log too short for TCG_PCClientPCREvent events data.");
102
102
103
-
if (h->pcrIndex!=0)
104
-
returnlog_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Event log header has unexpected PCR index %"PRIu32, h->pcrIndex);
105
103
if (h->eventType!=EV_NO_ACTION)
106
-
returnlog_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Event log header has unexpected event type 0x%"PRIx32, h->eventType);
104
+
returnlog_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Event log header has unexpected event type 0x%08"PRIx32". (Probably not a TPM2 event log?)", h->eventType);
105
+
if (h->pcrIndex!=0)
106
+
returnlog_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Event log header has unexpected PCR index %"PRIu32". (Probably not a TPM2 event log?)", h->pcrIndex);
107
107
if (!memeqzero(h->digest, sizeof(h->digest)))
108
-
returnlog_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Event log header has unexpected non-zero digest.");
108
+
returnlog_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Event log header has unexpected non-zero digest. (Probably not a TPM2 event log?)");
109
109
110
110
if (h->eventDataSize< offsetof(TCG_EfiSpecIDEvent, digestSizes))
111
111
returnlog_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Event log header too short for TCG_EfiSpecIdEvent.");
0 commit comments