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

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

                               ESB-2019.1544
            Unprivileged kernel memory overwrite in mq_send(3)
                                3 May 2019

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

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

Product:           NetBSD
Publisher:         NetBSD
Operating System:  NetBSD
Impact/Access:     Unauthorised Access -- Existing Account
Resolution:        Patch/Upgrade

Original Bulletin: 
   http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2019-002.txt.asc

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

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

		 NetBSD Security Advisory 2019-002
		 =================================

Topic:		Unprivileged kernel memory overwrite in mq_send(3)

Version:	NetBSD-current:		affected prior to April 16, 2019
		NetBSD 8.0:		affected
		NetBSD 7.2:		affected
		NetBSD 7.1.2:		affected
		NetBSD 7.0.2:		affected

Severity:	Local user may overwrite kernel memory


Fixed:		NetBSD-current:		April 16, 2019
		NetBSD-8 branch:	April 16, 2019
		NetBSD-7 branch:	April 16, 2019
		NetBSD-7-1 branch:	April 16, 2019
		NetBSD-7-0 branch:	April 16, 2019

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

Abstract
========

An unprivileged user can overwrite parts of kernel memory via an unprivileged
mq_send(3) system call.

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

Insufficient argument validation in the mq_send(3) system call could cause
a copyin(9) operation of too much data, overrunning the kernel target
memory.


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

Update the kernel to a fixed version and reboot.

To apply a fixed version from a releng build, fetch a fitting kern-GENERIC.tgz
from nyftp.netbsd.org and extract the fixed binaries:

cd /var/tmp
ftp https://nycdn.NetBSD.org/pub/NetBSD-daily/REL/latest/ARCH/binary/sets/kern-GENERIC.tgz
cd /
tar xzpf /var/tmp/kern-GENERIC.tgz

with the following replacements:
REL   = the release version you are using
ARCH  = your system's architecture


The following instructions describe how to upgrade your kernel by
updating your source tree and rebuilding and installing a new version.

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), and                  
  KERNCONF with the name of your kernel configuration file.    

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

	# cd src
	# cvs update -d -P sys/path/to/file.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/docs/guide/en/chap-kernel.html

Thanks To
=========

Andy Nguyen for discovering and reporting the issue.

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-SA2019-002.txt.asc

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


Copyright 2019, The NetBSD Foundation, Inc.  All Rights Reserved.
Redistribution permitted only in full, unmodified form.

$NetBSD: NetBSD-SA2019-002.txt.asc,v 1.1 2019/05/03 01:33:11 christos Exp $
- -----BEGIN PGP SIGNATURE-----

iQIcBAEBAgAGBQJcy5pIAAoJEAZJc6xMSnBuJdAP/i4i5l3HefvFCUIYdt9YsVCW
gxQZ6mS/NAgsFS1tHpSYfBqLiYgSAg/uAu1Yo3snni1zQzKhKsZ+1QPalb+oe4AS
X+Vw9BXRWcBXCUBHpJS3vPEeg1pMWbQOpBQ0YxC0YVKVo6InWgovCDvUFdQ8hZzv
PGbxU7spVNTUJ5+x8/QQw9rJzAZfTRniymLEuRrmFmmn4xPN6KKmi8zhkRTgWEHO
AQl3mDVupSUbBID7pLY3FK7dyzbyAcoKptMow42g54Tgl445MiBos7gpVsIzXeAh
9rKwOceGHrzFYf8dawc7bWquxzZ5qH9udDv9XiGoFRCQUAbyGHnrZ9qNYGKgIf0m
1diFrBsLMroSAWLfI/6b7pCbvgXo1NCvePwomYPk1NoIqyVqPZ4YSmGy85aA1e5R
LYSmPHCPEMPxP5YPQq1KsXoFNpCUiu1JXoC6CEh28sUijxStSqcx4q29ZweJKzYy
PjBNb6FB+h+jDW3z8OzMDo0sYKZKUMaQStLmzqhvBH++zmYEQsKyL6glxdI5jMXr
ibW6uBh4nfo6F6d5ao66Cil3dOu1WBSqCgMa5VgyEjpFlAXrvSXHCAcSZDjfNd/V
11LQJvO73MYXSqf01SJ+UEmZqk/fMa3egOEMfBQZc0BoTMBpOzBkGN+ZYVI2ayNO
I00zzgJvkKRcWt2Uyqs9
=id0y
- -----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

iQIVAwUBXMvQK2aOgq3Tt24GAQgN2RAAzs7ZztRDdA1V6kmkDOeb7YQMRQm5GrFr
0l6VBjMAKWZuxb2nSrUDW0rQ86o88m3rgKmP2ZpGacsP20jZRZcFS7afLRfKSLbq
e0+KNHXBaGCCcvv9dffZU2XesCBLCnbreSoyH5WUNOTj+rRTiDIQpbIPF8bxabn/
Cg5LfR0n+nQPrXddyTc3RRVL23Ne6rgAOtilppUq3W/irSrPQHb2tTb41TSLDlQH
bH/XXId9C876PR5J5FidN6vrOD06xFPW4TiJT8XgfuYldckmarrB+9GWyQrFTF0c
kesE1IeQI0xwqq7zgzL/YmfopcyBMUnQhGeQaDlNC5Z9coyq3gAozVjzhzMkGajI
YH18JwqDP/2V0pqw1VDDZE0cAb1C+k/HSGjGJTj9QT8W8HDKX6xwA0eLrv68BfyZ
2lMRj7quecV6XJQBeQk86KRngodaCRXhVaVd2jO3TfYEW6Kt+a1955XwZ7jiFRpw
qPpNABpDP+hptHRQxSCgIMM4bxaHv0dMNjInn0QLM6zKj8cYVces0hVobjeSBCDz
cNju/vqBXjm4L8bMFBlAyppJkyBnuBYWZpgKhiO+Qa6agQseY3rwp+tvjQlFml3O
RFdMtta6adEu7z/hc7vuchnlww1Sv28nxKcZuBn6laAp6hU4ZTenJHcHi91iB72j
N0886Ga93YE=
=++qV
-----END PGP SIGNATURE-----