NetBSD-Announce archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

NetBSD Security Advisory 2013-011: embryonic TCP sockets local DoS



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

                NetBSD Security Advisory 2013-011
                =================================

Topic:          embryonic TCP sockets local DoS


Version:        NetBSD-current:         source prior to Nov 2nd, 2013
                NetBSD 6.1 - 6.1.2:     affected
                NetBSD 6.0 - 6.0.2:     affected
                NetBSD 5.1 - 5.1.2:     not affected
                NetBSD 5.2:             not affected

Severity:       local DoS

Fixed:          NetBSD-current:         Nov 2nd, 2013
                NetBSD-6-0 branch:      Nov 25th, 2013
                NetBSD-6-1 branch:      Nov 25th, 2013
                NetBSD-6 branch:        Nov 25th, 2013

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.


Abstract
========

Recently two vulnerabilities in the area of embryonic sockets have been
fixed. Both issues are due to a socket not having credentials set during
a very short timeframe of its creation, and can lead to a user causing
a panic by timing a tcpdrop just right.


Technical Details
=================

The network code adds new connections to the connection table
in an interrupt and references a socket from this table. The
socket is also added to the accept queue of the listening socket.

At this point the socket has no credentials, but tcpdrop can
find it in the connection table and crash the system, for the first
issue by looking up its credentials and hitting an assertion, and in
the second version by referencing a NULL pointer.


Solutions and Workarounds
=========================

Install and reboot to a kernel containing the fixes.

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 newer than the
fix date for the branch you are using 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/netinet/tcp_usrreq.c:
        Branch          NEWVERSION
        ---------------------------
        HEAD            1.168
        netbsd-6        1.162.2.2
        netbsd-6-1      1.162.2.1.6.1
        netbsd-6-0      1.162.2.1.4.1

Versions of src/sys/kern/uipc_socket.c:
        Branch          NEWVERSION
        ---------------------------
        HEAD            1.220
        netbsd-6        1.209.2.4
        netbsd-6-1      1.209.2.2.2.2
        netbsd-6-0      1.209.2.1.4.2

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

        # cd src
        # cvs update -rNEWVERSION src/sys/netinet/tcp_usrreq.c
        # cvs update -rNEWVERSION src/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:

   http://www.NetBSD.org/guide/en/chap-kernel.html

Thanks To
=========

Thanks to Brian Marcotte for finding the issues and Christos Zoulas and
Michael van Elst for developing fixes.


Revision History
================

        2013-11-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 
  http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-011.txt.asc

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-011.txt,v 1.2 2013/11/26 23:59:25 tonnerre Exp $

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)

iQIcBAEBAgAGBQJSlTXnAAoJEAZJc6xMSnBuSH8P/RcYbDdKyoxomS0QZQCH7f3a
ynbachoA6T7snbSSvMAbWha+A4m/UcTVMy7dZpxUmVipGl2Q/IIbQ030qX+V4KDR
HtDUvY6WgmmfF3No7lIoryJ46yKV9xhSLeSvk47jHyNQQS6n4dvrrwHFqEhxuie5
TGLEsqeTSfxfNjlKYCfitdJU5YBY9Evr1no2nxCVjf2cyDVK+rHNrus0Y0d4suNr
VU3wfrA2gOdGgBaWrMfs38tWPQ7gtsvJlp1YHw+L+3rdw25QOkZBf6xEEt+cpR74
PXIhDKquXaXmeoFUto0zetinuufdQ3lPZgYWhpBHn6WkY6g0q+WElNVbqLpteWR7
CUSJaEkjpn3zuCq/aJ/n6d3abQy4Mctj36Ew/yzTM0dokmbymZRPc2vjBNgPIZ/x
C5WcEYn0U6pJ2eGvoU2eI4XLmU2D+MQsvuyQFyEvEXyU4tYZAnbGrCIteBfoeX1v
IuW4bpohwrTcJ0N9m22UtuGDCDqOegDdlXr3qh9TWPOWgT3sHJwUOzjuyeNgeMdT
64IbVhPK0+YGQU5R/YtEkomC2xst9HzRCVYIzvCHvhWUqf57Yxs9ULvE/tIi6xSL
r3N0Fz3YAFIyXjtG50XC0w/+27Q0DdpTtTIqDYYEnHnkPydmTR1QJQfGsOtF/kju
NgP7knwQkxh9X4FpEQSa
=Vhud
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index | Old Index