Operating System:

[NetBSD]

Published:

08 November 2005

Protect yourself against future threats.

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

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

            ESB-2005.0884 -- NetBSD Security Advisory 2005-004
             Buffer overflows in MIT Kerberos 5 telnet client
                              8 November 2005

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

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

Product:           MIT Kerberos 5 telnet client
Publisher:         NetBSD
Operating System:  NetBSD-current (source prior to April 1, 2005)
                   NetBSD 2.0.2 and prior
Impact:            Execute Arbitrary Code/Commands
Access:            Remote/Unauthenticated
CVE Names:         CAN-2005-0469 CAN-2005-0468

Ref:               ESB-2005.0254

Original Bulletin:
ftp://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2005-004.txt.asc

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


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


		 NetBSD Security Advisory 2005-004
		 =================================

Topic:		Buffer overflows in MIT Kerberos 5 telnet client

Version:	NetBSD-current:	source prior to April 1, 2005
		NetBSD 2.1:	not affected
		NetBSD 2.0.3:	not affected
		NetBSD 2.0.2:	affected
		NetBSD 2.0:	affected
		NetBSD 1.6.2:	affected
		NetBSD 1.6.1:	affected
		NetBSD 1.6:	affected

Severity:	Remote code execution if connected to malicious server

Fixed:		NetBSD-current:		April 1, 2005
		NetBSD-3 branch:	April 8, 2005 
						(3.0 will include the fix)
		NetBSD-2.0 branch:	April 8, 2005
						(2.0.3 includes the fix)
		NetBSD-2 branch:	April 8, 2005
						(2.1 includes the fix)
		NetBSD-1.6 branch:	April 8, 2005


Abstract
========

The telnet client program in NetBSD, supporting MIT Kerberos 5
authentication, contains several buffer overflows that can be triggered
when connecting to a malicious telnet server. When exploited, these
overflows can lead to remote code execution.


Technical Details
=================

The slc_add_reply() and env_opt_add() functions in telnet.c perform
inadequate length checking. slc_add_reply() may overflow a fixed-size
data segment or BSS buffer when receiving a maliciously crafted telnet
LINEMODE suboption string. env_opt_add() may overflow a heap buffer when
receiving a maliciously crafted telnet NEW-ENVIRON suboption string.

Both overflows may lead to arbitrary code execution.

CVE: CAN-2005-0468 and CAN-2005-0469


Solutions and Workarounds
=========================

There is no workaround to this problem.

It is recommended that all NetBSD users of affected versions upgrade
their telnet binaries to a non-vulnerable version.

The following instructions describe how to upgrade your telnet
binaries by updating your source tree and rebuilding and
installing a new version of telnet.


* NetBSD-current:

	Systems running NetBSD-current dated from before 2005-03-29
	should be upgraded to NetBSD-current dated 2005-04-01 or later.

	The following files need to be updated from the netbsd-current CVS
	branch (aka HEAD):
		usr.bin/telnet/telnet.c

	To update from CVS, re-build, and re-install telnet:
		# cd src
		# cvs update -d -P usr.bin/telnet/telnet.c
		# cd usr.bin/telnet

		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install


* NetBSD 2.0:

	The binary distribution of NetBSD 2.0 is vulnerable.

	NetBSD 2.1 includes the fix.

	Systems running NetBSD 2.0 sources dated from before
	2005-04-08 should be upgraded from NetBSD 2.0 sources dated
	2005-04-09 or later.

	The following files need to be updated from the
	netbsd-2-0 CVS branch:
		usr.bin/telnet/telnet.c

	To update from CVS, re-build, and re-install telnet:

		# cd src
		# cvs update -d -P -r netbsd-2-0 usr.bin/telnet/telnet.c
		# cd usr.bin/telnet

		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install


* NetBSD 1.6, 1.6.1, 1.6.2:

	The binary distributions of NetBSD 1.6, 1.6.1, and 1.6.2 are vulnerable.

	Systems running NetBSD 1.6 sources dated from before
	2005-04-08 should be upgraded from NetBSD 1.6 sources dated
	2005-04-09 or later.

	NetBSD 1.6.3 will include the fix.

	The following files need to be updated from the
	netbsd-1-6 CVS branch:
		usr.bin/telnet/telnet.c

	To update from CVS, re-build, and re-install telnet:

		# cd src
		# cvs update -d -P -r netbsd-1-6 usr.bin/telnet/telnet.c
		# cd usr.bin/telnet

		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install


Thanks To
=========

iDEFENSE for researching this vulnerability.

MIT for alerting us about this vulnerability and providing a fix.


Revision History
================

	2005-10-31	Initial release


More Information
================

Advisories may be updated as new information becomes available.
The most recent version of this advisory (PGP signed) can be found at 
  
ftp://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2005-004.txt.asc

Information about NetBSD and NetBSD security can be found at
http://www.NetBSD.org/ and http://www.NetBSD.org/Security/.


Copyright 2005, The NetBSD Foundation, Inc.  All Rights Reserved.
Redistribution permitted only in full, unmodified form.

$NetBSD: NetBSD-SA2005-004.txt,v 1.13 2005/10/31 06:36:35 gendalia Exp $

- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iQCVAwUBQ2fKUz5Ru2/4N2IFAQLEjQP+K/9/7qknJL6CXC0Y475wpLGzRfdQFZgn
7LX/2AfkvjWf/S4lNCJwjPFp5t2OT4b92ejAvoHTjsuBVAZXMubxk2+WPETykG6p
1UW9IujiLa/MTEYm8xTukmKA2RL+2E7Jf2n5dR0g9BM/+UZHprKgTV19SCAXzS6n
874WryZNtxE=
=iXJ4
- -----END PGP SIGNATURE-----


- --------------------------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

iQCVAwUBQ2/tnih9+71yA2DNAQIvKgQAldKL7+kkxjONhhpuhsjy4Jpq1uIVg57F
Z3Wq6nlGBBz8mETpiJ3Deiy3BTWvCEajMJ0KKtxg4ucy3E9vEWUyF0+D0+8xaXCT
F/w2VLwsvuzUBFMg0UNDQaiTomt7eZNPGU7+YoCb+Qg1H+hjLXNIwmJjh2utnriD
GFbiNBSKde0=
=ji6P
-----END PGP SIGNATURE-----