diff options
author | Michael Kinney <michael.d.kinney@intel.com> | 2017-01-10 09:08:52 -0800 |
---|---|---|
committer | Michael Kinney <michael.d.kinney@intel.com> | 2017-01-11 11:11:22 -0800 |
commit | 39dfd12de48d01023ef293c37f524b8c2137f7c1 (patch) | |
tree | bf4b535c26245edb8c50a544d34cb8603882f797 /QuarkPlatformPkg/Library | |
parent | a0f26e276c71eeb7b2e16e242d4a978652798fb3 (diff) | |
download | edk2-39dfd12de48d01023ef293c37f524b8c2137f7c1.tar.gz edk2-39dfd12de48d01023ef293c37f524b8c2137f7c1.tar.bz2 edk2-39dfd12de48d01023ef293c37f524b8c2137f7c1.zip |
QuarkPlatformPkg/Tpm12DeviceLibAtmelI2c: Fix SubmitCommand() out size
https://bugzilla.tianocore.org/show_bug.cgi?id=336
When the Tpm12SubmitCommand() detects a response packet that
is the same size as a TPM_RSP_COMMAND_HDR, it returns
EFI_SUCCESS without reading any additional response packet
information from the TPM. In that case, the return parameter
OutputParameterBlockSize is not be updated, so the size of
that OutputParameterBlock returned is the value passed in which
could be larger than what is actually returned from the TPM.
Set the OutputParameterBlockSize to the size of the
TPM_RSP_COMMAND_HDR when this specific condition is detected.
Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Lee Leahy <leroy.p.leahy@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Lee Leahy <leroy.p.leahy@intel.com>
Diffstat (limited to 'QuarkPlatformPkg/Library')
-rw-r--r-- | QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c b/QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c index 08a005f1fd..3aab530643 100644 --- a/QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c +++ b/QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c @@ -355,6 +355,7 @@ Tpm12SubmitCommand ( TpmOutSize = SwapBytes32 (ReadUnaligned32 (&ResponseHeader->paramSize));
if (TpmOutSize == sizeof (TPM_RSP_COMMAND_HDR)) {
+ *OutputParameterBlockSize = TpmOutSize;
Status = EFI_SUCCESS;
goto Done;
}
|