From: tobias@openbsd.org Date: Tue, 31 Mar 2015 11:06:49 +0000 (+0000) Subject: upstream commit X-Git-Tag: V_6_9_P1~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=704d8c88988cae38fb755a6243b119731d223222;p=thirdparty%2Fopenssh-portable.git upstream commit Comments are only supported for RSA1 keys. If a user tried to add one and entered his passphrase, explicitly clear it before exit. This is done in all other error paths, too. ok djm --- diff --git a/ssh-keygen.c b/ssh-keygen.c index 96dd8b439..0518638e0 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.267 2015/03/23 06:06:38 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.268 2015/03/31 11:06:49 tobias Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -1405,6 +1405,7 @@ do_change_comment(struct passwd *pw) } if (private->type != KEY_RSA1) { fprintf(stderr, "Comments are only supported for RSA1 keys.\n"); + explicit_bzero(passphrase, strlen(passphrase)); sshkey_free(private); exit(1); }