shadow-utils/shadow-4.9-gpasswd-fix-password-leak.patch
Iker Pedrosa ee9e6419a7 gpasswd: fix password leak
Resolves: #2215948

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2023-07-12 09:55:44 +02:00

12 lines
441 B
Diff

diff -up shadow-4.9/src/gpasswd.c.gpasswd-fix-password-leak shadow-4.9/src/gpasswd.c
--- shadow-4.9/src/gpasswd.c.gpasswd-fix-password-leak 2023-07-12 09:38:32.062546006 +0200
+++ shadow-4.9/src/gpasswd.c 2023-07-12 09:42:33.194154548 +0200
@@ -857,6 +857,7 @@ static void change_passwd (struct group
strzero (cp);
cp = getpass (_("Re-enter new password: "));
if (NULL == cp) {
+ memzero (pass, sizeof pass);
exit (1);
}