summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2016-01-14 22:56:56 +0000
committerDamien Miller <djm@mindrot.org>2016-01-27 16:54:10 +1100
commitfc77ccdc2ce6d5d06628b8da5048a6a5f6ffca5a (patch)
tree6f660fa95a43f925c05d3ee208af08c45de4a125
parenta306863831c57ec5fad918687cc5d289ee8e2635 (diff)
upstream commit
fd leaks; report Qualys Security Advisory team; ok deraadt@ Upstream-ID: 4ec0f12b9d8fa202293c9effa115464185aa071d
-rw-r--r--sshconnect.c3
-rw-r--r--sshconnect2.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sshconnect.c b/sshconnect.c
index a22710d9f..356ec79f0 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.270 2016/01/14 16:17:40 markus Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.271 2016/01/14 22:56:56 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -167,6 +167,7 @@ ssh_proxy_fdpass_connect(const char *host, u_short port,
167 167
168 if ((sock = mm_receive_fd(sp[1])) == -1) 168 if ((sock = mm_receive_fd(sp[1])) == -1)
169 fatal("proxy dialer did not pass back a connection"); 169 fatal("proxy dialer did not pass back a connection");
170 close(sp[1]);
170 171
171 while (waitpid(pid, NULL, 0) == -1) 172 while (waitpid(pid, NULL, 0) == -1)
172 if (errno != EINTR) 173 if (errno != EINTR)
diff --git a/sshconnect2.c b/sshconnect2.c
index 1f918533f..4d426c33c 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.236 2016/01/14 16:17:40 markus Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.237 2016/01/14 22:56:56 markus Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -1344,6 +1344,7 @@ pubkey_prepare(Authctxt *authctxt)
1344 if (r != SSH_ERR_AGENT_NO_IDENTITIES) 1344 if (r != SSH_ERR_AGENT_NO_IDENTITIES)
1345 debug("%s: ssh_fetch_identitylist: %s", 1345 debug("%s: ssh_fetch_identitylist: %s",
1346 __func__, ssh_err(r)); 1346 __func__, ssh_err(r));
1347 close(agent_fd);
1347 } else { 1348 } else {
1348 for (j = 0; j < idlist->nkeys; j++) { 1349 for (j = 0; j < idlist->nkeys; j++) {
1349 found = 0; 1350 found = 0;