From owner-freebsd-security@FreeBSD.ORG Wed May 30 12:47:51 2012 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA1551065715; Wed, 30 May 2012 12:47:51 +0000 (UTC) (envelope-from security-advisories@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C2AE38FC17; Wed, 30 May 2012 12:47:51 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4UClpW9007632; Wed, 30 May 2012 12:47:51 GMT (envelope-from security-advisories@freebsd.org) Received: (from bz@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4UClp1q007630; Wed, 30 May 2012 12:47:51 GMT (envelope-from security-advisories@freebsd.org) Date: Wed, 30 May 2012 12:47:51 GMT Message-Id: <201205301247.q4UClp1q007630@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: bz set sender to security-advisories@freebsd.org using -f From: FreeBSD Security Advisories To: FreeBSD Security Advisories Precedence: bulk Cc: Subject: FreeBSD Security Advisory FreeBSD-SA-12:02.crypt X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.5 Reply-To: freebsd-security@freebsd.org List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2012 12:47:51 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ============================================================================= FreeBSD-SA-12:02.crypt Security Advisory The FreeBSD Project Topic: Incorrect crypt() hashing Category: core Module: libcrypt Announced: 2012-05-30 Credits: Rubin Xu, Joseph Bonneau, Donting Yu Affects: All supported versions of FreeBSD. Corrected: 2012-05-30 12:01:28 UTC (RELENG_7, 7.4-STABLE) 2012-05-30 12:01:28 UTC (RELENG_7_4, 7.4-RELEASE-p8) 2012-05-30 12:01:28 UTC (RELENG_8, 8.3-STABLE) 2012-05-30 12:01:28 UTC (RELENG_8_3, 8.3-RELEASE-p2) 2012-05-30 12:01:28 UTC (RELENG_8_2, 8.2-RELEASE-p8) 2012-05-30 12:01:28 UTC (RELENG_8_1, 8.1-RELEASE-p10) 2012-05-30 12:01:28 UTC (RELENG_9, 9.0-STABLE) 2012-05-30 12:01:28 UTC (RELENG_9_0, 9.0-RELEASE-p2) CVE Name: CVE-2012-2143 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background The crypt(3) function performs password hashing with additional code added to deter key search attempts. II. Problem Description There is a programming error in the DES implementation used in crypt() when handling input which contains characters that can not be represented with 7-bit ASCII. III. Impact When the input contains characters with only the most significant bit set (0x80), that character and all characters after it will be ignored. IV. Workaround No workaround is available, but systems not using crypt(), or which only use it to handle 7-bit ASCII are not vulnerable. Note that, because DES does not have the computational complexity to defeat brute force search on modern computers, it is not recommended for new applications. V. Solution Perform one of the following: 1) Upgrade your vulnerable system to 7-STABLE, 8-STABLE, or 9-STABLE, or to the RELENG_7_4, RELENG_8_3, RELENG_8_2, RELENG_8_1, or RELENG_9_0 security branch dated after the correction date. 2) To update your vulnerable system via a source code patch: The following patches have been verified to apply to FreeBSD 7.4, 8.3, 8.2, 8.1 and 9.0 systems. a) Download the relevant patch from the location below, and verify the detached PGP signature using your PGP utility. # fetch http://security.FreeBSD.org/patches/SA-12:02/crypt.patch # fetch http://security.FreeBSD.org/patches/SA-12:02/crypt.patch.asc # cd /usr/src # patch < /path/to/patch # cd /usr/src/lib/libcrypt # make obj && make depend && make && make install NOTE: On the amd64 platform, the above procedure will not update the lib32 (i386 compatibility) libraries. On amd64 systems where the i386 compatibility libraries are used, the operating system should instead be recompiled as described in 3) To update your vulnerable system via a binary patch: Systems running 7.4-RELEASE, 8.3-RELEASE, 8.2-RELEASE, 8.1-RELEASE, or 9.0-RELEASE on the i386 or amd64 platforms can be updated via the freebsd-update(8) utility: # freebsd-update fetch # freebsd-update install VI. Correction details The following list contains the revision numbers of each file that was corrected in FreeBSD. CVS: Branch Revision Path - ------------------------------------------------------------------------- RELENG_7 src/secure/lib/libcrypt/crypt-des.c 1.16.24.1 RELENG_7_4 src/UPDATING 1.507.2.36.2.10 src/sys/conf/newvers.sh 1.72.2.18.2.13 src/secure/lib/libcrypt/crypt-des.c 1.16.40.2 RELENG_8 src/secure/lib/libcrypt/crypt-des.c 1.16.36.2 RELENG_8_3 src/UPDATING 1.632.2.26.2.4 src/sys/conf/newvers.sh 1.83.2.15.2.6 src/secure/lib/libcrypt/crypt-des.c 1.16.36.1.8.2 RELENG_8_2 src/UPDATING 1.632.2.19.2.10 src/sys/conf/newvers.sh 1.83.2.12.2.13 src/secure/lib/libcrypt/crypt-des.c 1.16.36.1.6.2 RELENG_8_1 src/UPDATING 1.632.2.14.2.13 src/sys/conf/newvers.sh 1.83.2.10.2.14 src/secure/lib/libcrypt/crypt-des.c 1.16.36.1.4.2 RELENG_9 src/secure/lib/libcrypt/crypt-des.c 1.16.42.2 RELENG_9_0 src/UPDATING 1.702.2.4.2.4 src/sys/conf/newvers.sh 1.95.2.4.2.6 src/secure/lib/libcrypt/crypt-des.c 1.16.42.1.2.2 - ------------------------------------------------------------------------- Subversion: Branch/path Revision - ------------------------------------------------------------------------- stable/7/ r236304 releng/7.4/ r236304 stable/8/ r236304 releng/8.3/ r236304 releng/8.2/ r236304 releng/8.1/ r236304 stable/9/ r236304 releng/9.0/ r236304 - ------------------------------------------------------------------------- VII. References http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2143 The latest revision of this advisory is available at http://security.FreeBSD.org/advisories/FreeBSD-SA-12:02.crypt.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/GEsoACgkQFdaIBMps37JSYQCfZGZceQY4D53qgR9JbI79ZNht /GIAnjnhxlCnF27cWOhqxkkTWM6f45IM =7CVu -----END PGP SIGNATURE-----