PuTTY is a free implementation of Telnet and SSH for Win32 and Unix platforms, along with an xterm terminal emulator. Remote exploitation of a buffer overflow vulnerability in Simon Tatham's PuTTY can allow attackers to execute arbitrary code.
Vulnerable Systems:
* PuTTY Version 0.55 (probably prior versions as well)
Immune Systems:
* PuTTY Version 0.56
The vulnerability specifically exists due to insufficient bounds checking on SSH2_MSG_DEBUG packets. The 'stringlen' parameter is given a user-supplied value by reading in an integer from an offset in the packet data. The 'stringlen' value is incorrectly checked due to signedness issues as seen below.
The following debugger output shows successful control of program execution:
EAX CC004019
ECX 00401909 putty.00401909
EDX 7C9037D8 ntdll.7C9037D8
EBX 00000000
ESP 00129FC8
EBP 00129FDC
ESI 0012A0A4
EDI 7C9037BF ntdll.7C9037BF
EIP 0012FFBA
SEH chain of main thread
AddressSE handler
0012FFB0putty.00401905
Log data, item 0
Address=0012FFB9
Message=INT3 command at 0012FFB9
Exploitation allows remote attackers to execute arbitrary code under the privileges of the user running PuTTY. The client must be directed to connect to a malicious server in order to trigger the vulnerability.