[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
NetBSD Security Advisory 2017-006: Vnode reference leak in the openat system call
-----BEGIN PGP SIGNED MESSAGE-----
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
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
---- ---- -------- -------- ---------- ----------
1.208 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168
To update from CVS, re-build, and re-install the kernel:
# cd src
# cvs update -d -P -r VERSION sys/kern/vfs_lookup.c
# ./build.sh 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:
Mateusz Guzik for noticing the issue, and David A. Holland for
deploying the fix.
2017-09-08 Initial release
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
http://www.NetBSD.org/ and http://www.NetBSD.org/Security/ .
Copyright 2017, The NetBSD Foundation, Inc. All Rights Reserved.
Redistribution permitted only in full, unmodified form.
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
Main Index |
Thread Index |