Home    |    View Topics    |    Search    |    Contact Us    |   



Category:   OS (UNIX)  >   NetBSD Vendors:   NetBSD
NetBSD Compatibility Layer Flaws Let Local Users Deny Service
SecurityTracker Alert ID:  1030765
SecurityTracker URL:
CVE Reference:   GENERIC-MAP-NOMATCH   (Links to External Site)
Date:  Aug 27 2014
Impact:   Denial of service via local system
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 5.1 - 5.1.4, 5.2 - 5.2.2, 6.0 - 6.0.5, 6.1 - 6.1.4
Description:   Several vulnerabilities were reported in NetBSD. A local user can cause denial of service conditions.

A local user can trigger a null pointer dereference in the FreeBSD compatibility layer.

A local user can trigger a zero-sized memory allocation error in the NetBSD 32-bit compatibility layer.

A local user can trigger a zero-sized memory allocation error in the Digital UNIX (OSF/1) compatibility layer.

A local user can trigger a kernel memory array index error in the Linux and Linux 32-bit compatibility layer.

Maxime Villard, Christos Zoulas, Martin Husemann, Chuck Silvers, Enami Tsugutomo, and Matt Thomas reported these vulnerabilities.

Impact:   A local user can cause the target system to crash.
Solution:   The vendor has issued a fix.

The vendor's advisory is available at:

Vendor URL: (Links to External Site)
Cause:   Access control error, State error

Message History:   None.

 Source Message Contents

Subject:  NetBSD Security Advisory 2014-010: Multiple vulnerabilities in the compatibility layers

Hash: SHA1

		NetBSD Security Advisory 2014-010

Topic:		Multiple vulnerabilities in the compatibility layers

Version:	NetBSD-current:		source prior to Tue, Apr 15th 2014
		NetBSD 6.1 - 6.1.4:	affected
		NetBSD 6.0 - 6.0.5:	affected
		NetBSD 5.1 - 5.1.4:	affected
		NetBSD 5.2 - 5.2.2:	affected

Severity:	Local DoS

Fixed:		NetBSD-current:		Tue, Apr 15th 2014
		NetBSD-6-0 branch:	Mon, Apr 21th 2014
		NetBSD-6-1 branch:	Mon, Apr 21th 2014
		NetBSD-6 branch:	Mon, Apr 21th 2014
		NetBSD-5-2 branch:	Wed, May 14th 2014
		NetBSD-5-1 branch:	Wed, May 14th 2014
		NetBSD-5 branch:	Wed, May 14th 2014

Teeny versions released later than the fix date will contain the fix.

Please note that NetBSD releases prior to 5.1 are no longer supported.
It is recommended that all users upgrade to a supported release.


Four compatibility layers are affected by several vulnerabilities:

	1) FreeBSD compatibility: NULL pointer dereference
	2) NetBSD 32-bit compatibility: Zero-sized memory allocation
	3) Digital UNIX (formerly OSF/1) compatibility: Zero-sized
	   memory allocation
	4) Linux and Linux 32-bit compatibility: User-controllable
	   kernel memory array index.

Each of them allows a local user to crash the system.

Technical Details

For more clarity the four layers affected will be referred to as
COMPAT_xx, where xx is the emulated system.

 1) Due to a programming mistake in COMPAT_FREEBSD, a simple call to the
    sched_getparam system call would cause the kernel to dereference a
    NULL pointer, and thus to crash.
 2) Due to a missing input validation check in COMPAT_NETBSD32's kevent
    system call, a user could cause the kernel to perform a zero-sized
    memory allocation, resulting in a crash.
 3) Due to a missing input validation check in COMPAT_OSF1's
    getdirentries system call, a user could cause the kernel to perform
    a zero-sized memory allocation, resulting in a crash.
 4) Due to missing input validation checks in the COMPAT_LINUX and
    COMPAT_LINUX32 ELF binary loader, a specially-crafted binary could
    control a kernel memory array index - address from which data is
    read. Attempting to read at an unmapped memory page will cause the
    kernel to crash.

Solutions and Workarounds

- - Disable the compability modules
- ---------------------------------
You can achieve this with the modunload(8) tool. Please read the
appropriate manual page. For example, you can disable the Linux modules
by moving the kernel object files out of the way. These are located in:


And running the following command to unload them:

	# modunload compat_${NAME}

The modules have dependencies, so you need to unload them in the proper

You can also disable these modules by rebuilding your kernel without the
COMPAT_${NAME} options.

Note however that it is to be considered as a temporary workaround, and
you are strongly advised to fix your system from source.

- - Fix from source
- -----------------
For all NetBSD versions, you need to obtain fixed kernel sources,
rebuild and install the new kernel, and reboot the system.
The fixed source may be obtained from the NetBSD CVS repository.        
The following instructions briefly summarise how to upgrade your        
kernel.  In these instructions, replace:

  ARCH     with your architecture (from uname -m),               
  KERNCONF with the name of your kernel configuration file and  
  VERSION  with the file version below

File versions containing the fixes:

FILE  HEAD  netbsd-6  netbsd-6-1  netbsd-6-0  netbsd-5  netbsd-5-2  netbsd-5-1
- ----  ----  --------  ----------  ----------  --------  ----------  ----------
      1.42  %         %           %           XXXXXXXX  XXXXXXXXXX  XXXXXXXXXX

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

	# cd src
	# cvs update -d -P -r VERSION sys/compat/freebsd/freebsd_sched.c
	# cvs update -d -P -r VERSION sys/compat/netbsd32/netbsd32_compat_50.c
	# cvs update -d -P -r VERSION sys/compat/netbsd32/netbsd32_event.c
	# cvs update -d -P -r VERSION sys/compat/osf1/osf1_file.c
	# cvs update -d -P -r VERSION sys/compat/linux/common/linux_exec_elf32.c
	# ./ kernel=KERNCONF
	# mv /netbsd /netbsd.old
	# cp sys/arch/ARCH/compile/obj/KERNCONF/netbsd /netbsd 
	# shutdown -r now

For more information on how to do this, see:

Thanks To

Thanks to Maxime Villard, Christos Zoulas, Martin Husemann, Chuck
Silvers, Enami Tsugutomo and Matt Thomas for finding, fixing and
helping in fixing these issues.

Revision History

	2014-08-27	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 2014, The NetBSD Foundation, Inc.  All Rights Reserved.
Redistribution permitted only in full, unmodified form.

$NetBSD: NetBSD-SA2014-010.txt,v 1.1 2014/08/27 00:26:00 tonnerre Exp $
Version: GnuPG v1


Go to the Top of This SecurityTracker Archive Page

Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2021, LLC