Subject: NetBSD Security Advisory 2002-028: Buffer overrun in getnetbyname/getnetbyaddr
To: None <tech-security@netbsd.org, current-users@netbsd.org>
From: NetBSD Security Officer <security-officer@netbsd.org>
List: current-users
Date: 11/20/2002 02:22:31
-----BEGIN PGP SIGNED MESSAGE-----


		 NetBSD Security Advisory 2002-028
		 =================================

Topic:		Buffer overrun in getnetbyname/getnetbyaddr

Version:	NetBSD-current:	source prior to November 15, 2002
		NetBSD 1.6:	affected
		NetBSD-1.5.3:	affected
		NetBSD-1.5.2:	affected
		NetBSD-1.5.1:	affected
		NetBSD-1.5:	affected

everity:	Possible remote root compromise

Fixed:		NetBSD-current:		November 15, 2002
		NetBSD-1.6 branch:	November 16, 2002
		NetBSD-1.5 branch:	November 16, 2002


Abstract
========

getnetbyname(3) and getnetbyaddr(3) lacked important boundary checks,
and are vulnerable to malicious DNS responses, which could cause a
buffer overrun on the stack.  The vulnerability could cause a remote
root compromise, if a privileged process uses these library functions.


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

http://www.isc.org/products/BIND/bind-security.html
See the section named: "LIBRESOLV: buffer overrun"


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

Since the issue is in libc, all statically-linked binaries have to be rebuilt.

Any binary that is statically linked against a vulnerable version of libc
must be rebuilt.  This includes binaries built by the pkgsrc system.

Any binary that depends on libc with an older major number (compiled
before 1997) should be removed.

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

* NetBSD-current:

	Systems running NetBSD-current dated from before 2002-11-15
	should be upgraded to NetBSD-current dated 2002-11-15 or later.

	The following directories need to be updated from the
	netbsd-current CVS branch (aka HEAD):
		lib/libc/net/getnetnamadr.c

	To update from CVS, re-build, and re-install libc and statically-linked
	binaries:
		# cd src
		# cvs update -d -P lib/libc/net/getnetnamadr.c

		# cd lib/libc
		# make obj dependall
		# make install

		# cd ../../rescue
		# make obj dependall
		# make install

		# cd ../sbin/verifiedexec_load
		# make obj dependall
		# make install


* NetBSD 1.6:

	Systems running NetBSD 1.6 dated from before 2002-11-16 should
	be upgraded to NetBSD 1.6 dated 2002-11-16 or later.

	The following directories need to be updated from the
	netbsd-1-6 CVS branch:
		lib/libc/net/getnetnamadr.c

	To update from CVS, re-build, and re-install libc and statically-linked
	binaries:
		# cd src
		# cvs update -d -P -r netbsd-1-6 lib/libc/net/getnetnamadr.c

		# cd lib/libc
		# make obj dependall
		# make install

		# cd ../../bin
		# make obj dependall
		# make install
		# cd ../sbin
		# make obj dependall
		# make install


* NetBSD 1.5, 1.5.1, 1.5.2, 1.5.3:

	Systems running NetBSD 1.5, 1.5.1, 1.5.2 or 1.5.3 dated from before
	2002-11-16 should be upgraded to NetBSD 1.6 dated 2002-11-16 or
	later.

	The following directories need to be updated from the
	netbsd-1-5 CVS branch:
		lib/libc/net/getnetnamadr.c

	To update from CVS, re-build, and re-install libc and statically-linked
	binaries:
		# cd src
		# cvs update -d -P -r netbsd-1-5 lib/libc/net/getnetnamadr.c

		# cd lib/libc
		# make obj dependall
		# make install

		# cd ../../bin
		# make obj dependall
		# make install
		# cd ../sbin
		# make obj dependall
		# make install


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

	2002-11-20	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-SA2002-028.txt.asc

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


Copyright 2002, The NetBSD Foundation, Inc.  All Rights Reserved.

$NetBSD: NetBSD-SA2002-028.txt,v 1.8 2002/11/19 16:50:45 david Exp $


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBPdpxhD5Ru2/4N2IFAQHVwAP/Vs3uaJBDJR0zY+iq9ZT/1Fis+4Cia2Jp
N/aj2NyDYOaUssIgV/V5UVg0CwT79DRmX90AwIs073DlcoO1LIZrtufGnexerRP/
eZQ8h7uE4NsG4M/MZ2gMvE0+N5NAyPy1l+JNjNeHghw48asitI54nGWMFO5L63yv
VKxCTFtsFYE=
=WRbF
-----END PGP SIGNATURE-----