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: July 28th, 2014
Linux Advisory Watch: July 25th, 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: kernel memory disclosure vulnerability Print E-mail
User Rating:      How can I rate this item?
Posted by LinuxSecurity.com Team   
NetBSD The iBCS2 system call translator for statfs erroneously used theuser-supplied length parameter when copying a kernel data structureinto userland.

		 NetBSD Security Advisory 2003-013
		 =================================

Topic:		Kernel memory disclosure via ibcs2

Version:	NetBSD-current:	source prior to August 7, 2002
		NetBSD 1.6.1:	not affected
		NetBSD 1.6:	not affected
		NetBSD-1.5.3:	affected
		NetBSD-1.5.2:	affected
		NetBSD-1.5.1:	affected
		NetBSD-1.5:	affected

Severity:	

Fixed:		NetBSD-current:		August 7, 2002
		NetBSD-1.6 branch:	not affected
		NetBSD-1.5 branch:	August 28, 2002


Abstract
========

The iBCS2 system call translator for statfs(2) erroneously used the
user-supplied length parameter when copying a kernel data structure
into userland.  If the length parameter were larger than required,
then instead of copying only the statfs-related data structure,
additional kernel memory would also be made available to the user.


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

If iBCS2 support were enabled, a malicious user could call the iBCS2
version of statfs(2) with an arbitrarily large length parameter,
causing the kernel to return a large portion of kernel memory.  Such
memory might contain sensitive information, such as portions of the
file cache or terminal buffers.  This information might be directly
useful, or it might be leveraged to obtain elevated privileges in some
way.  For example, a terminal buffer might include a user-entered
password.

iBCS2 support is only present on i386/vax GENERIC kernel.


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

If your kernel configuration file does not contain COMPAT_IBCS2, 
your system is not affected.

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

* NetBSD-current:

	Systems running NetBSD-current dated from before 2002-08-06
	should be upgraded to NetBSD-current dated 2002-08-07 or later.

	The following directories need to be updated from the
	netbsd-current CVS branch (aka HEAD):
		src/sys/compat/ibcs2/ibcs2_stat.c
	However, because the date of the point fix is way too old, we'd suggest
	you to update the whole kernel.  The following instruction is for
	updating the whole kernel.

	To update from CVS, re-build, and re-install the kernel and reboot:
		# cd src
		# cvs update -d -P sys

		# cd sys/ARCH/conf
		# config KERNELCONF
		# cd ../../compile/KERNELCONF
		# make depend; make

		# cp netbsd /
		# reboot


* NetBSD 1.6, 1.6.1:

	The binary distribution of NetBSD 1.6 and 1.6.1 are NOT vulnerable.


* NetBSD 1.5, 1.5.1, 1.5.2, 1.5.3:

	The binary distribution of NetBSD 1.5 to 1.5.3 are vulnerable.   

	Systems running NetBSD 1.5, 1.5.1, 1.5.2, or 1.5.3 sources dated
	from before 2003-08-27 should be upgraded from NetBSD 1.5.*
	sources dated 2003-08-28 or later.

	The following directories need to be updated from the
	netbsd-1-5 CVS branch:
		src/sys/compat/ibcs2/ibcs2_stat.c

	To update from CVS, re-build, and re-install the kernel and reboot:

		# cd src
		# cvs update -d -P -r netbsd-1-5 sys/compat/ibcs2/ibcs2_stat.c

		# cd sys/ARCH/conf
		# config KERNELCONF
		# cd ../../compile/KERNELCONF
		# make depend; make

		# cp netbsd /
		# reboot


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

	To patch, re-build and re-install re-install the kernel and reboot:

		# cd src/sys/compat/ibcs2
		# patch < /path/to/SA2003-013-ibcs2.patch

		# make cleandir dependall
		# make install


Thanks To
=========

Some of the text are derived from FreeBSD security advisory
FreeBSD-SA-03:10.ibcs2.

The problem in ibcs2_stat.c was pointed out by silvio@qualys.com.


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

	2003-09-17	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-013.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-013.txt,v 1.4 2003/09/17 02:47:19 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
Ottawa Linux Symposium: May get by with a little help from its friends
Black Hat 2014: How to crack just about everything
NSA Playset, 911 hacked and war cats: A wild ride at DEF CON 22
More Details of Onion/Critroni Crypto Ransomware Emerge
Is there Another NSA Leaker? Updated
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.