Red Hat Bugzilla – Bug 151301
CAN-2005-0468 env_opt_add() Buffer Overflow Vulnerability
Last modified: 2007-11-30 17:07:17 EST
The vulnerability specifically exists in the env_opt_add() function of telnet.c.
A buffer of a fixed size (256 bytes) is allocated to store the result of the
processing this function performs on network input. If this buffer is not large
enough to contain the string, the buffer is expanded by a further 256 bytes.
This size is sufficient for most well formed input, as the buffer passed as
input to the affected function is limited to the same size. However, due to the
way the telnet protocol escapes certain characters, it is possible to increase
the length of the output by including a large run of characters which need
escaping. This can allow the 256 byte input buffer to expand to a maximum of 512
bytes in the allocated storage buffer. If, after expanding the buffer by 256
bytes, the buffer is still not large enough to contain the input, a heap based
buffer overflow occurs, which is exploitable on at least some affected platforms.
This issue also affects RHEL2.1 and RHEL3
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.