From: "Gao, Zhichao" <zhichao.gao@intel.com>
To: devel@edk2.groups.io
Cc: Chao Zhang <chao.b.zhang@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Jian Wang <jian.j.wang@intel.com>,
Star Zeng <star.zeng@intel.com>,
Liming Gao <liming.gao@intel.com>
Subject: [PATCH] SecurityPkg/AuthSeriableLib: Always delete variable in certdb
Date: Mon, 13 May 2019 10:55:17 +0800 [thread overview]
Message-ID: <20190513025517.23236-1-zhichao.gao@intel.com> (raw)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1783
While cleaning the certdb, always delete the variable data in
the certdb regardless of its attribute.
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian Wang <jian.j.wang@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
SecurityPkg/Library/AuthVariableLib/AuthService.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/SecurityPkg/Library/AuthVariableLib/AuthService.c b/SecurityPkg/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 (
);
if (EFI_ERROR(Status) || (AuthVariableInfo.Attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) == 0) {
+ //
+ // While cleaning certdb, always delete the variable in certdb regardless of it attributes.
+ //
Status = DeleteCertsFromDb(
VariableName,
&AuthVarGuid,
- AuthVariableInfo.Attributes
+ AuthVariableInfo.Attributes | EFI_VARIABLE_NON_VOLATILE
);
CertCleaned = TRUE;
DEBUG((EFI_D_INFO, "Recovery!! Cert for Auth Variable %s Guid %g is removed for consistency\n", VariableName, &AuthVarGuid));
--
2.21.0.windows.1
next reply other threads:[~2019-05-13 2:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-13 2:55 Gao, Zhichao [this message]
2019-05-13 14:09 ` [PATCH] SecurityPkg/AuthSeriableLib: Always delete variable in certdb Zhang, Chao B
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=20190513025517.23236-1-zhichao.gao@intel.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