Users login

Create an account »

JOIN XATRIX

Users login

Home » Hacking News » NetBSD 2002-028: Buffer overrun in getnetbyname/getnetbyaddr

NetBSD 2002-028: Buffer overrun in getnetbyname/getnetbyaddr

by Nikola Strahija on November 20th, 2002 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 $



Newsletter signup

Signup to our monthly newsletter and stay in touch with IT news!

Free E-books

We've got ebooks! But they're not online. :( Please give us a few days to bring downloads back.

Contact

Have something to say or just wanna drop us a line? Please keep this in mind: to spam, we reply with spam.

Contact us »