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

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

                               ESB-2009.1057
               ISC dhclient subnet-mask flag stack overflow
                               15 July 2009

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

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

Product:          ISC dhclient
Publisher:        NetBSD
Operating System: NetBSD
Impact/Access:    Root Compromise -- Remote/Unauthenticated
CVE Names:        CVE-2009-0692  

Reference:        ESB-2009.1053

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

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


		 NetBSD Security Advisory 2009-010
		 =================================

Topic:		ISC dhclient subnet-mask flag stack overflow

Version:	NetBSD-current:		affected before June 24, 2009
		NetBSD 5.0:		affected
		NetBSD 4.0.*:		affected
		NetBSD 4.0:		affected
		pkgsrc:			isc-dhclient package prior to
					4.1.0p1, 4.0.1p1, or 3.1.2p1

Severity:	Arbitrary Code Execution

Fixed:		NetBSD-current:		June 24, 2009
		NetBSD-5-0 branch:	July 14, 2009 20:00 UTC
		NetBSD-5 branch:	July 14, 2009 20:00 UTC
		NetBSD-4-0 branch:	July 14, 2009 20:00 UTC
		NetBSD-4 branch:	July 14, 2009 20:00 UTC
		pkgsrc 2009Q2:		isc-dhclient-4.1.0p1, 4.0.1p1 and
					3.1.2p1 correct the issue


Abstract
========

A stack overflow vulnerability in ISC dhclient allows an attacker
operating a rogue DHCP server to execute arbitrary code with root
privileges on the affected system by supplying a specially crafted
subnet-mask parameter.

This vulnerability has been assigned CVE-2009-0692 and CERT
Vulnerability Note VU#410676.


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

The script_write_params() function in ISC dhclient version 4.1.0 and
earlier, 4.0.1 and earlier as well as 3.1.2 and earlier fails to
properly verify the subnet-mask parameter while copying it into
the internal state.

This can be exploited to overwrite the stack frame pointer and execute
arbitrary code in the context of the dhclient process. The size of the
injected code is thereby limited to the MTU of the interface dhclient
is listening on.

For more details, please see CVE-2009-0692.


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

As a temporary workaround, disable dhclient(8) from the base OS and
use either the fixed dhclient packages from pkgsrc, or alternatively
the program dhcpcd(8) from the base system.

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

* NetBSD-current:

	Systems running NetBSD-current dated from before 2009-06-24
	should be upgraded to NetBSD-current dated 2009-06-25 or later.

	The following file needs to be updated from the netbsd-current
	CVS branch (aka HEAD):
		dist/dhcp/client/dhclient.c

	To update from CVS, re-build, and re-install dhclient:
		# cd src
		# cvs update -d -P dist/dhcp/client/dhclient.c
		# cd usr.sbin/dhcp
		# make USETOOLS=no cleandir dependall
		# cd client
		# make USETOOLS=no install

* NetBSD 5.*:

	Systems running NetBSD 5.* sources dated from before
	2009-07-14 20:00 UTC should be upgraded from NetBSD 5.*
	sources dated 2009-07-14 20:00 UTC or later.

	The following file needs to be updated from the netbsd-5 or
	netbsd-5-0 branches:
		dist/dhcp/client/dhclient.c

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

		# cd src
		# cvs update -r <branch_name> -d -P dist/dhcp/client/dhclient.c
		# cd usr.sbin/dhcp
		# make USETOOLS=no cleandir dependall
		# cd client
		# make USETOOLS=no install


	Alternatively, apply the following patch (with potential offset
	differences):
		http://ftp.NetBSD.org/pub/NetBSD/security/patches/SA2009-010-dhclient.patch

	To patch, re-build and re-install SSH:

		# cd dist/dhcp/client
		# patch -p0 < /path/to/SA2009-010-dhclient.patch

		# cd ../../../usr.sbin/dhcp
		# make USETOOLS=no cleandir dependall
		# cd client
		# make USETOOLS=no install


* NetBSD 4.*:

	Systems running NetBSD 4.* sources dated from before
	2009-07-14 20:00 UTC should be upgraded from NetBSD 4.*
	sources dated 2009-07-14 20:00 UTC or later.

	The following file needs to be updated from the netbsd-4 or
	netbsd-4-0 branches:
		dist/dhcp/client/dhclient.c

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

		# cd src
		# cvs update -r <branch_name> -d -P dist/dhcp/client/dhclient.c
		# cd usr.sbin/dhcp
		# make USETOOLS=no cleandir dependall
		# cd client
		# make USETOOLS=no install


	Alternatively, apply the following patch (with potential offset
	differences):
		http://ftp.NetBSD.org/pub/NetBSD/security/patches/SA2009-010-dhclient.patch

	To patch, re-build and re-install SSH:

		# cd dist/dhcp/client
		# patch -p0 < /path/to/SA2009-010-dhclient.patch

		# cd ../../../usr.sbin/dhcp
		# make USETOOLS=no cleandir dependall
		# cd client
		# make USETOOLS=no install


Thanks To
=========

The Mandriva Linux Engineering Team and for discovering and reporting
the software flaw and Christos Zoulas for providing a fix.


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

	2009-07-14	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 
  http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2009-010.txt.asc

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

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

$NetBSD: NetBSD-SA2009-010.txt,v 1.2 2009/07/14 20:40:33 tonnerre Exp $

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

iQIcBAEBAgAGBQJKXO1UAAoJEAZJc6xMSnBudBkQAJPPZ55nwsFZOp5V8tOIhuki
a+YKDE5zaa9AvIrvpzZqUIE9F9/FR92Ke7Sh5Ol7zxpnBJXwsEYIJfdKBW47Bx8y
drZ7KPvOyga8dqDE8OQWRzCWfpbzYGSIp706TlO0ONBzZLUN4JCy60kbZtAwXt83
oM50DTA9DhtIxy+MOJyStnHArZLQZYH4VTNBdQb3UmJR+/LjQIY2oxvLBwN/QKOB
mfFfyxHwgZXkY9dUXSB+wsdEtgLOToVUhDsrcNvzYYH9Dxs2unBpXdTFCy4BYcAZ
o5FiSEW5lHReDCiql5PZ+6AfiehzabmPC3rZLTD9QgjE3cPlrVA7XZsmnZnsxAF1
4O1/w8Pz4pl+X+84+JsbQCSkhMRX4zlkZ2lUtTtF9FZ73wHPih3oK1MN8ssW414c
Pms36xxKgmop/xw58/SGtlmaFD+0sUm6fSZBAlD5BDuSwqvWVUIvHXxEoAuN2Vbc
j65njdgvrpZ5VG0bX4CxE1rbxhjCJ0wwRgU3MgH36Pv6bFV3TBWqriGHIr9VmDbt
qGyQJdLlejW4cUjVhz8ZProbWhsvpoObtuAetysyhwRke6Ie/ssvon+0iLz4QikO
Nh2eaVdqQqJZRFOPGyxPoYjT1KU27+C7Xos+2D+VT/rnk/lnKcOG1ye+v0B7HNgc
eNYsWmC3rp8NPDDc6N18
=Jf/4
- -----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

iD8DBQFKXWjbNVH5XJJInbgRAunuAJwMPwE32CUAgxX1thoyIpRgcni/qwCfUbt5
ywl+8c9R00cNv2j5hTQBJlc=
=/Ucy
-----END PGP SIGNATURE-----