ESB-2018.1598 - [NetBSD] kernel: Denial of service - Remote/unauthenticated 2018-05-28

Printable version
PGP/GPG verifiable version

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                               ESB-2018.1598
                      Several vulnerabilities in NPF
                                28 May 2018

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:           kernel
Publisher:         NetBSD
Operating System:  NetBSD
Impact/Access:     Denial of Service -- Remote/Unauthenticated
                   Reduced Security  -- Remote/Unauthenticated
Resolution:        Patch/Upgrade

Original Bulletin: 
   ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2018-008.txt.asc

- --------------------------BEGIN INCLUDED TEXT--------------------

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


		NetBSD Security Advisory 2018-008
		=================================

Topic:		Several vulnerabilities in NPF

Version:	NetBSD-current:		source prior to Thu, Mar 22nd 2018
		NetBSD 7.1 - 7.1.2:	affected
		NetBSD 7.0 - 7.0.2:	affected
		NetBSD 6.1 - 6.1.5:	affected
		NetBSD 6.0 - 6.0.6:	affected

Severity:	Remote Rule Bypass, Remote Memory Corruption

Fixed:		NetBSD-current:		Thu, Mar 22nd 2018
		NetBSD-7-1 branch:	Mon, May 14th 2018
		NetBSD-7-0 branch:	Mon, May 14th 2018
		NetBSD-7 branch:	Mon, May 14th 2018
		NetBSD-6-1 branch:	Thu, May 17th 2018
		NetBSD-6-0 branch:	n/a
		NetBSD-6 branch:	Thu, May 17th 2018

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.


Abstract
========

Several vulnerabilities were discovered in NPF:

 1) Integer overflow when parsing IPv6 headers.

 2) Use-after-free when handling ICMP packets.

Issue 2 will not be fixed in the netbsd-6-0 branch.


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

 1) An integer overflow could be triggered when NPF was parsing IPv6
    options of a packet. This overflow could result in a header length
    that was smaller than expected, which could allow an incoming
    packet to bypass L4 rules.

 2) A use-after-free could occur when NPF was parsing an ICMP packet.
    This could result in a rule bypass, a panic, or unexpected
    behavior.


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 summarize 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-7     netbsd-7-0     netbsd-7-1
 ----     ----     --------     ----------     ----------
 src/sys/net/npf/npf.h
          1.55     1.47.2.1     1.47.6.1       1.47.12.1
 src/sys/net/npf/npf_inet.c
          1.45     1.32.2.3     1.32.6.1       1.32.10.1
 src/sys/net/npf/npf_alg_icmp.c
          1.29     1.23.2.1     1.23.6.1       1.23.12.1

 FILE              netbsd-6     netbsd-6-0     netbsd-6-1
 ----              --------     ----------     ----------
 src/sys/net/npf/npf.h
                   1.14.2.13    1.14.2.6.4.2   1.14.2.12.2.1
 src/sys/net/npf/npf_inet.c
                   1.10.4.11    n/a            1.10.4.9.2.2
 src/sys/net/npf/npf_alg_icmp.c
                   1.8.4.8      n/a            1.8.4.7.2.1


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

	# cd src
	# cvs update -d -P -r VERSION sys/net/npf/npf.h
	# cvs update -d -P -r VERSION sys/net/npf/npf_inet.c
	# cvs update -d -P -r VERSION sys/net/npf/npf_alg_icmp.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
=========

Maxime Villard for finding and fixing these issues.


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

	2018-05-24	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-SA2018-008.txt.asc

Information about NetBSD and NetBSD security can be found at
http://www.NetBSD.org/ and http://www.NetBSD.org/Security/ .


Copyright 2018, The NetBSD Foundation, Inc.  All Rights Reserved.
Redistribution permitted only in full, unmodified form.
- -----BEGIN PGP SIGNATURE-----

iQIcBAEBAgAGBQJbBxHeAAoJEAZJc6xMSnBuCE4QAITWmvcJpv8dANlmBQWElzs7
XRah2CrpujfXeSVuocay80QpTwQTn6Hm4ZAlkYZBlwBVqepPjpwcdb5LmWHzwFgK
33oN/YO7tu/9HFgR9qHHyAnEPT3v7QHxomHgPGPDkAksMOJEj7Mjs0oZQaSiCeoU
DF2VG+CNesIajJIz5WJDk+EE0G2YFOvkXYKWT26Ei1qUqeEYgfkK5E+ZGxE0rnE6
IVqubBIoNTmKvnsrv8uGKiQaau5iC2cztsZuCYsDwydYSNxXh5f/c9bfjpghaBw6
G8+3I9P2XGiNnP9wiyffpryktV1aUqtXFOeFjXKdPqmPscXnTWVtGYhPzyluG5Cv
4Led6qGvAzeB+TVHgjFc6pQVPkIyHF3lU4fQmfc3HZ1rsK7kEcGKVYwqCCnH7+jR
NABVdzFmEqp4BDm+6JhPQvmi4iB8tTXXjIUWPQSGjkBBo0dQTC+Fom4m8zVF+/fe
OqjslnTCw1fDO7byk19gsFXqR1fVOQ0qiVP55e3HKTyq1Y5gNpANJn8im5GOaBto
AbGbTfwq/w6nb6nVi2c9J14HOf36FC+ynFltF7IH/F5lFowwQORs3RSLmXgSTGjk
cFBpKt4IwfoYdPFBgBxkgoH+WNBmn7FoZWCa8b8mIEONyQNPH7+DiKzkcioj3Ttr
aEG7z/h7Wbhd1/UxDTwm
=40SA
- -----END PGP SIGNATURE-----

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        https://www.auscert.org.au/bulletins/

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================
-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQIVAwUBWwtPSmaOgq3Tt24GAQj3yw//XG6WUFg1w+d/BNGIojCIWHMSzO6bWku0
TxVSNQ7vQmpA3LnU/kBEH4gEuBV1RW1TozpB2zZsue7pujsdyGnfoqtLZ5toe5Ne
YNglzUJQjcvZU7skrcVYh2H9PhJJowcOGeya+bh2N4vMRsbMkb9I+C9RUd1gKiF3
t0yDBve7J4lDGO/k/WIFAeyqBcVwxV/s5qIjpdEsHEY1MBhHHZJWBa2KXZ0gavbB
ZCBcJ4/aWO086Z/zt2m1+RCymSR6z12Xdts9l0WrpHFbMk8LoelZLkiIKRkyzB53
0WTOYtEMf7OOmcSINWOk1hOKInkNEhcOsJl1+bqdenfRBsbud500tsuAxUlM2DTp
3OJZUm4/re8EQrXBFbXyRTD1YdU0APz3JstAVtEfbywJxbhZesIrnKEpoK2xn2qu
icwBD7D26MbSG4ekbbaODEXMGcld30qZ/BxW/0Ow4gNH9Fen7ptwlnER9lF5+kD9
1O+amxG8DOSErOm/K8bY51ULAVC9hmQfqhmoWw2O2JnEgHouPG/56x468KagVsdJ
XYsuLDiO2g25+jYcjShUFZev2QBtznNYShzWOiVf12ycfHgOtLaFxSQKco8tF82i
g69cGY2J7Woj8892WabXYaZH43dPqSDMqZEsF69BAd1AUGfW9Df6BAiE0PWoUvCK
16MPAXuugt4=
=Ao7A
-----END PGP SIGNATURE-----

« Back to bulletins