Date: Fri, 7 Oct 2022 14:04:41 GMT From: Ed Maste <emaste@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 1b2ab11a4a18 - stable/12 - ssh-keysign: fix double free in error path Message-ID: <202210071404.297E4fGb047923@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1b2ab11a4a18401dcfab19618de6181c0510c0be commit 1b2ab11a4a18401dcfab19618de6181c0510c0be Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2022-10-04 20:34:15 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2022-10-07 13:22:10 +0000 ssh-keysign: fix double free in error path From OpenSSH-portable commit 141535b904b6, OpenBSD commit 3d21aa127b1f. MFC after: 3 days (cherry picked from commit 963c7b084b8bf2397deced4f568b976a42611910) (cherry picked from commit 6dca51b9f32dd3f6a0dd58a0f1525db3d27f485d) --- crypto/openssh/ssh-keysign.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crypto/openssh/ssh-keysign.c b/crypto/openssh/ssh-keysign.c index c52321e220e7..b989f5e941ad 100644 --- a/crypto/openssh/ssh-keysign.c +++ b/crypto/openssh/ssh-keysign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keysign.c,v 1.70 2022/01/06 22:00:18 djm Exp $ */ +/* $OpenBSD: ssh-keysign.c,v 1.71 2022/08/01 11:09:26 djm Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -155,9 +155,7 @@ valid_request(struct passwd *pw, char *host, struct sshkey **ret, char **pkalgp, debug3_f("fail %d", fail); - if (fail) - sshkey_free(key); - else { + if (!fail) { if (ret != NULL) { *ret = key; key = NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202210071404.297E4fGb047923>