pgsql: Apply upstream fix for blowfish signed-character bug (CVE-2011-2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Apply upstream fix for blowfish signed-character bug (CVE-2011-2
Date: 2011-06-21 18:43:08
Message-ID: E1QZ5um-0001tI-0M@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Apply upstream fix for blowfish signed-character bug (CVE-2011-2483).

A password containing a character with the high bit set was misprocessed
on machines where char is signed (which is most). This could cause the
preceding one to three characters to fail to affect the hashed result,
thus weakening the password. The result was also unportable, and failed
to match some other blowfish implementations such as OpenBSD's.

Since the fix changes the output for such passwords, upstream chose
to provide a compatibility hack: password salts beginning with $2x$
(instead of the usual $2a$ for blowfish) are intentionally processed
"wrong" to give the same hash as before. Stored password hashes can
thus be modified if necessary to still match, though it'd be better
to change any affected passwords.

In passing, sync a couple other upstream changes that marginally improve
performance and/or tighten error checking.

Back-patch to all supported branches. Since this issue is already
public, no reason not to commit the fix ASAP.

Branch
------
REL8_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/457c2d9158d35240ec54ea2052d89ff4f8fe19db

Modified Files
--------------
contrib/pgcrypto/crypt-blowfish.c | 26 ++++++++++++++++----------
contrib/pgcrypto/px-crypt.c | 1 +
2 files changed, 17 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2011-06-21 21:48:58 pgsql: Message style and spelling improvements
Previous Message Tom Lane 2011-06-21 18:43:07 pgsql: Apply upstream fix for blowfish signed-character bug (CVE-2011-2