[NetBSD] Schwachstelle in NetBSD OpenPAM - NetBSD-SA2009-004

—–BEGIN PGP SIGNED MESSAGE—–
Hash: SHA1

Liebe Kolleginnen und Kollegen,

soeben erreichte uns nachfolgende Warnung des NetBSD Security
Officers. Wir geben diese Informationen unveraendert an Sie weiter.

Zugriff auf den root Account, z.B. via su, ist unter BSD Systemen nur
Mitgliedern der Gruppe wheel gestattet.

NetBSD pam_unix ueberprueft wheel Gruppenzugehoerigkeit nicht

Das NetBSD pam_unix Modul ueberprueft nicht, ob die Aenderung des root
Passworts von einem Mitglied der Gruppe wheel vorgenommen wird. Lokale
Angreifer mit Kenntnis des root Passworts koennen dieses dadurch
aendern.

Betroffen sind die folgenden Software Pakete und Plattformen:

pam_unix

Folgende NetBSD Versionen vor dem angegebenen Erscheinungsdatum
NetBSD-current: June 14, 2009
NetBSD-5-0 branch: June 18, 2009
NetBSD-5 branch: June 18, 2009
NetBSD-4-0 branch: June 18, 2009
NetBSD-4 branch: June 18, 2009

Bitte beachten Sie, das auch aeltere NetBSD Versionen betroffen sind,
diese aber nicht mehr unterstuetzt werden.

Vom Hersteller werden ueberarbeitete Pakete zur Verfuegung gestellt.

Hersteller Advisory:
ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2009-004.txt.asc

(c) der deutschen Zusammenfassung bei DFN-CERT Services GmbH; die
Verbreitung, auch auszugsweise, ist nur unter Hinweis auf den Urheber,
DFN-CERT Services GmbH, und nur zu nicht kommerziellen Zwecken
gestattet.

Mit freundlichen Gruessen,
Klaus Moeller, DFN-CERT

– —
Dipl. Inform. Klaus Moeller (Incident Response Team)
Phone: +49 40 808077-555, Fax: +49 40 808077-556

DFN-CERT Services GmbH, https://www.dfn-cert.de, Phone +49 40 808077-555
Sitz / Register: Hamburg, AG Hamburg, HRB 88805, Ust-IdNr.: DE 232129737
Sachsenstrase 5, 20097 Hamburg/Germany, CEO: Dr. Klaus-Peter Kossakowski

– —–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 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 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—–
—–BEGIN PGP SIGNATURE—–
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFKQgLzk0kIxZMiiQ8RAtHCAJ9vrkY7ThlPDX62oudDvpQ72t7L/wCgykOz
SzikSYcRb+Y7Jh4Rawt5odk=
=q3a9
—–END PGP SIGNATURE—–

Nach oben