Michał Żygowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/84927?usp=email )
Change subject: security/tpm/tspi/log-tpm1.c: Clear whole log area on creation ......................................................................
security/tpm/tspi/log-tpm1.c: Clear whole log area on creation
The log area was not entirely cleared on creation resulting in garbage after the last valid lgo entry. It caused the cbmem utility to parse invalid events and access data outside the log area. In the TPM2 log sources, the entire area is being cleared, thus the issue has not been observed.
Change-Id: I7c780b62b1c6507e1dd1806b20b0270e364cde3d Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com --- M src/security/tpm/tspi/log-tpm1.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/84927/1
diff --git a/src/security/tpm/tspi/log-tpm1.c b/src/security/tpm/tspi/log-tpm1.c index 481b569..453e74b 100644 --- a/src/security/tpm/tspi/log-tpm1.c +++ b/src/security/tpm/tspi/log-tpm1.c @@ -33,7 +33,7 @@ if (!tclt) return NULL;
- memset(tclt, 0, sizeof(*tclt)); + memset(tclt, 0, tpm_log_len); hdr = &tclt->spec_id;
/* Fill in first "header" entry. */