summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-agent.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2017-11-15 00:13:40 +0000
committerdjm <djm@openbsd.org>2017-11-15 00:13:40 +0000
commit4197983372b70e615e6a0d19cdf45d3aba5c30c6 (patch)
tree49adadf24a27410bf98fe40e26b727078a5a92b9 /usr.bin/ssh/ssh-agent.c
parent- nested anchors vs. pfctl/parse.y (diff)
downloadwireguard-openbsd-4197983372b70e615e6a0d19cdf45d3aba5c30c6.tar.xz
wireguard-openbsd-4197983372b70e615e6a0d19cdf45d3aba5c30c6.zip
fix regression in 7.6: failure to parse a signature request message
shouldn't be fatal to the process, just the request. Reported by Ron Frederick
Diffstat (limited to 'usr.bin/ssh/ssh-agent.c')
-rw-r--r--usr.bin/ssh/ssh-agent.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c
index 9693722d551..797cb047f08 100644
--- a/usr.bin/ssh/ssh-agent.c
+++ b/usr.bin/ssh/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.224 2017/07/24 04:34:28 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.225 2017/11/15 00:13:40 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -272,8 +272,11 @@ process_sign_request2(SocketEntry *e)
fatal("%s: sshbuf_new failed", __func__);
if ((r = sshkey_froms(e->request, &key)) != 0 ||
(r = sshbuf_get_string_direct(e->request, &data, &dlen)) != 0 ||
- (r = sshbuf_get_u32(e->request, &flags)) != 0)
- fatal("%s: buffer error: %s", __func__, ssh_err(r));
+ (r = sshbuf_get_u32(e->request, &flags)) != 0) {
+ error("%s: couldn't parse request: %s", __func__, ssh_err(r));
+ goto send;
+ }
+
if (flags & SSH_AGENT_OLD_SIGNATURE)
compat = SSH_BUG_SIGBLOB;
if ((id = lookup_identity(key)) == NULL) {