]> git.proxmox.com Git - mirror_edk2.git/commit
SecurityPkg Tpm2CommandLib: Fix TPM2.0 response memory overflow
authorZhang, Chao B <chao.b.zhang@intel.com>
Tue, 20 Mar 2018 08:32:11 +0000 (16:32 +0800)
committerZhang, Chao B <chao.b.zhang@intel.com>
Wed, 21 Mar 2018 08:43:34 +0000 (16:43 +0800)
commitdd577319e83d13a7ab46ffdccb6635281d2ca9e5
treebf46fa68e9e5edfb5c6c9e64793e820eb247fedc
parentca2c8725c4894c55ffd7ce091e5f0c4ef9c794ed
SecurityPkg Tpm2CommandLib: Fix TPM2.0 response memory overflow

TPM2.0 command lib always assumes TPM device and transmission channel can
respond correctly. But it is not true when communication channel is exploited
and wrong data is spoofed. Add more logic to prohibit memory overflow attack.

Cc: Long Qin <qin.long@intel.com>
Cc: Yao Jiewen <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Long Qin <qin.long@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2EnhancedAuthorization.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2Integrity.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2Sequences.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c