From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (NAM04-DM6-obe.outbound.protection.outlook.com [40.92.45.25]) by mx.groups.io with SMTP id smtpd.web12.43801.1606171744679470720 for ; Mon, 23 Nov 2020 14:49:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=OpEKQ0HR; spf=pass (domain: outlook.com, ip: 40.92.45.25, mailfrom: kun.q@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D/MF1+izaCfPJFjdRsnobci6w6GIebunPPIIArU1GOgqXD1GERDQ9w0XpfO2Rt8KQ/uauexpDYU39Kk9rPPd+UmcT8HvrQHZ5bYJFvoYS2dnOg3hMTn4pQoRESrf+Mc8RqgBQdruS670Nsq0arUlxu8a/RN52zxzQe8A1q+1IHgmEdVkEHQGTbl56vTWQQTV+qfgInQX7EsWKyoR4OnWsHwxknMdzAXWz40s4/JxPvuvoA41MJ8MEDsK35DlUHQ76qbNp2mSdUD2kl8IcDedZHjTqlzlenFXO2CpkJC+GK1VWPxUfVtHyoHB/c8FmMY2GyBK6fVfkMzks+XXzXa5Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bfw0ZAXBD93TbNQl8oo3ZlDLqf3ftz0bLZC1v4Ub4pM=; b=Ydq04FFdTgVtsZjwTQAS32Klj6DHBNVpytAnleBAiyIYnQR2HX7ZQHONXQBURfdKwOTX0xqpC8UA/tHLafzz3XRFfCT1FuJ2XY8HwCza12FkO6YbBrHFjWhtiESjhEzZZRXzH0Dk/wtJpBM+7EOieQkDaajSxYO9aeRrHzOwqfSjznDXK53GkGSHoPHhLftKmr23dHAjbtIyRrVGDtGPsHeZT4Zz+5K1JrEy95TrQbadgq30bCoNF9Q11/WTgYyhVbs7MduFA9/JKTKhUrSYMi7R9Omj0w9az33G540pZZ47n3M6jlyBR43dEWgRKCdwpZ3Cyq7ycx5A6OYvHFduxw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bfw0ZAXBD93TbNQl8oo3ZlDLqf3ftz0bLZC1v4Ub4pM=; b=OpEKQ0HRHRy3YHATvPlRu59WayIBTGdibrZrQTtqeg+6N6HXRIsISv0hX9UedSBZ1bdUC0SicI3rmtrIQvF2OesI3QYHmSvwZlKdblM8Vo7fE9Q39VqTmqlPFOz+VF/R+ZWjEOR2n08iI/oRBv4Lx3suMGxbj5mtkebuu2Pbq0ost6T8AaqK/FEDmIVirmUyLzuI03OLlWK3va9IupP5IaN/tpcKWcjq2vm5q2QHz5uGxTaaeQeCIvA/delHnhnmSf0EYHfZ/luCQr5saRq+kH5TN5a5ozG2aLQIVzw3SSl5OsnVnPUabTSOt4ebG4pyjkLZN3IjvxCweDda6hN7+A== Received: from SN1NAM04FT047.eop-NAM04.prod.protection.outlook.com (10.152.88.55) by SN1NAM04HT092.eop-NAM04.prod.protection.outlook.com (10.152.89.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.22; Mon, 23 Nov 2020 22:49:03 +0000 Received: from DM5PR06MB3098.namprd06.prod.outlook.com (2a01:111:e400:7e4c::52) by SN1NAM04FT047.mail.protection.outlook.com (2a01:111:e400:7e4c::481) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.22 via Frontend Transport; Mon, 23 Nov 2020 22:49:03 +0000 Received: from DM5PR06MB3098.namprd06.prod.outlook.com ([fe80::753a:29af:2d37:fbbc]) by DM5PR06MB3098.namprd06.prod.outlook.com ([fe80::753a:29af:2d37:fbbc%3]) with mapi id 15.20.3541.023; Mon, 23 Nov 2020 22:49:03 +0000 From: kun.q@outlook.com To: "Yao, Jiewen" , gaoliming , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Lu, XiaoyuX" , "Jiang, Guomin" Subject: Re: [edk2-devel] [PATCH v1 1/1] CryptoPkg: BaseCryptLib: Fix buffer double free in CryptPkcs7VerifyEku Thread-Topic: [edk2-devel] [PATCH v1 1/1] CryptoPkg: BaseCryptLib: Fix buffer double free in CryptPkcs7VerifyEku Thread-Index: AQHWp1J0L2dhCABhE02IdzhaIfePH6nG7GcAgAnD2oCAAzzjiYAAWVmAgADVrpSAAAPbAIABZWd2 Date: Mon, 23 Nov 2020 22:49:03 +0000 Message-ID: References: <20201021023228.1884-1-kun.q@outlook.com> ,<017801d6beff$73c708d0$5b551a70$@byosoft.com.cn> , , In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:3403B063C6AD2E529A7F10A033C54690B474E58F1640F33339CC00994B8F8379;UpperCasedChecksum:C4EFEEA7DBEB13CCC464F6C50255A282BD3EFC85CE97F79DEDDDCB2EA87261B6;SizeAsReceived:7686;Count:44 x-tmn: [1zITM+tw2HZutMb+uzT7Ob01+AjyUKJV] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 68345f3f-7490-416b-0af6-08d89001f9b6 x-ms-traffictypediagnostic: SN1NAM04HT092: x-ms-exchange-minimumurldomainage: groups.io#3668 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NcCNniXvIl4vOcDVHFJXuaQyDyIYNhqju7TldTgO67vQCCK7H0Scp8n8kNjxyZwLXkui7Xs5oPBBGkiY53I+zaoolNIrR1SfXrhiRoc4KHLCE312kgTIbqswZU+iikZ0Vt+tP9LDKtY3cql7/7go+fKbGkNC3umfv2GP+AAWyNfJ/uXGyYNFmOWbHcZWZOmgqUjIPlARaQlPKffYkVRrC2yN5Bb0Q3Lp3puuKzlVXXXzxYk99GUesV5BHQTOHc50 x-ms-exchange-antispam-messagedata: kvaoHceZvmZuj0SExzgPnJeBMOjpWRjJ543S2dt0FfMUb2gaTsaP/FwNK9tpStFAT/79Bw0TtVDoVmD3HPlCeUD9mwPdP5s0T3H2UnlO71sQd/t/YqJY27VIcTUBRV3eYjwYs9QkZOe+Y7rG8SGcQw== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: SN1NAM04FT047.eop-NAM04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 68345f3f-7490-416b-0af6-08d89001f9b6 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Nov 2020 22:49:03.0600 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1NAM04HT092 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DM5PR06MB309836DF712104772BBE2052F3FC0DM5PR06MB3098namp_" --_000_DM5PR06MB309836DF712104772BBE2052F3FC0DM5PR06MB3098namp_ Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 SGkgSmlld2VuLA0KDQpJdCBsb29rcyBsaWtlIHRoZSB2MiBwYXRjaCB3ZW50IHRocm91Z2g6IGh0 dHBzOi8vZWRrMi5ncm91cHMuaW8vZy9kZXZlbC9tZXNzYWdlLzY3ODIzP3A9LCwsMjAsMCwwLDA6 OkNyZWF0ZWQsLGRvdWJsZStmcmVlLDIwLDIsM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j4gPiAgMSBmaWxlIGNoYW5nZWQsIDQgZGVsZXRpb25z KC0pDQo+ID4NCj4gPiBkaWZmIC0tZ2l0IGEvQ3J5cHRvUGtnL0xpYnJhcnkvQmFzZUNyeXB0TGli L1BrL0NyeXB0UGtjczdWZXJpZnlFa3UuYw0KPiA+IGIvQ3J5cHRvUGtnL0xpYnJhcnkvQmFzZUNy eXB0TGliL1BrL0NyeXB0UGtjczdWZXJpZnlFa3UuYw0KPiA+IGluZGV4IGM5ZmRiNjViOTlkMS4u NDBjYzM5YWZlN2RkIDEwMDY0NA0KPiA+IC0tLSBhL0NyeXB0b1BrZy9MaWJyYXJ5L0Jhc2VDcnlw dExpYi9Qay9DcnlwdFBrY3M3VmVyaWZ5RWt1LmMNCj4gPiArKysgYi9DcnlwdG9Qa2cvTGlicmFy eS9CYXNlQ3J5cHRMaWIvUGsvQ3J5cHRQa2NzN1ZlcmlmeUVrdS5jDQo+ID4gQEAgLTUwOCwxMCAr NTA4LDYgQEAgRXhpdDoNCj4gPiAgICAgIGZyZWUgKFNpZ25lZERhdGEpOw0KPiA+DQo+ID4gICAg fQ0KPiA+DQo+ID4NCj4gPg0KPiA+IC0gIGlmIChTaWduZXJDZXJ0ICE9IE5VTEwpIHsNCj4gPg0K PiA+IC0gICAgWDUwOV9mcmVlIChTaWduZXJDZXJ0KTsNCj4gPg0KPiA+IC0gIH0NCj4gPg0KPiA+ IC0NCj4gPg0KPiA+ICAgIGlmIChQa2NzNyAhPSBOVUxMKSB7DQo+ID4NCj4gPiAgICAgIFBLQ1M3 X2ZyZWUgKFBrY3M3KTsNCj4gPg0KPiA+ICAgIH0NCj4gPg0KPiA+IC0tDQo+ID4gMi4yOC4wLndp bmRvd3MuMQ0KPg0KPg0KPg0KPiANCj4NCg0KDQoNCg== --_000_DM5PR06MB309836DF712104772BBE2052F3FC0DM5PR06MB3098namp_ Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable

Hi Jiewen,

 

It looks like the v2 patch went through: https://edk2.groups.io/g/devel/message/67823?p=3D,,,20,0,0,0::Created,,dou= ble+free,20,2,0,78456278

 

I also ran the CI build against the branch that has= this patch, the PR seems to be closed after dependency analysis. But edk2 = top of master CI build was failing as is. Please let me know how you would = like to proceed.

 

Thanks,

Kun

 

 

Sure. It seems Liming already approves it.

I will wait one more day to see if there is any oth= er objection from the people in different time zone.

 

At mean time, I need your help to double confirm th= at, this patch can be merged without any CI error. So, please try Pull-Requ= est by yourself and make sure it pass all CI checks.

 

I have some bad experience that CI error occurs fin= ally, which prevent me from committing. Then we have to go back ask origina= l submitter to fix and generate patch again. It may cause delay and miss th= e timeline.

 

Thank you

Yao Jiewen

 

 

From: Kun Qin <kun.q@outlook.com>
Sent: Monday, November 23, 2020 9:17 AM
To: Yao, Jiewen <jiewen.yao@intel.com>; gaoliming <gaolimi= ng@byosoft.com.cn>; devel@edk2.groups.io
Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xia= oyux.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>
Subject: RE: [edk2-devel] [PATCH v1 1/1] CryptoPkg: BaseCryptLib: F= ix buffer double free in CryptPkcs7VerifyEku

 

Hi Jiewen,

 

It will be great if you could help me merging in th= is fix. Please let me know if you need anything else from me to have it mer= ged.

 

Thanks,

Kun

 

 

I can help to merge if it is approved.

 

I will add reviewed-by tag when I merge it.

 

Thank you

Yao Jiewen

 

From: Kun Qin <kun.q@outlook.com>
Sent: Sunday, November 22, 2020 3:10 PM
To: gaoliming <gaoli= ming@byosoft.com.cn>; devel@edk2.groups.io; Yao, Jie= wen <jiewen.yao@intel.com>= ;
Cc: Wang, Jian J <jian.= j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>
Subject: RE: [edk2-devel] [PATCH v1 1/1] CryptoPkg: BaseCryptLib: F= ix buffer double free in CryptPkcs7VerifyEku

 

Hi Liming,

 

It will be great if we can get this in. But I have = been having trouble sending a v2 patch that incorporates Jiewen=A1=AFs =A1= =B0Reviewed-by=A1=B1 tag through git command line for the past week (no ot= her changes). It kept giving me an error of "No host provider available to service this request". Please let me know if y= ou have any suggestions.

 

Thanks,

Kun

 

 

From: gaoliming
Sent: Thursday, November 19, 2020 9:39 PM
To: devel@edk2.groups.io; jiewen.yao@intel.com; 'Kun Qin'
Cc:
'Wang, Jian J'; 'Lu, XiaoyuX'; 'Jiang, Guomi= n'
Subject: =BB=D8= = =B8=B4: [edk2-devel] [PATCH v1 1/1] CryptoPkg: BaseCryptLib: Fix bu= ffer double free in CryptPkcs7VerifyEku

 

Kun:
 This is a bug fix. It passed code review. Do you request to merge it= for
this stable tag 202011?

Thanks
Liming
> -----=D3=CA=BC=FE=D4=AD=BC=FE-----
> =B7=A2=BC=FE=C8=CB: bounce+279= 52+67567+4905953+8761045@groups.io
> <b= ounce+27952+67567+4905953+8761045@groups.io> =B4=FA=B1=ED Yao, Jiewen
> =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA11=D4=C214=C8=D5 8:32
> =CA=D5=BC=FE=C8=CB: Kun Qin <kun.q@outlook.com>; devel@edk2.groups.io
> =B3=AD=CB=CD: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com&= gt;; Jiang, Guomin <guomin.jia= ng@intel.com>; Yao,
> Jiewen <jiewen.yao@intel.c= om>
> =D6=F7=CC=E2: Re: [edk2-devel] [PATCH v1 1/1] CryptoPkg= : BaseCryptLib: Fix buffer
> double free in CryptPkcs7VerifyEku
>
> Sorry, I missed this email.
>
> Reviewed-by: Jiewen Yao <J= iewen.yao@intel.com>
>
>
> > -----Original Message-----
> > From: Kun Qin <kun.q@out= look.com>
> > Sent: Wednesday, October 21, 2020 10:32 AM
> > To: devel@edk2.groups.io=
> > Cc: Wang, Jian J <ji= an.j.wang@intel.com>; Lu, XiaoyuX
> > <xiaoyux.lu@intel.com= >; Yao, Jiewen <jiewen.ya= o@intel.com>; Jiang,
> > Guomin <guomin.jian= g@intel.com>
> > Subject: [PATCH v1 1/1] CryptoPkg: BaseCryptLib: Fix buffer doub= le free
in
> > CryptPkcs7VerifyEku
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2459
> >
> > SignerCert is part of Pkcs7 instance when both have valid conten= t.
OpenSLL
> > PKCS7_free function will release the memory of SignerCert when applicable.
> > Freeing SignerCert with X509_free again might cause page fault i= f use-
> > after-free guard is enabled.
> >
> > Cc: Jian J Wang <jia= n.j.wang@intel.com>
> > Cc: Xiaoyu Lu <xiaoyu= x.lu@intel.com>
> > Cc: Jiewen Yao <jiewe= n.yao@intel.com>
> > Cc: Guomin Jiang <g= uomin.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/CryptPkcs7VerifyE= ku.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 !=3D NULL) {
> >
> > -    X509_free (SignerCert);
> >
> > -  }
> >
> > -
> >
> >    if (Pkcs7 !=3D NULL) {
> >
> >      PKCS7_free (Pkcs7);
> >
> >    }
> >
> > --
> > 2.28.0.windows.1
>
>
>
>
>

 

 

 

--_000_DM5PR06MB309836DF712104772BBE2052F3FC0DM5PR06MB3098namp_--