From 1d437c8dc54886f43ab77447f0456c49f5b69c04 Mon Sep 17 00:00:00 2001 From: Mike Baiocchi Date: Fri, 26 Jan 2018 17:51:38 -0600 Subject: Verify ComponentID and Extend PAYLOAD While verifying the PAYLOAD in memory before moving it to its final location, this commit parses the PAYLOAD's header and verifies that it has the correct componentId. It also extends the PAYLOAD information to the TPM. Change-Id: Ie333d1ba5919b36919b207f25ad60806359ed710 RTC:168745 Backport: release-fips910 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52837 Reviewed-by: Nicholas E. Bofferding Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Stephen M. Cprek Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/usr/secureboot/base/securerommgr.C | 2 +- src/usr/secureboot/trusted/tpmLogMgr.C | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/usr/secureboot') diff --git a/src/usr/secureboot/base/securerommgr.C b/src/usr/secureboot/base/securerommgr.C index 02eca6293..17becb6b6 100644 --- a/src/usr/secureboot/base/securerommgr.C +++ b/src/usr/secureboot/base/securerommgr.C @@ -104,7 +104,7 @@ errlHndl_t verifyComponentId( TRACFCOMP(g_trac_secure,ERR_MRK"SECUREROM::verifyComponentId: " "Secure Boot verification failure; container's component ID of " "[%s] does not match expected component ID of [%s] (truncated " - "from [%s]", + "from [%s])", i_containerHeader.componentId(), pTruncatedComponentId, i_pComponentId); diff --git a/src/usr/secureboot/trusted/tpmLogMgr.C b/src/usr/secureboot/trusted/tpmLogMgr.C index 625c6261a..855d02b5a 100644 --- a/src/usr/secureboot/trusted/tpmLogMgr.C +++ b/src/usr/secureboot/trusted/tpmLogMgr.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -595,6 +595,7 @@ namespace TRUSTEDBOOT memset(i_val->eventLogInMem, 0, i_maxSize); memcpy(i_val->eventLogInMem, i_val->eventLog, i_val->logSize); i_val->newEventPtr = i_val->eventLogInMem + i_val->logSize; + i_val->logMaxSize = i_maxSize; mutex_unlock( &i_val->logMutex ); -- cgit v1.2.3