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 Advisory Watch: October 24th, 2014
Linux Security Week: October 20th, 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: zlib format string vulnerability Print E-mail
User Rating:      How can I rate this item?
Posted by LinuxSecurity.com Team   
NetBSD Privilege escalation in applications call using gzprintf().

		 NetBSD Security Advisory 2003-004
		 =================================

Topic:		Format string vulnerability in zlib gzprintf()

Version:	NetBSD-current:	source prior to March 5, 2003
		NetBSD 1.6:	affected
		NetBSD-1.5.3:	affected
		NetBSD-1.5.2:	affected
		NetBSD-1.5.1:	affected
		NetBSD-1.5:	affected
		pkgsrc:		devel/zlib packages prior to zlib-1.1.4nb1

Severity:	Privilege escalation in applications call using gzprintf().
		(There are none in the base system.)

Fixed:		NetBSD-current:		March 6, 2003
		NetBSD-1.6 branch:	March 6, 2003 (1.6.1 will include the fix)
		NetBSD-1.5 branch:	March 6, 2003
		pkgsrc devel/zlib:	zlib-1.1.4nb1 corrects this issue


Abstract
========

The gzprintf function in zlib did not do bounds checking on user
supplied data.  Depending on how the function is used in an application,
malign source data can be designed to overflow a buffer and execute
arbitrary code as the user of the application.

gzprintf is not used in any program in the NetBSD system, but could be
used by third party software, including pkgsrc.


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

While many programs use zlib, most use only the decompression
functionality. gzprintf is a compressing printf, and is rarely used, by
comparison.

Additionally, since network uses of zlib generally compress data going
onto the network from the local host, it is unlikely that applications
exist which would be remotely exploitable because of this bug.

Local privilege escalation could be a concern, and while there are no
instances of binaries in the base NetBSD system which use gzprintf,
convincing someone to run a vulnerable application under their uid could
be abused to gain their privileges.

NetBSD Security-Officer is performing an audit of pkgsrc code to create
a list of vulnerable pkgs, which will be marked in the audit-packages
database, and added to this advisory.

It is noteworthy that many third-party distribution files include their
own copy of zlib, for use on operating systems which do not supply it.
NetBSD pkgsrc uses the application's configure script (if any) and
should detect and use the patched NetBSD zlib in those cases.
  
http://cve.mitre.org/cgi-bin/cvename.cgi?name=3DCAN-2003-01


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


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

* NetBSD-current:

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

	The following file needs to be updated from the
	netbsd-current CVS branch (aka HEAD):
		lib/libz/gzio.c

	To update from CVS, re-build, and re-install libz:
		# cd src
		# cvs update -d -P lib/libz/gzio.c
		# cd lib/libz

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


* NetBSD 1.6:

	The binary distribution of NetBSD 1.6 is vulnerable.   

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

	NetBSD 1.6.1 will include the fix.

	The following file needs to be updated from the
	netbsd-1-6 CVS branch:
		lib/libz/gzio.c

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

		# cd src
		# cvs update -d -P -r netbsd-1-6 lib/libz/gzio.c
		# cd lib/libz

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


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

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

		# cd src/lib/libz
		# patch < /path/to/SA2003-004-zlib-1.6.patch

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


* NetBSD 1.5, 1.5.1, 1.5.2, 1.5.3:

	The binary distribution of NetBSD 1.5.3 is vulnerable.   

	Systems running NetBSD 1.5, 1.5.1, 1.5.2, or 1.5.3 sources dated
	from before 2003-03-05 should be upgraded from NetBSD 1.5.*
	sources dated 2003-03-06 or later.

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

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

		# cd src
		# cvs update -d -P -r netbsd-1-5 lib/libz/gzio.c
		# cd lib/libz

		# make cleandir dependall
		# make install


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

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

		# cd src/lib/libz
		# patch < /path/to/SA2003-004-zlib-1.5.patch

		# make cleandir dependall
		# make install


Thanks To
=========

Bill Squier for patches, Lubomir Sedlacik for notification.


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

	2003-03-26	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-004.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-004.txt,v 1.5 2003/03/26 18:07:22 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
Disaster as CryptoWall encrypts US firm's entire server installation
Now Everyone Wants to Sell You a Magical Anonymity Router. Choose Wisely
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.