-----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,v 1.1 2019/05/03 01:32:55 christos Exp $ -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJczJ0jAAoJEAZJc6xMSnBu8ioP/itO1VY/pTact2zGV7z0EyFS JLoVQNpLnYFxIw7rp5fyv55j9AkrBvacSbqeTTIBofApmHsJ/QfYyar579BIXSTl cuMUzES7ClsAjB4FqmYQdgJnGCv1NYVzqJ1EbS3BJqv7KNhtvYyn0MR9nNDgP0Kv 1r4omb5upl+qDn6dD8YjhxdqFGyWZc8weU3kNnBo6Mh4GkWDX40zZ9fCZ1rLzKs5 iUqLefwDslmf+sOXvreZN77o+W4GvA3pvRaXT9lzsdoFKaqHNnmwtZ38SSWE+YyU 3SRHklstUR5vsh6rtzZw+1Tlr3kO+pEKqSKIDly1F5fcye3jW/tTqjzwzOxf03Mk LxaVvtXuUUHSqYV555rGd4hMnT1OUkqoYrlHTjQY/tngoUyUslctYQ1LPidX5Yst Z9v+c6wI+Zx4GwN4eZIOhmvexFdE5C2DsOxIzF+G5nq3CurO72apxUZANxx8BWFL ACeqoSu1AGoy4xaB2gDBLiyQFKQ5+oAgwEfvI7EnLuHWjvhoOSVWQ/Rekc0Imnt6 4AJAVgUrR/xse27DehttrT5KbvRzk653pQ7CQQvqdWfS44p5YeMl7ceOyJ1xOSbF nJ7kDf6bfLAW+lWz+FFYRCDSbM4QRMlxMA3ISUlVTR68Pxkzri3thR5u8ZJt0Ey2 oE4Z9cD8+KWEh8z8AOTL =KS6t -----END PGP SIGNATURE-----