#51059 [Opn->Asn]: crypt() segfaults on certain salts

From: Date: Tue, 16 Feb 2010 18:17:48 +0000
Subject: #51059 [Opn->Asn]: crypt() segfaults on certain salts
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-147709@lists.php.net to get a copy of this message
 ID:               51059
 Updated by:       pajoye@php.net
 Reported By:      joey@php.net
-Status:           Open
+Status:           Assigned
 Bug Type:         *Encryption and hash functions
 Operating System: Linux, Mac OSX
 PHP Version:      5.3.2RC2
-Assigned To:      
+Assigned To:      pajoye


Previous Comments:
------------------------------------------------------------------------

[2010-02-16 17:50:44] joey@php.net

Description:
------------
Prior to 5.3, crypt() would safely handle certain invalid salts. With
the switch to the new DES-based crypt() provider in 5.3, it segfaults.
In discussing this with Pierre, he indicated the problem was in
do_des().

Reproduce code:
---------------
<?php
var_dump(crypt('a', '_'));

Expected result:
----------------
string(13) "_$MoLFnWnJ4yk"


Actual result:
--------------
Segmentation fault


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=51059&edit=1



Thread (7 messages)

« previous php.bugs (#147709) next »