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

Sign up!
EnGarde Community
What is the most important Linux security technology?
Linux Events
Linux User Groups
Link to Us
Security Center
Book Reviews
Security Dictionary
Security Tips
White Papers
Featured Blogs
All About Linux
DanWalsh LiveJournal
Latest Newsletters
Linux Security Week: March 30th, 2015
Linux Advisory Watch: March 27th, 2015
LinuxSecurity Newsletters
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 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


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


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

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):
	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:

	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

	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

The problem in ibcs2_stat.c was pointed out by

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

Information about NetBSD and NetBSD security can be found at and

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 >


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
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 2015 Guardian Digital, Inc. All rights reserved.