From nobody Mon May 6 04:48:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+40486+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40486+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1557716126; cv=none; d=zoho.com; s=zohoarc; b=Yo6rxxEmGYs00Z4O6UsurTjNys1i2KIlmCAiZFBVuOFFwiqh3VikMH3cCoDu+lfLz/VIR0YvaD9pudsW9FplsTwbhE/tOLpIkK2TZBWRcBKg4Ot5aXq4qLYR5ZyS9KtaKYRT98QDkpbIcihehEOdSJ7K2RQXVU3lG5byPH/WTR0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557716126; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=FloTpYfISNjPJjuYJNe4snYyH96PLD9Dg17EDP+axiE=; b=bprlC8/aIlOsRo8BOZ6SxTfiHb2HsOrWc2pH8hGVi9YC0KTkZQBIv42IeOVcs+tc1p/bKftNHcvX8zgGN+HfDVaEgPtRYsaibNRInWVIZjsbDYdBoQODvXoVa5V07h2nXggp9EAxauP5HJfaGvBacL7sSRhLmiPBiuyJB6uR9n0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40486+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1557716126579350.55499191281467; Sun, 12 May 2019 19:55:26 -0700 (PDT) Return-Path: X-Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Sun, 12 May 2019 19:55:25 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 May 2019 19:55:25 -0700 X-ExtLoop1: 1 X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 12 May 2019 19:55:24 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Chao Zhang , Jiewen Yao , Jian Wang , Star Zeng , Liming Gao Subject: [edk2-devel] [PATCH] SecurityPkg/AuthSeriableLib: Always delete variable in certdb Date: Mon, 13 May 2019 10:55:17 +0800 Message-Id: <20190513025517.23236-1-zhichao.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhichao.gao@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1557716126; bh=M0FH0oojcpv2LsdNzfsprehpPt7KmoCd1t0UpgKs1rc=; h=Cc:Date:From:Reply-To:Subject:To; b=qKd8gsqY6Kssi+6ISrHhcAXLAnxwjNdIwRIN6JFfUKyk2f2JWsN09lDD0rPBS2R23v2 N1arZ1jsFKUNI50yYtbajP25Tb10L0rYvDfwHa2ZSJNl8HwBFe1GWi95h/TtNXq5108i2 XbQf2T2DFKISda7pKf7gKZZv1zsNYPQuk6Y= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1783 While cleaning the certdb, always delete the variable data in the certdb regardless of its attribute. Cc: Chao Zhang Cc: Jiewen Yao Cc: Jian Wang Cc: Star Zeng Cc: Liming Gao Signed-off-by: Zhichao Gao Reviewed-by : Chao Zhang --- SecurityPkg/Library/AuthVariableLib/AuthService.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SecurityPkg/Library/AuthVariableLib/AuthService.c b/SecurityPk= g/Library/AuthVariableLib/AuthService.c index 7493a2ed9c..2340d47e77 100644 --- a/SecurityPkg/Library/AuthVariableLib/AuthService.c +++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c @@ -1735,10 +1735,13 @@ CleanCertsFromDb ( ); =20 if (EFI_ERROR(Status) || (AuthVariableInfo.Attributes & EFI_VARIABLE= _TIME_BASED_AUTHENTICATED_WRITE_ACCESS) =3D=3D 0) { + // + // While cleaning certdb, always delete the variable in certdb reg= ardless of it attributes. + // Status =3D DeleteCertsFromDb( VariableName, &AuthVarGuid, - AuthVariableInfo.Attributes + AuthVariableInfo.Attributes | EFI_VARIABLE_NON_VOL= ATILE ); CertCleaned =3D TRUE; DEBUG((EFI_D_INFO, "Recovery!! Cert for Auth Variable %s Guid %g i= s removed for consistency\n", VariableName, &AuthVarGuid)); --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#40486): https://edk2.groups.io/g/devel/message/40486 Mute This Topic: https://groups.io/mt/31603232/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-