From owner-freebsd-announce Tue Sep 4 12:49:36 2001 Delivered-To: freebsd-announce@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 008E437B40B; Tue, 4 Sep 2001 12:49:21 -0700 (PDT) Received: (from kris@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f84JnKA36684; Tue, 4 Sep 2001 12:49:20 -0700 (PDT) (envelope-from security-advisories@FreeBSD.org) Date: Tue, 4 Sep 2001 12:49:20 -0700 (PDT) Message-Id: <200109041949.f84JnKA36684@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: kris set sender to security-advisories@FreeBSD.org using -f From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-01:59.rmuser Reply-To: security-advisories@FreeBSD.org Sender: owner-freebsd-announce@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org -----BEGIN PGP SIGNED MESSAGE----- ============================================================================= FreeBSD-SA-01:59 Security Advisory FreeBSD, Inc. Topic: rmuser contains a race condition exposing /etc/master.passwd Category: core Module: rmuser Announced: 2001-09-04 Credits: dynamo@harvard.net Affects: FreeBSD 4.2-RELEASE, 4.3-RELEASE FreeBSD 4.3-STABLE prior to the correction date. Corrected: 2001-07-28 12:10:15 UTC (4.3-STABLE) 2001-09-04 07:46:57 UTC (RELENG_4_3) FreeBSD only: Yes I. Background rmuser is a perl script used to completely remove users from a system. II. Problem Description When removing a user from the system with the rmuser utility, the /etc/master.passwd file and it's corresponding database /etc/spwd.db must be updated. The rmuser script was incorrectly doing this by creating a new master.passwd file with an unsafe umask and then using chmod to set its permissions to 0600. Between the time that the file was created and the time that its permissions were changed the file is world-readable. This is only a minor security vulnerability since the rmuser command is only used infrequently on most systems, and the attack is highly timing-dependent. All versions of FreeBSD prior to the correction date including FreeBSD 4.3 contain this problem. The base system that will ship with FreeBSD 4.4 does not contain this problem since it was corrected prior to the release. III. Impact For a brief amount of time while running rmuser, a world-readable copy of /etc/master.passwd is available. A local attacker who reads this file can extract password hashes from the copy of /etc/master.passwd. This information could be used by attackers to escalate their privileges, possibly yielding root privileges on the local system, by mounting an offline dictionary attack in order to guess the plaintext passwords of the accounts on the local system. IV. Workaround Use the pw(8) utility to remove users instead of rmuser. - "pw userdel " will only remove the user from /etc/passwd, /etc/master.passwd and /etc/group - "pw -r userdel " will also remove the user's home dirrectory V. Solution 1) Upgrade your vulnerable system to 4.3-STABLE or the RELENG_4_3 security branch, dated after the respective correction dates. 2) To patch your present system: download the relevant patch from the below location, and execute the following commands as root: # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-01:59/rmuser.patch # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-01:59/rmuser.patch.asc Verify the detached PGP signature using your PGP utility. This patch has been verified to apply to FreeBSD 4.2-RELEASE and 4.3-RELEASE. It may or may not apply to older, unsupported releases of FreeBSD. # cd /usr/src/usr.sbin/adduser # patch -p < /path/to/patch # make depend && make all install 3) FreeBSD 4.3-RELEASE systems: An experimental upgrade package is available for users who wish to provide testing and feedback on the binary upgrade process. This package may be installed on FreeBSD 4.3-RELEASE systems only, and is intended for use on systems for which source patching is not practical or convenient. If you use the upgrade package, feedback (positive or negative) to security-officer@FreeBSD.org is requested so we can improve the process for future advisories. During the installation procedure, backup copies are made of the files which are replaced by the package. These backup copies will be reinstalled if the package is removed, reverting the system to a pre-patched state. # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:59/security-patch-rmuser-01.59.tgz # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:59/security-patch-rmuser-01.59.tgz.asc Verify the detached PGP signature using your PGP utility. # pkg_add security-patch-rmuser-01.59.tgz VI. CVS Revisions The following $FreeBSD$ CVS revision contain the fixes for this vulnerability. The $FreeBSD$ revision of installed sources can be examined using the ident(1) command. These revision IDs are not updated by applying the patch referenced above. [FreeBSD 4.3-STABLE] Revision Path 1.8.2.5 src/usr.sbin/rmuser.perl [RELENG_4_3] Revision Path 1.8.2.2.2.1 src/usr.sbin/rmuser.perl -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iQCVAwUBO5SH1lUuHi5z0oilAQEWLAQAniPWZpgjNvhoT6ECltW4G9lKlsswDur9 WMKkX2KEvZ9pswx3rqkn1IC+kBTfgdwwhU/54dyx1HKb2XJH5QdGpW/H/niTox4z ImJjctZNvnEuB52si1+Ivx3avwgw57YjAsJgLcv+CYYW+iizX1zVFBjdce6PDQgI pb50qM0sJYA= =hxQ5 -----END PGP SIGNATURE----- This is the moderated mailing list freebsd-announce. The list contains announcements of new FreeBSD capabilities, important events and project milestones. See also the FreeBSD Web pages at http://www.freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-announce" in the body of the message From owner-freebsd-announce Thu Sep 6 14:18:35 2001 Delivered-To: freebsd-announce@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1CD2E37B408; Thu, 6 Sep 2001 14:18:21 -0700 (PDT) Received: (from kris@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f86LILD76097; Thu, 6 Sep 2001 14:18:21 -0700 (PDT) (envelope-from security-advisories@FreeBSD.org) Date: Thu, 6 Sep 2001 14:18:21 -0700 (PDT) Message-Id: <200109062118.f86LILD76097@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: kris set sender to security-advisories@FreeBSD.org using -f From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-01:57.sendmail [REVISED] Reply-To: security-advisories@FreeBSD.org Sender: owner-freebsd-announce@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org -----BEGIN PGP SIGNED MESSAGE----- ============================================================================= FreeBSD-SA-01:57 Security Advisory FreeBSD, Inc. Topic: sendmail contains local root vulnerability [REVISED] Category: core Module: sendmail Announced: 2001-08-27 Revised: 2001-09-06 Credits: Cade Cairnss Affects: FreeBSD 4-STABLE after August 27, 2000 and prior to the correction date, FreeBSD 4.1.1-RELEASE, 4.2-RELEASE, 4.3-RELEASE Corrected: 2001-08-21 01:36:37 UTC (FreeBSD 4.3-STABLE) 2001-08-22 05:34:11 UTC (RELENG_4_3) FreeBSD only: NO 0. Revision History v1.0 2001-08-27 Initial release v1.1 2001-08-30 Update package to remove setuid bit from saved file; add non-openssl package; correct typo in package instructions; note that $Id$ not updated in RELENG_4_3. v1.2 2001-09-06 No changes to advisory, but the sendmail-crypto upgrade package had incorrect permissions for the sendmail binary. Update this package. I. Background sendmail is a mail transfer agent. II. Problem Description Sendmail contains an input validation error which may lead to the execution of arbitrary code with elevated privileges by local users. Due to the improper use of signed integers in code responsible for the processing of debugging arguments, a local user may be able to supply the signed integer equivalent of a negative value supplied to sendmail's "trace vector". This may allow a local user to write data anywhere within a certain range of locations in process memory. Because the '-d' command-line switch is processed before the program drops its elevated privileges, the attacker may be able to cause arbitrary code to be executed with root privileges. III. Impact Local users may be able to execute arbitrary code with root privileges. IV. Workaround Do not allow untrusted users to execute the sendmail binary. V. Solution One of the following: 1) Upgrade your vulnerable FreeBSD system to 4.3-STABLE or the RELENG_4_3 security branch after the respective correction dates. 2) FreeBSD 4.x systems after August 27, 2000 and prior to the correction date: The following patch has been verified to apply to FreeBSD 4.1.1-RELEASE, 4.2-RELEASE, 4.3-RELEASE and 4-STABLE dated prior to the correction date. Download the patch and the detached PGP signature from the following locations, and verify the signature using your PGP utility. # fetch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:57/sendmail.patch # fetch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:57/sendmail.patch.asc Execute the following commands as root: # cd /usr/src # patch -p < /path/to/patch # cd /usr/src/lib/libsmutil # make depend && make all # cd /usr/src/usr.sbin/sendmail # make depend && make all install 3) FreeBSD 4.3-RELEASE systems: ** NOTE: The initial version of the upgrade package did not remove ** setuid root privileges from the saved copy of the sendmail binary. ** To correct this, deinstall the old package using the pkg_delete(1) ** command and install the corrected package as described below. An experimental upgrade package is available for users who wish to provide testing and feedback on the binary upgrade process. This package may be installed on FreeBSD 4.3-RELEASE systems only, and is intended for use on systems for which source patching is not practical or convenient. If you use the upgrade package, feedback (positive or negative) to security-officer@FreeBSD.org is requested so we can improve the process for future advisories. During the installation procedure, backup copies are made of the files which are replaced by the package. These backup copies will be reinstalled if the package is removed, reverting the system to a pre-patched state. Two versions of the package are available, depending on whether or not OpenSSL is installed. If the file /usr/lib/libcrypto.so exists on the local system, follow the directions in section 1a) below, otherwise follow the directions in section 1b). After adding the package, proceed with the instructions in section 2). 1a) If crypto is installed: # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:57/security-patch-sendmail-crypto-01.57.tgz # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:57/security-patch-sendmail-crypto-01.57.tgz.asc Verify the detached PGP signature using your PGP utility. # pkg_add security-patch-sendmail-crypto-01.57.tgz 1b) If crypto is not installed: # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:57/security-patch-sendmail-nocrypto-01.57.tgz # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:57/security-patch-sendmail-nocrypto-01.57.tgz.asc Verify the detached PGP signature using your PGP utility. # pkg_add security-patch-sendmail-nocrypto-01.57.tgz 2) Restart sendmail after applying the patch by executing the following commands as root: # killall sendmail # /usr/sbin/sendmail -bd -q30m The flags to sendmail may need to be adjusted as required for the local system configuration. VI. Correction details The following is the sendmail $Id$ revision number of the file that was corrected for the supported branches of FreeBSD. The $Id$ revision number of the installed source can be examined using the ident(1) command. Note that the $Id$ tag was not updated on the RELENG_4_3 branch because a newer vendor release of sendmail was not imported, instead only this vulnerability was patched. Revision Path 8.20.22.4 src/contrib/sendmail/src/trace.c VII. References -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iQCVAwUBO5fm9FUuHi5z0oilAQHcxQP/Skg7PHfrJfo/t4b4u7XHSjdHiLzl4aiG qKhEJjcNDFMNxSCfTZ19aP0KUtcgxN5tB8gTF7d2gG0HTAJ7NZ07DutTgMxdziMa 1R9n/NbRQ7Qu7EYv6jTLaBbgeovUp9kA2QY+/1DiPM1sS4TUwqvVnefXlpnJbQhj 6WOhcCaAaBU= =WnTC -----END PGP SIGNATURE----- This is the moderated mailing list freebsd-announce. The list contains announcements of new FreeBSD capabilities, important events and project milestones. See also the FreeBSD Web pages at http://www.freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-announce" in the body of the message From owner-freebsd-announce Thu Sep 6 14:35:43 2001 Delivered-To: freebsd-announce@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C23B037B409; Thu, 6 Sep 2001 14:35:32 -0700 (PDT) Received: (from kris@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f86LZWu77676; Thu, 6 Sep 2001 14:35:32 -0700 (PDT) (envelope-from security-advisories@FreeBSD.org) Date: Thu, 6 Sep 2001 14:35:32 -0700 (PDT) Message-Id: <200109062135.f86LZWu77676@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: kris set sender to security-advisories@FreeBSD.org using -f From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-01:59.rmuser [REVISED] Reply-To: security-advisories@FreeBSD.org Sender: owner-freebsd-announce@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org -----BEGIN PGP SIGNED MESSAGE----- ============================================================================= FreeBSD-SA-01:59 Security Advisory FreeBSD, Inc. Topic: rmuser contains a race condition exposing /etc/master.passwd [REVISED] Category: core Module: rmuser Announced: 2001-09-04 Revised: 2001-09-06 Credits: dynamo@harvard.net Affects: FreeBSD 4.2-RELEASE, 4.3-RELEASE FreeBSD 4.3-STABLE prior to the correction date. Corrected: 2001-08-01 20:26:37 UTC (4.3-STABLE) 2001-09-05 05:24:55 UTC (RELENG_4_3) FreeBSD only: Yes 0. Revision History v1.0 2001-09-04 Initial release v1.1 2001-09-06 Update patch. Update correction times. Update upgrade package as a result. I. Background rmuser is a perl script used to completely remove users from a system. II. Problem Description When removing a user from the system with the rmuser utility, the /etc/master.passwd file and it's corresponding database /etc/spwd.db must be updated. The rmuser script was incorrectly doing this by creating a new master.passwd file with an unsafe umask and then using chmod to set its permissions to 0600. Between the time that the file was created and the time that its permissions were changed the file is world-readable. This is only a minor security vulnerability since the rmuser command is only used infrequently on most systems, and the attack is highly timing-dependent. All versions of FreeBSD prior to the correction date including FreeBSD 4.3 contain this problem. The base system that will ship with FreeBSD 4.4 does not contain this problem since it was corrected prior to the release. III. Impact For a brief amount of time while running rmuser, a world-readable copy of /etc/master.passwd is available. A local attacker who reads this file can extract password hashes from the copy of /etc/master.passwd. This information could be used by attackers to escalate their privileges, possibly yielding root privileges on the local system, by mounting an offline dictionary attack in order to guess the plaintext passwords of the accounts on the local system. IV. Workaround Use the pw(8) utility to remove users instead of rmuser. - "pw userdel " will only remove the user from /etc/passwd, /etc/master.passwd and /etc/group - "pw -r userdel " will also remove the user's home dirrectory V. Solution 1) Upgrade your vulnerable system to 4.3-STABLE or the RELENG_4_3 security branch, dated after the respective correction dates. Note that the initial correction dates did not include complete fixes for the rmuser utility, and sources dated before the updated correction date given in this advisory will not work. 2) To patch your present system: download the relevant patch from the below location, and execute the following commands as root: # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-01:59/rmuser.patch.v1.1 # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-01:59/rmuser.patch.v1.1.asc Verify the detached PGP signature using your PGP utility. This patch has been verified to apply to FreeBSD 4.2-RELEASE and 4.3-RELEASE. It may or may not apply to older, unsupported releases of FreeBSD. # cd /usr/src/usr.sbin/adduser # patch -p < /path/to/patch # make depend && make all install 3) FreeBSD 4.3-RELEASE systems: An experimental upgrade package is available for users who wish to provide testing and feedback on the binary upgrade process. This package may be installed on FreeBSD 4.3-RELEASE systems only, and is intended for use on systems for which source patching is not practical or convenient. If you use the upgrade package, feedback (positive or negative) to security-officer@FreeBSD.org is requested so we can improve the process for future advisories. During the installation procedure, backup copies are made of the files which are replaced by the package. These backup copies will be reinstalled if the package is removed, reverting the system to a pre-patched state. # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:59/security-patch-rmuser-01.59.tgz # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:59/security-patch-rmuser-01.59.tgz.asc Verify the detached PGP signature using your PGP utility. # pkg_add security-patch-rmuser-01.59.tgz VI. CVS Revisions The following $FreeBSD$ CVS revision contain the fixes for this vulnerability. The $FreeBSD$ revision of installed sources can be examined using the ident(1) command. These revision IDs are not updated by applying the patch referenced above. [FreeBSD 4.3-STABLE] Revision Path 1.8.2.7 src/usr.sbin/rmuser.perl [RELENG_4_3] Revision Path 1.8.2.2.2.2 src/usr.sbin/rmuser.perl -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iQCVAwUBO5frolUuHi5z0oilAQH+nQP+PMDfqxyGdScn/nlR7Z1JCyK5HFgIhh73 OpUVGtJUVfWTyTe9mwrP2F0Ce+3bdeLfxj2hKQn7ST9Gl3YJg03ZTmvntYnOvok7 TMrXXQRuwTUvG/b+LcPK2oufcU7rqiPyYXzny0Ne+pvBraKcUdR0tBOYquMCeN0c MvytYjbZCao= =p5P7 -----END PGP SIGNATURE----- This is the moderated mailing list freebsd-announce. The list contains announcements of new FreeBSD capabilities, important events and project milestones. See also the FreeBSD Web pages at http://www.freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-announce" in the body of the message