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: file Buffer overflow Print E-mail
User Rating:      How can I rate this item?
Posted by LinuxSecurity.com Team   
NetBSD If file(1) is run over a specially constructed ELF file, an exploitablestack overflow occurs and attackers can gain the privileges of the userrunning file(1).

--[PinePGP]--------------------------------------------------[begin]--

		 NetBSD Security Advisory 2003-003
		 =================================

Topic:		Buffer Overflow in file(1)

Version:	NetBSD-current:	source prior to February 27, 2003
		NetBSD 1.6:	affected
		NetBSD-1.5.3:	affected
		NetBSD-1.5.2:	affected
		NetBSD-1.5.1:	affected
		NetBSD-1.5:	affected

Severity:	Inducing a user to run file(1) could execute code as the user

Fixed:		NetBSD-current:		February 26, 2003
		NetBSD-1.6 branch:	March 8, 2003 (1.6.1 includes the fix)
		NetBSD-1.5 branch:	March 9, 2003 (1.5.4 includes the fix)


Abstract
========

If file(1) is run over a specially constructed ELF file, an exploitable
stack overflow occurs and attackers can gain the privileges of the user
running file(1).


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

A buffer overflow has been found in the file(1) program. If a user
were to run file(1) over a specially doctored ELF file, arbitrary code
would be executed as a result. Thus, if an attacker can somehow induce
a user to run file(1) over a file the attacker controls, the attacker
may gain any system privileges the victim possesses.

See iDEFENSE Security Advisory 03.04.03 
http://www.idefense.com/advisory/03.04.03.txt


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

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

* NetBSD-current:

	Systems running NetBSD-current dated from before 2003-02-27
	should be upgraded to NetBSD-current dated 2003-02-27 or later.

	The following files need to be updated from the netbsd-current
	CVS branch (aka HEAD) to the respective revisions:
		src/usr.bin/file/readelf.c:	1.17
		src/usr.bin/file/softmagic.c:	1.31

	To update from CVS, re-build, and re-install file:
		# cd src
		# cvs update -d -A -P usr.bin/file
		# cd usr.bin/file

		# make cleandir dependall
		# make install


* NetBSD 1.6:

	The binary distribution of NetBSD 1.6 is vulnerable.

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

	NetBSD 1.6.1 will include the fix.

	The following files need to be updated from the netbsd-1-6
	CVS branch to the respective revisions:
		src/usr.bin/file/readelf.c:	1.13.2.1
		src/usr.bin/file/softmagic.c:	1.26.2.1

	To update from CVS, re-build, and re-install file:
		# cd src
		# cvs update -d -r netbsd-1-6 -P usr.bin/file
		# cd usr.bin/file

		# make cleandir dependall
		# make 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-10 should be upgraded from NetBSD 1.5.*
	sources dated 2003-03-10 or later.

	The following files need to be updated from the netbsd-1-5
	CVS branch to the respective revisions:
		src/usr.bin/file/readelf.c:	1.6.4.3
		src/usr.bin/file/softmagic.c:	1.18.4.2

	To update from CVS, re-build, and re-install file:
		# cd src
		# cvs update -d -r netbsd-1-5 -P usr.bin/file
		# cd usr.bin/file

		# make cleandir dependall
		# make install


Thanks To
=========

Lubomir Sedlacik and Antti Kantee, for drawing our attention to the
problem.

Christos Zoulas, for aiding in the solution and with this advisory.


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

	2003-03-12	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-003.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-003.txt,v 1.7 2003/03/12 03:51:31 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
Encryption goof fixed in TorrentLocker file-locking malware
Qubes: The Open Source OS Built for Security
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.