putty's telnet.c fix

From: dwalin (dwalin_at_dwalin.ru)
Date: 08/22/05


Date: 22 Aug 2005 03:23:53 -0700

there's a bug in the most recent version (r5512) of telnet.c. while the
latest patch may have fixed something, i have a telnetd here that is
not compatible with it. this telnetd sends WONT for TELOPT_LIMEMODE
(34) and expects WONT back, otherwise hangs and disconnects after the
timeout.
here's a little patch to make it happy:

--- putty-0.58/telnet.c 2005-04-05 23:37:52.000000000 +0400
+++ putty/telnet.c 2005-08-22 14:09:39.000000000 +0400
@@ -398,7 +398,7 @@
      * a negative ack to indicate refusal. If the request was
      * negative (WONT / DONT), we must do nothing.
      */
- if (cmd == WILL || cmd == DO)
+ if (cmd == WILL || cmd == DO || cmd == WONT)
         send_opt(telnet, (cmd == WILL ? DONT : WONT), option);
 }



Relevant Pages

  • Re: [PATCH] Improve scalability of epoll_ctl
    ... On Tue, 8 Jan 2008, Eric Dumazet wrote: ... Your patch is a revert of this change, it probably wont be accepted. ...
    (Linux-Kernel)
  • Re: puttys telnet.c fix
    ... this telnetd sends WONT for TELOPT_LIMEMODE ... since PuTTY doesn't support it) is pointless. ... to take the fix out again to please your server. ...
    (comp.security.ssh)
  • Re: Telnetd exploit for solaris
    ... Subject: Telnetd exploit for solaris ... > how to fix the problem in detail compared to something that can just ... > be compiled straight off the list. ... the patch I am applying worked before I put my seal of approval on it. ...
    (Vuln-Dev)
  • Re: Disk priority dependend on nice level...
    ... >> This wont do much, you might as well forget it. ... Disk priorities is far ... > This was not my patch, ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Telnetd exploit for solaris
    ... Subject: Telnetd exploit for solaris ... maybe the exploit is needed to test the patch after it's ... if you are just a thoughtless admin, and don't attempt to pick up what it is ...
    (Vuln-Dev)