Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ssh.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2022-08-30 20:51:33 +0300
committerSimon Tatham <anakin@pobox.com>2022-08-30 20:51:33 +0300
commit5e2acd9af7033b681023e026d4607e554f7ab984 (patch)
treee3cd3541d7e7fc6fea857b83632b9eaee4210da7 /ssh.h
parentcec8c87626b3433907d214c91a072f75fbd06c91 (diff)
New bug workaround: KEXINIT filtering.
We've occasionally had reports of SSH servers disconnecting as soon as they receive PuTTY's KEXINIT. I think all such reports have involved the kind of simple ROM-based SSH server software you find in small embedded devices. I've never been able to prove it, but I've always suspected that one possible cause of this is simply that PuTTY's KEXINIT is _too long_, either in number of algorithms listed or in total length (especially given all the ones that end in @very.long.domain.name suffixes). If I'm right about either of those being the cause, then it's just become even more likely to happen, because of all the extra Diffie-Hellman groups and GSSAPI algorithms we just threw into our already-long list in the previous few commits. A workaround I've had in mind for ages is to wait for the server's KEXINIT, and then filter our own down to just the algorithms the server also mentioned. Then our KEXINIT is no longer than that of the server, and hence, presumably fits in whatever buffer it has. So I've implemented that workaround, in anticipation of it being needed in the near future. (Well ... it's not _quite_ true that our KEXINIT is at most the same length as the server. In fact I had to leave in one KEXINIT item that won't match anything in the server's list, namely "ext-info-c" which gates access to SHA-2 based RSA. So if we turn out to support absolutely everything on all the server's lists, then our KEXINIT would be a few bytes longer than the server's, even with this workaround. But that would only cause trouble if the server's outgoing KEXINIT was skating very close to whatever buffer size it has for the incoming one, and I'm guessing that's not very likely.) ((Another possible cause of this kind of disconnection would be a server that simply objects to seeing any KEXINIT string it doesn't know how to speak. But _surely_ no such server would have survived initial testing against any full-featured client at all!))
Diffstat (limited to 'ssh.h')
-rw-r--r--ssh.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ssh.h b/ssh.h
index dbdd7eb1..79f1f431 100644
--- a/ssh.h
+++ b/ssh.h
@@ -1880,6 +1880,7 @@ void old_keyfile_warning(void);
X(BUG_CHOKES_ON_WINADJ) \
X(BUG_SENDS_LATE_REQUEST_REPLY) \
X(BUG_SSH2_OLDGEX) \
+ X(BUG_REQUIRES_FILTERED_KEXINIT) \
/* end of list */
#define TMP_DECLARE_LOG2_ENUM(thing) log2_##thing,
enum { SSH_IMPL_BUG_LIST(TMP_DECLARE_LOG2_ENUM) };