Protect yourself against future threats.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =========================================================================== AUSCERT External Security Bulletin Redistribution ESB-2014.1543 Multiple vulnerabilities in the execve system call 10 September 2014 =========================================================================== AusCERT Security Bulletin Summary --------------------------------- Product: kernel Publisher: NetBSD Operating System: NetBSD Impact/Access: Denial of Service -- Existing Account Resolution: Patch/Upgrade Original Bulletin: http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-009.txt.asc - --------------------------BEGIN INCLUDED TEXT-------------------- - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NetBSD Security Advisory 2014-009 ================================= Topic: Multiple vulnerabilities in the execve system call Version: NetBSD-current: source prior to Fri, Feb 14th 2014 NetBSD 6.1 - 6.1.4: affected NetBSD 6.0 - 6.0.4: affected NetBSD 6.0.5: not affected NetBSD 5.1 - 5.1.4: not affected NetBSD 5.2 - 5.2.2: not affected Severity: Local DoS Fixed: NetBSD-current: Fri, Feb 14th 2014 NetBSD-6-0 branch: Fri, Feb 14th 2014 NetBSD-6-1 branch: Fri, Feb 14th 2014 NetBSD-6 branch: Fri, Feb 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 ======== The execve system call is affected by two vulnerabilities: 1) A memory leak in the kernel could cause a local (un)privileged user to use up kernel memory via a bogus ELF binary, and thus to freeze - or eventually panic - the system. 2) A bug in the kernel could lead to a use-after-free condition when loading a binary or a script, which would allow a local (un)privileged user to crash the system. Technical Details ================= 1) When trying to execute an ELF binary, the kernel looks up the corresponding "interpreter" (in case of native dynamic ELF binaries: the dynamic linker ld.elf_so). If this interpreter cannot be accessed appropriately, or if it is bogus, a structure allocated to hold special information on this interpreter was not freed. If a standard toolchain is installed, a local user can easily create such broken binaries by passing the -dynamic-linker switch to the linker. 2) When executing a binary via execve(), the kernel computes the new user stack size, and returns an error if this size exceeds the maximum architecture-defined stack size or the maximum stack size allowed by the calling process through rlimit. However, the variable in charge of hold- ing the error code returned was not properly initialised, causing the kernel to keep setting up the new process environment and use data that was already freed. Both the new stack size and the rlimit stack size are approximately user-controllable, which makes it easy to trigger from a local user. 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 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 ---- ---- -------- ---------- ---------- sys/kern/exec_elf.c 1.55 1.37.2.2 1.37.2.1.6.1 1.37.2.1.4.1 sys/kern/kern_exec.c 1.403 1.339.2.9 1.339.2.6.2.2 1.339.2.5.4.3 To update from CVS, re-build, and re-install the kernel: # cd src # cvs update -d -P -r VERSION sys/kern/exec_elf.c # cvs update -d -P -r VERSION sys/kern/kern_exec.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, who found the issues and provided fixes. Revision History ================ 2014-08-27 Initial release 2014-09-08 Updated affected versions 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-009.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-009.txt,v 1.4 2014/09/02 14:26:27 spz Exp $ - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUDhAXAAoJEAZJc6xMSnBuD/kP/RJjOcVNjN9wNSDWZCz5sZ63 WxzysstN2R9OCheAYJeNOYrgQYx2f26mR1pJJQ1nR254PHnqultYMptYbF/dh9SQ SFg+PemHj6Qnjp9BZ9PuXNvU4g16qfaYhgWfUE3u+Iz/2MsNtJC3pcMfmol/dtnG vafgb5zngFb6Ea03jbdsTPRFSAloPDVkxtMQ+Ib+vkP8NLHGQZsSnrEdQv3CLl0Y 1j5W45KBEIAbN+1BEkj1ZQv6BIWDVHA0knt0sHIjAqkPr+A1CZ5bfFncr6idVDRY e/zVCEJMfHSWWQEmmz5Wz0l2LLLJbuHd6bcJCZsLmjgUNYRG+mxNhPVYq8LwPHJz 34BBD+qAoZLmhtRQL+WiK9uM8N2f0AV6zkKzSxwKiQQG0MYP95lQSs7FxqysvHXb zlqY6S5ZfXfn6pkU5MTnth9ofD3ZJXdZ4FXnoub9WGZSmmhGH4WX6UXbfQotavGI bq8RbJlhT15prfw++IWFQOWdmnYZUjJbfwsMKXkd0MDEvkCqmlMVAtyMfiukauAE 8r3yXLEfURrDgpnWwmzYmpIRuhwaQS4Yx7Beg8Sn1B7mVYFPUS47mdE75fwTztiW 1e1wPUOngAwDn+rBqfCtkYeRmerxvmneBaxORbT0y/kMWoSnnaM0lxav+v6Y0N5T kdl9NciWWJx4uXA6QlQn =YZug - -----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 iQIVAwUBVA+mxRLndAQH1ShLAQJAkA/+OBt7Bin7zcUeHx5Bv10i40zAbBov9mGj MNXoZLvx4zJ7ab9/aqgzDAsPB5gU7Lch/xJ3xNtOtGB6rRyuVcgFGaY428oJvJty 5ctYJW0E6eX/uWDHz2E2iuz8za+BnuUNVBkVuXsOktM3Z5+9MNFkixBzLApOOdpi /3XEYmKtRfY7/soSaRLMrWharvBwWF3j8NtgpopuPqLW/esjClFhuqEtjKEh+zHQ 35APtQX6l4bA3CDFiT5x82Hg5bLguCcV2W1acj8W8N0+tP9MFO16A5xoE1Slj/IA 0rAGQpJsHhdOFuyk7NzKB31BV5F+zSF1d/7hhALB4npRIUNkZAOSuMo3Ouup2pmD o3dsumaDD1rjZUE+DiBWCL2S+EnX+4/FSeQtAiY2IWkY67aFdNaa7pBlXnVS/T1U BxdOqoMPdeLDW+fzo9VB+CquOf1ByWG7oXrNPXSLNVzpKo9At+YTDHFUYCNiLjus MnenKmyGidR8Fl3QwXa5JX+xgNj2J6no2rg2bKx//0nExOiIxwzM7/mk0znn3DkR ZZuArGneg17hFvmhPWjOwBwelJIIYQSGnFBgNOC/jHKw6LS27Md7Bh5/OUz/CPj/ 4SewxEboGSwN9cTRxYSiOX7XfgW/ply4w+sj/XwJ+svpmDsaSRS5qkfaky6sFX3A SFeLvmh+E30= =AEPV -----END PGP SIGNATURE-----