Protect yourself against future threats.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =========================================================================== AUSCERT External Security Bulletin Redistribution ESB-2009.0601 -- [NetBSD] NetBSD OpenPAM passwd(1): Root Compromise 21 July 2009 =========================================================================== AusCERT Security Bulletin Summary --------------------------------- Product: NetBSD OpenPAM passwd(1) Publisher: NetBSD Operating System: NetBSD Impact: Root Compromise Access: Existing Account CVE Names: CVE-2009-2482 Original Bulletin: ftp://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2009-004.txt.asc Revision History: July 21 2009: Added CVE reference June 24 2009: Initial Release - --------------------------BEGIN INCLUDED TEXT-------------------- - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NetBSD Security Advisory 2009-004 ================================= Topic: NetBSD OpenPAM passwd(1) changing weakness Version: NetBSD-current: affected before June 14, 2009 NetBSD 5.0: affected NetBSD 4.0.1: affected NetBSD 4.0: affected Severity: Change root password as normal user Fixed: NetBSD-current: June 14, 2009 NetBSD-5-0 branch: June 18, 2009 (5.0.1 will include the fix) NetBSD-5 branch: June 18, 2009 (5.1 will include the fix) NetBSD-4-0 branch: June 18, 2009 (4.0.2 will include the fix) NetBSD-4 branch: June 18, 2009 (4.1 will include the fix) Please note that NetBSD releases prior to 4.0 are no longer supported. It is recommended that all users upgrade to a supported release. Abstract ======== A verification weakness in the pam_unix module allows an authenticated attacker with knowledge of the current root password to reset it. Technical Details ================= The pam_unix authentication module provided by NetBSD does not verify the user invoking a password change properly. This allows an authenticated, unprivileged user to change the root password, given the old root password. Authentication as root is typically limited to members of a special group called "wheel" in order to limit the impact of a leaked root password. For this reason, the ability of changing the root password is traditionally limited to users who have already authenticated as root. Please note that this only affects systems using normal UNIX password authentication. Solutions and Workarounds ========================= In order to verify if you are affected by the problem, look for a line in /etc/pam.d/system stating password required pam_unix.so no_warn try_first_pass If such a line exists, invoke the command passwd root as a regular user. If the command issues the error "Unable to change auth token: permission denied", the system is not affected. A temporary workaround is to add the line password prerequisite pam_group.so no_warn group=wheel fail_safe before the pam_unix line to /etc/pam.d/system. This allows only members of the wheel group to change passwords until the issue can be addressed. Note however that this can increase the time user accounts are compromised in case of a security incident. For all NetBSD versions, you need to obtain the fixed NetBSD sources and rebuild and install the new PAM libraries. The fixed source may be obtained from the NetBSD CVS repository. The following instructions briefly summarize how to upgrade your PAM libraries by updating your source tree and rebuilding and installing a new version of them. * NetBSD-current: Systems running NetBSD-current dated from before 2009-06-15 should be upgraded to NetBSD-current dated 2009-06-16 or later. The following directories need to be updated from the netbsd-current CVS branch (aka HEAD): lib/libpam/modules/pam_unix To update from CVS, re-build, and re-install pam_unix: # cd src # cvs update -d -P lib/libpam/modules/pam_unix # cd lib/libpam/modules/pam_unix # make USETOOLS=no cleandir dependall # make USETOOLS=no install * NetBSD 5.*: Systems running NetBSD 5.* sources dated from before 2009-05-17 should be upgraded from NetBSD 5.* sources dated 2009-05-18 or later. The following directories need to be updated from the netbsd-5 or netbsd-5-0 CVS branch: lib/libpam/modules/pam_unix To update from CVS, re-build, and re-install pam_unix: # cd src # cvs update -d -P -r <branch_name> lib/libpam/modules/pam_unix # cd lib/libpam/modules/pam_unix # make USETOOLS=no cleandir dependall # make USETOOLS=no install * NetBSD 4.*: Systems running NetBSD 4.* sources dated from before 2009-05-17 should be upgraded from NetBSD 4.* sources dated 2009-05-18 or later. The following directories need to be updated from the netbsd-4 or netbsd-4-0 CVS branch: lib/libpam/modules/pam_unix To update from CVS, re-build, and re-install pam_unix: # cd src # cvs update -d -P -r <branch_name> lib/libpam/modules/pam_unix # cd lib/libpam/modules/pam_unix # make USETOOLS=no cleandir dependall # make USETOOLS=no install Thanks To ========= Thomas Getzke for discovering the vulnerability, Hubert Feyrer for reporting the vulnerability and testing the patches, and Tonnerre Lombard for providing the fix. Revision History ================ 2009-06-22 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 ftp://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2009-004.txt.asc Information about NetBSD and NetBSD security can be found at http://www.NetBSD.org/ and http://www.NetBSD.org/Security/. Copyright 2009, The NetBSD Foundation, Inc. All Rights Reserved. Redistribution permitted only in full, unmodified form. $NetBSD: NetBSD-SA2009-004.txt,v 1.1 2009/06/22 19:31:01 tonnerre Exp $ - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (NetBSD) iQCVAwUBSj/8Sj5Ru2/4N2IFAQJr7AQAmNZG2k3jYrm6OMq2zZLYGv2VIff3ua77 m/1gqntBFOh4djm/eP8AQS9Bqp7qR/f5HgDzRdJ7ib4U+geQdmV2Zco1kxMZ2KW/ nVsjw2b+SOr4e36x33k2NNV5Odl2TSgGzXCGDbKkTv67vg46KPfP/zfJgjhA17kG cFf7Tt4z/Yg= =bZF9 - -----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 If you believe that your computer system has been compromised or attacked in any way, we encourage you to let us know by completing the secure National IT Incident Reporting Form at: http://www.auscert.org.au/render.html?it=3192 =========================================================================== 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 iD8DBQFKZRduNVH5XJJInbgRAidIAJ0WZOzsoF24dY/EGBvma9Owi6Uw3gCeLtMU v0+z3Z7fwE8o/u3gOMhq7ro= =nZUY -----END PGP SIGNATURE-----