public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH] REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4645
@ 2024-03-19  8:49 Nayana Patel
  0 siblings, 0 replies; only message in thread
From: Nayana Patel @ 2024-03-19  8:49 UTC (permalink / raw)
  To: devel; +Cc: bhavana.s, tabassum.yasmin, Nayana Patel

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]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-19  8:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-19  8:49 [edk2-devel] [PATCH] REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4645 Nayana Patel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox