From 12d483a14899979a0e800657d9ead33175fae498 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 24 Nov 2020 20:54:07 +0000 Subject: [PATCH] Don't advertise ext-info-[cs] during rekeys. Apart from being pointless, it also triggers a bug in OpenSSH pre-8.1 that causes it to send a repeat EXT_INFO after the rekey concludes, which trips our quite draconian check for whether EXT_INFO has been sent at the right time. The OpenSSH bug: https://bugzilla.mindrot.org/show_bug.cgi?id=2929 --- ssh2transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh2transport.c b/ssh2transport.c index 3d1d7abb..e9b17fa4 100644 --- a/ssh2transport.c +++ b/ssh2transport.c @@ -837,7 +837,7 @@ static void ssh2_write_kexinit_lists( add_to_commasep(list, kexlists[i][j].name); } } - if (i == KEXLIST_KEX) { + if (i == KEXLIST_KEX && first_time) { if (our_hostkeys) /* we're the server */ add_to_commasep(list, "ext-info-s"); else /* we're the client */