public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nayana Patel" <nayana.patel@intel.com>
To: devel@edk2.groups.io
Cc: bhavana.s@intel.com, tabassum.yasmin@intel.com,
	Nayana Patel <nayana.patel@intel.com>
Subject: [edk2-devel] [PATCH] REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4645
Date: Tue, 19 Mar 2024 14:19:03 +0530	[thread overview]
Message-ID: <ad2181bc82ebe0a9f13dd98ec14e482dbae6ce9c.1710837985.git.nayana.patel@intel.com> (raw)

Clear out the variable SmmCommunicateSetPassword which contains password before goto Exit.
To avoid vulnerability.

Signed-off-by: Nayana Patel <nayana.patel@intel.com>
---
 .../UserAuthenticationDxeSmm/UserAuthenticationSmm.c            | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c
index 98f40c1812..ba01d599e0 100644
--- a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c
+++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.c
@@ -555,6 +555,7 @@ SmmPasswordHandler (
     if (PasswordLen == sizeof(SmmCommunicateVerifyPassword.Password)) {
       DEBUG ((DEBUG_ERROR, "SmmPasswordHandler: Password invalid!\n"));
       Status = EFI_INVALID_PARAMETER;
+      ZeroMem (&SmmCommunicateVerifyPassword, sizeof (SmmCommunicateVerifyPassword));
       goto EXIT;
     }
     if (!IsPasswordVerified (UserGuid, SmmCommunicateVerifyPassword.Password, PasswordLen + 1)) {
@@ -565,6 +566,7 @@ SmmPasswordHandler (
       } else {
         Status = EFI_SECURITY_VIOLATION;
       }
+      ZeroMem (&SmmCommunicateVerifyPassword, sizeof (SmmCommunicateVerifyPassword));
       goto EXIT;
     }
     mPasswordVerified = TRUE;
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116880): https://edk2.groups.io/g/devel/message/116880
Mute This Topic: https://groups.io/mt/105020497/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



                 reply	other threads:[~2024-03-19  8:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=ad2181bc82ebe0a9f13dd98ec14e482dbae6ce9c.1710837985.git.nayana.patel@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