[openssh-commits] [openssh] 06/10: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Nov 16 11:31:55 AEDT 2015


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit d87063d9baf5479b6e813d47dfb694a97df6f6f5
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri Nov 13 04:39:35 2015 +0000

    upstream commit
    
    send SSH2_MSG_UNIMPLEMENTED replies to unexpected
     messages during KEX; bz#2949, ok dtucker@
    
    Upstream-ID: 2b3abdff344d53c8d505f45c83a7b12e84935786
---
 kex.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/kex.c b/kex.c
index d8793b9..b409f27 100644
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.111 2015/10/13 00:21:27 djm Exp $ */
+/* $OpenBSD: kex.c,v 1.112 2015/11/13 04:39:35 djm Exp $ */
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
  *
@@ -315,7 +315,14 @@ kex_prop_free(char **proposal)
 static int
 kex_protocol_error(int type, u_int32_t seq, void *ctxt)
 {
-	error("Hm, kex protocol error: type %d seq %u", type, seq);
+	struct ssh *ssh = active_state; /* XXX */
+	int r;
+
+	error("kex protocol error: type %d seq %u", type, seq);
+	if ((r = sshpkt_start(ssh, SSH2_MSG_UNIMPLEMENTED)) != 0 ||
+	    (r = sshpkt_put_u32(ssh, seq)) != 0 ||
+	    (r = sshpkt_send(ssh)) != 0)
+		return r;
 	return 0;
 }
 

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list