Protect yourself against future threats.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =========================================================================== AUSCERT External Security Bulletin Redistribution ESB-2014.1473 Multiple vulnerabilities in the compatibility layers 29 August 2014 =========================================================================== AusCERT Security Bulletin Summary --------------------------------- Product: kernel Publisher: NetBSD Operating System: UNIX variants (UNIX, Linux, OSX) FreeBSD NetBSD Impact/Access: Denial of Service -- Existing Account Resolution: Patch/Upgrade Original Bulletin: http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2014-010.txt.asc Comment: This advisory references vulnerabilities in the NetBSD kernel that also affect distributions other than NetBSD. It is recommended that administrators running Linux/Unix/FreeBSD check for an updated version of the kernel for their system. - --------------------------BEGIN INCLUDED TEXT-------------------- - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NetBSD Security Advisory 2014-010 ================================= Topic: Multiple vulnerabilities in the compatibility layers Version: NetBSD-current: source prior to Tue, Apr 15th 2014 NetBSD 6.1 - 6.1.4: affected NetBSD 6.0 - 6.0.5: affected NetBSD 5.1 - 5.1.4: affected NetBSD 5.2 - 5.2.2: affected Severity: Local DoS Fixed: NetBSD-current: Tue, Apr 15th 2014 NetBSD-6-0 branch: Mon, Apr 21th 2014 NetBSD-6-1 branch: Mon, Apr 21th 2014 NetBSD-6 branch: Mon, Apr 21th 2014 NetBSD-5-2 branch: Wed, May 14th 2014 NetBSD-5-1 branch: Wed, May 14th 2014 NetBSD-5 branch: Wed, May 14th 2014 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 ======== Four compatibility layers are affected by several vulnerabilities: 1) FreeBSD compatibility: NULL pointer dereference 2) NetBSD 32-bit compatibility: Zero-sized memory allocation 3) Digital UNIX (formerly OSF/1) compatibility: Zero-sized memory allocation 4) Linux and Linux 32-bit compatibility: User-controllable kernel memory array index. Each of them allows a local user to crash the system. Technical Details ================= For more clarity the four layers affected will be referred to as COMPAT_xx, where xx is the emulated system. 1) Due to a programming mistake in COMPAT_FREEBSD, a simple call to the sched_getparam system call would cause the kernel to dereference a NULL pointer, and thus to crash. 2) Due to a missing input validation check in COMPAT_NETBSD32's kevent system call, a user could cause the kernel to perform a zero-sized memory allocation, resulting in a crash. 3) Due to a missing input validation check in COMPAT_OSF1's getdirentries system call, a user could cause the kernel to perform a zero-sized memory allocation, resulting in a crash. 4) Due to missing input validation checks in the COMPAT_LINUX and COMPAT_LINUX32 ELF binary loader, a specially-crafted binary could control a kernel memory array index - address from which data is read. Attempting to read at an unmapped memory page will cause the kernel to crash. Solutions and Workarounds ========================= - - - Disable the compability modules - - --------------------------------- You can achieve this with the modunload(8) tool. Please read the appropriate manual page. For example, you can disable the Linux modules by moving the kernel object files out of the way. These are located in: /stand/${MACHINE_ARCH}/${KERNEL_VERSION}/modules/compat_${NAME}/compat_${NAME}.kmod And running the following command to unload them: # modunload compat_${NAME} The modules have dependencies, so you need to unload them in the proper order. You can also disable these modules by rebuilding your kernel without the COMPAT_${NAME} options. Note however that it is to be considered as a temporary workaround, and you are strongly advised to fix your system from source. - - - Fix from source - - ----------------- 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), KERNCONF with the name of your kernel configuration file and VERSION with the file version below File versions containing the fixes: FILE HEAD netbsd-6 netbsd-6-1 netbsd-6-0 netbsd-5 netbsd-5-2 netbsd-5-1 - - ---- ---- -------- ---------- ---------- -------- ---------- ---------- src/sys/compat/freebsd/freebsd_sched.c 1.20 1.19.40.1 1.19.56.1 1.19.46.1 1.19.10.1 1.19.48.1 1.19.24.1 src/sys/compat/netbsd32/netbsd32_compat_50.c 1.24 1.20.6.1 1.20.14.1 1.20.12.1 XXXXXXXX XXXXXXXXXX XXXXXXXXXX src/sys/compat/netbsd32/netbsd32_event.c 1.11 1.9.10.2 1.9.24.1 1.9.16.1 XXXXXXXX XXXXXXXXXX XXXXXXXXXX src/sys/compat/osf1/osf1_file.c 1.42 % % % XXXXXXXX XXXXXXXXXX XXXXXXXXXX src/sys/compat/linux/common/linux_exec_elf32.c 1.91 1.86.2.1 1.86.16.1 1.86.8.1 1.81.10.1 1.81.20.1 1.81.16.1 To update from CVS, re-build, and re-install the kernel: # cd src # cvs update -d -P -r VERSION sys/compat/freebsd/freebsd_sched.c # cvs update -d -P -r VERSION sys/compat/netbsd32/netbsd32_compat_50.c # cvs update -d -P -r VERSION sys/compat/netbsd32/netbsd32_event.c # cvs update -d -P -r VERSION sys/compat/osf1/osf1_file.c # cvs update -d -P -r VERSION sys/compat/linux/common/linux_exec_elf32.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 Maxime Villard, Christos Zoulas, Martin Husemann, Chuck Silvers, Enami Tsugutomo and Matt Thomas for finding, fixing and helping in fixing these issues. Revision History ================ 2014-08-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-SA2014-010.txt.asc Information about NetBSD and NetBSD security can be found at http://www.NetBSD.org/ and http://www.NetBSD.org/Security/ . Copyright 2014, The NetBSD Foundation, Inc. All Rights Reserved. Redistribution permitted only in full, unmodified form. $NetBSD: NetBSD-SA2014-010.txt,v 1.1 2014/08/27 00:26:00 tonnerre Exp $ - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJT/SWiAAoJEAZJc6xMSnBu+64P/2+y8zFdH5jD1V4t+i3UgbPH a230WnZSQeyixmzclYte4n1s2ENQcXUc0hb11CkLA7DcCej/wS6JiNWqoIU6Qfrl wAoUZkoOu/8Ike1HbvcxC3pRvcS8+frsou+hqOLp+9NyAto7vimh+twiB4YO8xoW gmdV2fTPvIQvh/4j1+FD4C//hjics2vbBXc6HiTXFD2pyAajMwxDKSeTU0mUHozO zIqdjyLb18Aq8vxsTufJ3euzJjX3RUA0r3xkurCK8Mv2BWjbkYC7zZiZ1EocpvKY 78Ru3qlS+s/66FVX6Vcu+xmXLPQdfiOFcGJt29XQ386MmKFNxgeHqQQ1rU83pGJE Jx4tLJUXQWlK5IhaE1n1wyN7c+lzBW1MYrs2CzoH3PRKMRerrVSmSJDSaKp4sxZz oBD2jT5zyaGx7WjH/3HJ9LAZbdT7VL10E8ffFQV+A9oTW5iNnFKY/nHn86DCH6JR HwcG9GQo5d7kNFYyzzXp1PMzI1PDFI/MM6ViSdNfIGEikwP9Gw7Ouc/ZnJ4E/yyb SiBNg5ImJSLDY8h2+ga2WZ3i3jZaGMl7prF1rzkj0vLQVLPs3DcTIRo3DD10sWOB QGXS5pVtenfnb0JR589P4BQNNHri0GExDa0vvfBDUB/H4NYVLsxAItCITRhMkMQm HKiBP6/iOMGbx6aXhMvp =QuV7 - -----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: http://www.auscert.org.au/render.html?cid=1980 =========================================================================== 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 iQIVAwUBU//b+BLndAQH1ShLAQJ2qg//XTRM4wWS6msre4qC7Byc1mG31yqPe7f4 tFWPbBl485iFY488QsMk7RhTMOst0/z+zGwIuolXXCto5e9cRbl5pU6V1Z2sP5rh TV5mW1B3eaUqvlyjwuiUbaS+/OBz4dJrTfdOyUSY9Yr7NcCxqClv+muA6UtmMc0r OP0FrOxmoM42e+lEps3nbjXm5HClgfTr8n90PEq1E+UxF0ktlBbELmqFIualJfDQ nRW7LTvBvBnt6PXl7o3DTdifSkt8D1m375vB1XN+5PW++SlSL32oFAhSVFJ5PkFd cIk4O9P0u239Ok4bBkmXR1MmFojg5nWRYNbK4Sv3QZCTerwpiR62KHFYEluNmMMm 4HheI9Awi3UWLkTteeOpaZedUVCRSfCxyBkkV4Px7QYj3ptRqEXKYs6s4GplG6Ie diz8NJR/aNAIzfykFATirvz+7/z4uTAnPRMaOmDCDxKrvpH6INBXEwNQc0AcbIv5 MVge/8NVsGuITt34gx7Btu+SlSS7f+1rlqI76RRAXnGlR8VCCdbl9uQBCKIpMObY IGL7f9g5y3xS+WdsqfGDE7FKZKF5WL2tMxYQIbf9rvXiTRwvsMT1eEgChRBelzXI JqYuche0UUSPlKxTOlp976RlpHwSe4Gm+uoxhe2cCxsJIodteZx4ioOS7SsFqjlg B8vpjnVM1Do= =sTk+ -----END PGP SIGNATURE-----