Versions of OpenSSH before 2.5.4 kill the connection if the client attempts
authorben <ben@cda61777-01e9-0310-a592-d414129be87e>
Tue, 11 Jan 2005 16:33:08 +0000 (16:33 +0000)
committerben <ben@cda61777-01e9-0310-a592-d414129be87e>
Tue, 11 Jan 2005 16:33:08 +0000 (16:33 +0000)
to rekey.  Extend the description of SSH2_BUG_REKEY to cover this situation
and apply it to the relevant OpenSSH versions.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5097 cda61777-01e9-0310-a592-d414129be87e

config.c
doc/config.but
ssh.c

index 2e3822a..2fc2362 100644 (file)
--- a/config.c
+++ b/config.c
@@ -1839,7 +1839,7 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
            ctrl_droplist(s, "Misuses the session ID in PK auth", 'n', 20,
                          HELPCTX(ssh_bugs_pksessid2),
                          sshbug_handler, I(offsetof(Config,sshbug_pksessid2)));
-           ctrl_droplist(s, "Ignores key re-exchange completely", 'k', 20,
+           ctrl_droplist(s, "Handles key re-exchange badly", 'k', 20,
                          HELPCTX(ssh_bugs_rekey2),
                          sshbug_handler, I(offsetof(Config,sshbug_rekey2)));
        }
index dcbce98..8fb8798 100644 (file)
@@ -2662,16 +2662,18 @@ SSH2 public-key authentication will fail.
 
 This is an SSH2-specific bug.
 
-\S{config-ssh-bug-rekey} \q{Ignores key re-exchange completely}
+\S{config-ssh-bug-rekey} \q{Handles key re-exchange badly}
 
 \cfg{winhelp-topic}{ssh.bugs.rekey2}
 
-Some very old SSH servers cannot cope with repeat key exchange at
+Some SSH servers cannot cope with repeat key exchange at
 all, and will ignore attempts by the client to start one. Since
 PuTTY pauses the session while performing a repeat key exchange, the
 effect of this would be to cause the session to hang after an hour
 (unless you have your rekey timeout set differently; see
 \k{config-ssh-kex-rekey} for more about rekeys).
+Other, very old, SSH servers handle repeat key exchange even more
+badly, and disconnect upon receiving a repeat key exchange request.
 
 If this bug is detected, PuTTY will never initiate a repeat key
 exchange. If this bug is enabled when talking to a correct server,
diff --git a/ssh.c b/ssh.c
index 9517e95..32d2b00 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -2139,13 +2139,15 @@ static void ssh_detect_bugs(Ssh ssh, char *vstring)
 
     if (ssh->cfg.sshbug_rekey2 == FORCE_ON ||
        (ssh->cfg.sshbug_rekey2 == AUTO &&
-        (wc_match("Sun_SSH_1.0", imp) ||
+        (wc_match("OpenSSH_2.[0-4]*", imp) ||
+         wc_match("OpenSSH_2.5.[0-3]*", imp) ||
+         wc_match("Sun_SSH_1.0", imp) ||
          wc_match("Sun_SSH_1.0.1", imp)))) {
        /*
-        * These versions have the SSH2 ignore-rekey bug.
+        * These versions have the SSH2 rekey bug.
         */
        ssh->remote_bugs |= BUG_SSH2_REKEY;
-       logevent("We believe remote version has SSH2 ignore-rekey bug");
+       logevent("We believe remote version has SSH2 rekey bug");
     }
 }