]> git.proxmox.com Git - mirror_edk2.git/commit
CryptoPkg: BaseCryptLib: Fix buffer double free in CryptPkcs7VerifyEku
authorKun Qin <kun.q@outlook.com>
Fri, 20 Nov 2020 22:24:32 +0000 (06:24 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 26 Nov 2020 03:22:24 +0000 (03:22 +0000)
commit21f984cedec1c613218480bc3eb5e92349a7a812
tree9a0c22453eca145dc2ba843cd81ea00c3d4dca8a
parente9d62effa37ea13fe04fc89b21d2de7776f183a2
CryptoPkg: BaseCryptLib: Fix buffer double free in CryptPkcs7VerifyEku

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2459

SignerCert is part of Pkcs7 instance when both have valid content. OpenSLL
PKCS7_free function will release the memory of SignerCert when applicable.
Freeing SignerCert with X509_free again might cause page fault if use-
after-free guard is enabled.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Kun Qin <kun.q@outlook.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyEku.c