From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ml01.01.org (Postfix) with ESMTP id 776671A1E08 for ; Mon, 15 Aug 2016 20:04:51 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 15 Aug 2016 20:04:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,528,1464678000"; d="scan'208";a="1041779788" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 15 Aug 2016 20:04:51 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 15 Aug 2016 20:04:50 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.107]) with mapi id 14.03.0248.002; Tue, 16 Aug 2016 11:04:45 +0800 From: "Gao, Liming" To: "Zhang, Chao B" , "edk2-devel@lists.01.org" CC: "Fu, Siyuan" , "Zhang, Chao B" , "Zeng, Star" Thread-Topic: [edk2] [PATCH] SecurityPkg: AuthVariableLib: Fix potential inconsistency corner case for Time Auth variable 2 steps are used to create/delete a time based variable. For create, step 1: Insert Signer Cert to CertDB. Step 2: Insert Payload to Variable. Thread-Index: AQHR92V0c9l4QlCT50+o2Tv6QqL9OqBK5vRQ Date: Tue, 16 Aug 2016 03:04:44 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155EB75D@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjAyNDJlNGMtZGJmZC00ZTY0LWEzMmYtZDg5ZWJkNzM5Y2MwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImhVcytqODRKTnFwS1VqaFltTGlVSmlDaWRMbElBMU5HTGNORUw2TFN1b1E9In0= x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] SecurityPkg: AuthVariableLib: Fix potential inconsistency corner case for Time Auth variable 2 steps are used to create/delete a time based variable. For create, step 1: Insert Signer Cert to CertDB. Step 2: Insert Payload to Variable. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2016 03:04:51 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Chao: Please short the title, and move the detail in commit description.=20 -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Zhan= g, Chao B Sent: Tuesday, August 16, 2016 10:25 AM To: edk2-devel@lists.01.org Cc: Fu, Siyuan ; Zhang, Chao B ; Zeng, Star Subject: [edk2] [PATCH] SecurityPkg: AuthVariableLib: Fix potential inconsi= stency corner case for Time Auth variable 2 steps are used to create/delete= a time based variable. For create, step 1: Insert Signer Cert to CertDB. S= tep 2: Insert Payload to Variable. F... Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang --- SecurityPkg/Library/AuthVariableLib/AuthService.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SecurityPkg/Library/AuthVariableLib/AuthService.c b/SecurityPk= g/Library/AuthVariableLib/AuthService.c index 6e1e284..b013d42 100644 --- a/SecurityPkg/Library/AuthVariableLib/AuthService.c +++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c @@ -2100,7 +2100,7 @@ CleanCertsFromDb ( &AuthVariableInfo ); =20 - if (EFI_ERROR(Status)) { + if (EFI_ERROR(Status) || (AuthVariableInfo.Attributes & EFI_VARIABLE= _TIME_BASED_AUTHENTICATED_WRITE_ACCESS) =3D=3D 0) { Status =3D DeleteCertsFromDb( VariableName, &AuthVarGuid, --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel