From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/322 Path: news.gmane.org!not-for-mail From: Solar Designer Newsgroups: gmane.linux.lib.musl.general Subject: FreeSec DES-based crypt(3) Date: Mon, 2 May 2011 17:43:33 +0400 Message-ID: <20110502134333.GB18325@openwall.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1312595723 11591 80.91.229.12 (6 Aug 2011 01:55:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 6 Aug 2011 01:55:23 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: envelope-from@hidden Mon May 02 13:44:45 2011 Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Xref: news.gmane.org gmane.linux.lib.musl.general:322 Archived-At: Rich, all - musl uses a DES-based crypt(3) implementation called FreeSec - the same one that *BSD's use. Unfortunately, its handling of invalid salt strings (with characters other than from the defined base-64 alphabet) differs from UFC-crypt's (which is standard in glibc) to an extent far greater than desired (yes, some deviations from UFC-crypt are in fact desired, in my opinion). Also, this may have security implications (yes, *BSD's are sort of affected) where lots of different invalid salts are treated as just one. This may affect e.g. some web apps that use PHP's crypt() improperly (their fault, but still). Thus, I propose that you replace the code in musl with my revision of it, which has the above issues corrected: http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/glibc/ The files are crypt_freesec.c and crypt_freesec.h. These are also used in PHP 5.3.x, so they receive a lot of testing. Another issue is that somehow the speed of your FreeSec code in musl is extremely poor - it runs about 50 times slower than expected (e.g., than it does in glibc on Owl). This is as tested with "john --test --format=crypt" with JtR 1.7.7 on x86_64. I suggest that you run this test too, both before and after you replace the FreeSec code. Alexander