From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, kun.q@outlook.com
Cc: Jian J Wang <jian.j.wang@intel.com>,
Xiaoyu Lu <xiaoyux.lu@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Guomin Jiang <guomin.jiang@intel.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] CryptoPkg: BaseCryptLib: Fix buffer double free in CryptPkcs7VerifyEku
Date: Wed, 21 Oct 2020 15:31:21 +0200 [thread overview]
Message-ID: <7d518928-8d41-c79f-0b67-b10d8bf85359@redhat.com> (raw)
In-Reply-To: <MWHPR06MB31028D4F9BFDDCFC15F4A5DAF31C0@MWHPR06MB3102.namprd06.prod.outlook.com>
On 10/21/20 04:32, Kun Qin wrote:
> 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.
Is this a security issue?
Thanks
Laszlo
> 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>
> ---
> CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyEku.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyEku.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyEku.c
> index c9fdb65b99d1..40cc39afe7dd 100644
> --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyEku.c
> +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyEku.c
> @@ -508,10 +508,6 @@ Exit:
> free (SignedData);
>
> }
>
>
>
> - if (SignerCert != NULL) {
>
> - X509_free (SignerCert);
>
> - }
>
> -
>
> if (Pkcs7 != NULL) {
>
> PKCS7_free (Pkcs7);
>
> }
>
next prev parent reply other threads:[~2020-10-21 13:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201021023228.1884-1-kun.q@outlook.com>
2020-10-21 2:32 ` [PATCH v1 1/1] CryptoPkg: BaseCryptLib: Fix buffer double free in CryptPkcs7VerifyEku Kun Qin
2020-10-21 13:31 ` Laszlo Ersek [this message]
2020-11-14 0:31 ` Yao, Jiewen
2020-11-20 5:39 ` 回复: [edk2-devel] " gaoliming
2020-11-22 7:09 ` Kun Qin
2020-11-22 12:25 ` Yao, Jiewen
2020-11-23 0:49 ` 回复: " gaoliming
2020-11-23 1:16 ` Kun Qin
2020-11-23 1:24 ` Yao, Jiewen
2020-11-23 22:49 ` kun.q
2020-11-24 1:26 ` 回复: " gaoliming
2020-11-24 1:31 ` Yao, Jiewen
[not found] ` <164A4D9262108CA1.16773@groups.io>
2020-11-26 3:26 ` Yao, Jiewen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7d518928-8d41-c79f-0b67-b10d8bf85359@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox