LinuxSecurity.com
Share your story
The central voice for Linux and Open Source security news
Home News Topics Advisories HOWTOs Features Newsletters About Register

Welcome!
Sign up!
EnGarde Community
Login
Polls
What is the most important Linux security technology?
 
Advisories
Community
Linux Events
Linux User Groups
Link to Us
Security Center
Book Reviews
Security Dictionary
Security Tips
SELinux
White Papers
Featured Blogs
All About Linux
DanWalsh LiveJournal
Securitydistro
Latest Newsletters
Linux Security Week: September 15th, 2014
Linux Security Week: September 8th, 2014
Subscribe
LinuxSecurity Newsletters
E-mail:
Choose Lists:
About our Newsletters
RSS Feeds
Get the LinuxSecurity news you want faster with RSS
Powered By

  
NetBSD: libc off-by-one vulnerability Print E-mail
User Rating:      How can I rate this item?
Posted by LinuxSecurity.com Team   
NetBSD In the library function realpath, there was a string manipulationmistake which could lead to 1-byte buffer overrun.

		 NetBSD Security Advisory 2003-011
		 =================================

Topic:		off-by-one error in realpath(3)

Version:	NetBSD-current:	source prior to August 4, 2003
		NetBSD 1.6.1:	affected
		NetBSD 1.6:	affected
		NetBSD-1.5.3:	affected
		NetBSD-1.5.2:	affected
		NetBSD-1.5.1:	affected
		NetBSD-1.5:	affected

Severity:	Possible remote buffer overrun/root compromise

Fixed:		NetBSD-current:		August 4, 2003
		NetBSD-1.6 branch:	August 5, 2003 (1.6.2 will include the fix)
		NetBSD-1.5 branch:	Awaiting pullups


Abstract
========

In the library function realpath(3), there was a string manipulation
mistake which could lead to 1-byte buffer overrun.  realpath(3) is
being used by important network daemons such as ftpd(8),
therefore the vulnerability could be remotely exploitable.

Note: The same error remained in a derived function in the distribution
of the wu-ftpd server (Not part of NetBSD's base system). This
information has been available to the general public for a matter of
days now. Exploits have been released against wu-ftpd. They are probably
being written against other affected services as well. If you offer any
of the affected services, you are advised to patch your system
immediately.


Technical Details
=================
 
http://www.kb.cert.org/vuls/id/743092

Binaries in the NetBSD base system which use realpath(3) include:

/bin/systrace
/usr/libexec/ftpd (*)
/sbin/mount
/sbin/umount
/usr/sbin/mountd (*)
/usr/bin/ssh
/usr/sbin/sshd (*)
/usr/libexec/sftp-server (*)
/usr/sbin/bootpd (*)

Binaries marked (*) listen on network interfaces, and could be remotely
exploitable.


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

To fix this vulnerability you will need to upgrade your libc.

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

Note that all statically-linked binaries, such as the following, must be
rebuilt:
- - binaries under /sbin and /bin for 1.5 and 1.6-based systems
- - binaries under /rescue for NetBSD-current systems
- - statically-linked binaries built by pkgsrc

Also, running instances of daemons must be restarted, if you do not plan
to reboot the machine after the update of libc.


* NetBSD-current:

	Systems running NetBSD-current dated from before 2003-08-03
	should be upgraded to NetBSD-current dated 2003-08-04 or later.

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

	To update from CVS, re-build, and re-install libc and rescue:
		# cd src
		# cvs update -d -P lib/libc

		# cd lib/libc
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install

		# cd ../../rescue
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install

		(then, reboot, or restart affected daemons)

* NetBSD 1.6, 1.6.1:

	The binary distributions of NetBSD 1.6 and 1.6.1 are vulnerable.

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

	NetBSD 1.6.2 will include the fix.

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

	To update from CVS, re-build, and re-install libc and static
	binaries:

		# cd src
		# cvs update -d -P -r netbsd-1-6 lib/libc

		# cd lib/libc
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install

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

		# cd ../bin
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install

		(then, reboot, or restart affected daemons)

        Alternatively, apply the following patch (with potential offset
        differences):
                 ftp://ftp.netbsd.org/pub/NetBSD/security/patches/SA2003-011-realpath.patch

        To patch, re-build and re-install libc, and static binaries:

                # cd src
                # patch < /path/to/SA2003-011-realpath.patch

		# cd lib/libc
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install

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

		# cd ../bin
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install

		(then, reboot, or restart affected daemons)

* NetBSD 1.5, 1.5.1, 1.5.2, 1.5.3:

	The binary distributions of NetBSD 1.5, 1.5.1, 1.5.2, and 1.5.3
	are vulnerable.

	Changes have not yet been pulled up to the 1.5 source branch.

	Apply the following patch (with potential offset differences):
	 	ftp://ftp.netbsd.org/pub/NetBSD/security/patches/SA2003-011-realpath.patch

        To patch, re-build and re-install libc, and static binaries:

                # cd src
                # patch < /path/to/SA2003-011-realpath.patch

		# cd lib/libc
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install

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

		# cd ../bin
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install

		(then, reboot, or restart affected daemons)


Thanks To
=========

CERT


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

	2003-08-04	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-SA2003-011.txt.asc

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


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

$NetBSD: NetBSD-SA2003-011.txt,v 1.7 2003/08/04 16:02:47 david Exp $



 
< Prev   Next >
    
Partner

 

Latest Features
Peter Smith Releases Linux Network Security Online
Securing a Linux Web Server
Password guessing with Medusa 2.0
Password guessing as an attack vector
Squid and Digest Authentication
Squid and Basic Authentication
Demystifying the Chinese Hacking Industry: Earning 6 Million a Night
Free Online security course (LearnSIA) - A Call for Help
What You Need to Know About Linux Rootkits
Review: A Practical Guide to Fedora and Red Hat Enterprise Linux - Fifth Edition
Yesterday's Edition
Today's Security Hacks Are After More Than Bank Info
How Boston Children's Hospital Hit Back at Anonymous
SNMP DDoS Scans Spoof Google Public DNS Server
Partner Sponsor

Community | HOWTOs | Blogs | Features | Book Reviews | Networking
 Security Projects |  Latest News |  Newsletters |  SELinux |  Privacy |  Home
 Hardening |   About Us |   Advertise |   Legal Notice |   RSS |   Guardian Digital
(c)Copyright 2014 Guardian Digital, Inc. All rights reserved.