[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
NetBSD Security Advisory 2013-008: Error in authorization check re tcpdrop sysctl
-----BEGIN PGP SIGNED MESSAGE-----
NetBSD Security Advisory 2013-008
Topic: Error in authorization check re tcpdrop sysctl
Version: NetBSD-current: affected prior to Aug 2nd, 2013
NetBSD 6.1: affected
NetBSD 6.0: affected
NetBSD 5.2: not affected
NetBSD 5.1: not affected
Severity: Local Denial of Service
Fixed: NetBSD-current: Aug 2nd, 2013
NetBSD-6 branch: Aug 2nd, 2013
NetBSD-6-1 branch: Aug 2nd, 2013
NetBSD-6-0 branch: Aug 2nd, 2013
Please note that NetBSD releases prior to 5.1 are no longer supported.
It is recommended that all users upgrade to a supported release.
Due to a programming error, the authorization check is inverted
in the KAUTH_REQ_NETWORK_SOCKET_DROP sysctl; as a result, users on
affected systems cannot use tcpdrop to terminate their own connections,
only those of others.
The authorization check in src/sys/kern/uipc_socket.c for
if (proc_uidmatch(cred, so->so_cred))
when it ought to have tested
if (proc_uidmatch(cred, so->so_cred) == 0)
This is an error in the kernel.
See also https://program.ohm2013.org/event/252.html
Solutions and Workarounds
To deal with the immediate problem of users using tcpdrop, a
weak mitigation would be to remove access to the tcpdrop binary
for users; the fault would still exist and be exploitable with
self-built tools though.
Install a kernel containing the fix.
The fastest way to do that, if you are running or can run a standard kernel
built as part of the NetBSD release process, is to obtain the corresponding
kernel from the daily NetBSD autobuild output and install it on your system.
You can obtain such kernels from http://nyftp.netbsd.org/pub/NetBSD-daily/
where they are sorted by NetBSD branch, date, and architecture. To fix
a system running e.g. NetBSD 6.0 or the stable NetBSD 6.0 branch, the
most appropriate kernel will be the "netbsd-6-0" kernel.
To fix a system running NetBSD-current, the "HEAD" kernel should be used.
In all cases, a kernel from an autobuild dated 20130803 or newer must be
used to fix the problem.
If you cannot use the autobuilt kernels, then for all affected 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), and
KERNCONF with the name of your kernel configuration file.
NEWVERSION with the CVS version of the fix
Versions of src/sys/kern/uipc_socket.c:
To update from CVS, re-build, and re-install the kernel:
# cd src
# cvs update -rNEWVERSION sys/kern/uipc_socket.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:
Sander Bos for finding the issue, informing security officer and
proposing the fix.
2013-08-02 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 2013, The NetBSD Foundation, Inc. All Rights Reserved.
Redistribution permitted only in full, unmodified form.
$NetBSD: NetBSD-SA2013-008.txt,v 1.1 2013/08/02 20:28:43 tonnerre Exp $
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (NetBSD)
-----END PGP SIGNATURE-----
Main Index |
Thread Index |