Home    |    View Topics    |    Search    |    Contact Us    |   



Category:   OS (UNIX)  >   NetBSD Vendors:   NetBSD
NetBSD openat() System Call Vnode Reference Leak Lets Local Users Cause Denial of Service Conditions on the Target System
SecurityTracker Alert ID:  1039311
SecurityTracker URL:
CVE Reference:   GENERIC-MAP-NOMATCH   (Links to External Site)
Date:  Sep 11 2017
Impact:   Denial of service via local system
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 6.0 - 6.0.5, 6.1 - 6.1.4, 7.0 - 7.0.2, 7.1, 8.0 beta
Description:   A vulnerability was reported in NetBSD. A local user can cause denial of service conditions on the target system.

A local user can invoke a specially crafted openat() system call to exploit a vnode reference leak in the kernel to prevent the target volume from being unmounted. This can be repeated multiple times to corrupt the kernel heap.

Mateusz Guzik reported this vulnerability.

Impact:   A local user can cause denial of service conditions on the target system.
Solution:   The vendor has issued a fix.

The vendor advisory is available at:

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

Message History:   None.

 Source Message Contents

Subject:  NetBSD Security Advisory 2017-006: Vnode reference leak in the openat system call

Hash: SHA1

		NetBSD Security Advisory 2017-006

Topic:		Vnode reference leak in the openat system call

Version:	NetBSD-current:		source prior to Sun, July 9th 2017
		NetBSD 8.0 beta:	affected
		NetBSD 7.1:		affected
		NetBSD 7.0 - 7.0.2:	affected
		NetBSD 6.1 - 6.1.4:	not affected
		NetBSD 6.0 - 6.0.5:	not affected

Severity:	Local privilege escalation

Fixed:		NetBSD-current:		Sun, July 9th 2017
		NetBSD-8 branch:	Mon, July 10th 2017
		NetBSD-7-1 branch:	Mon, July 10th 2017
		NetBSD-7-0 branch:	Mon, July 10th 2017
		NetBSD-7 branch:	Mon, July 10th 2017

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

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


An easily exercisable error path in the kernel leaves behind an
unreclaimed reference to a vnode. This prevents unmounting the
affected volume, allowing local denial of service. It is likely that
tickling the weakness repeatedly can be used to corrupt the kernel
heap and thus gain kernel-level privileges, even with securelevel

Technical Details

When calling the openat system call using a file descriptor that does
not name a directory as the starting point for path lookup, a
reference to the underlying vnode is taken temporarily and then not
released when the error is discovered. Performing such a call often
enough results in overflowing the internal reference count and
corrupting the kernel heap.

Solutions and Workarounds

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-8   netbsd-7   netbsd-7-1   netbsd-7-0
 ----  ----   --------   --------   ----------   ----------

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

	# cd src
	# cvs update -d -P -r VERSION sys/kern/vfs_lookup.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

Mateusz Guzik for noticing the issue, and David A. Holland for
deploying the fix.

Revision History

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


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