php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13239 server child crashes during use of mcrypt...
Submitted: 2001-09-10 17:15 UTC Modified: 2002-01-03 18:00 UTC
From: ivo at wettinet dot de Assigned:
Status: Closed Package: mcrypt related
PHP Version: 4.0CVS-2001-09-10 OS: Linux 2.4.2 (SuSE 7.1 / 7.2)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ivo at wettinet dot de
New email:
PHP Version: OS:

 

 [2001-09-10 17:15 UTC] ivo at wettinet dot de
i'm trying out a groupware in php (downloaded
from http://www.horde.org/, latest cvs)...

according to that documentation it was recommend
to download the latest cvs-revision from php in
order to get everything working...

cause earlyer versions of php (including 4.0.6)
don't support all the functions used there, i 
wasn't able to check the them against the bug, too.


(p.s: please excuse my bad english... :->)


server child crashes during the call of "mdecrypt_generic",
but not allways on every call (just the 2nd or 3rd...)


example follows:

----- cut -----

<?php 
    function testit()
    {
           if (function_exists('mcrypt_module_open')) {
            $key="3224e91c21ee5dd7e9bd83c79290bbda";
            $ciphertext="3224e91c21ee5dd7e9bd83c79290bbda";
            $td = mcrypt_module_open(MCRYPT_GOST, '',
MCRYPT_MODE_ECB, '');
            $iv =
mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
            @mcrypt_generic_init($td, $key, $iv);
            error_log("BEFORE");
            $decrypted_data = mdecrypt_generic($td,
$ciphertext);
            error_log("AFTER");
            mcrypt_generic_end($td);
            return $decrypted_data;
        } else {
            include_once 'Crypt/HCEMD5.php';
 
            $hcemd5 = new Crypt_HCEMD5($key);
            return $hcemd5->decodeMimeSelfRand($ciphertext);
        }
    }
  testit();
  echo("aaaa");
?>
----- cut -----


now the backtrace follows:

---------- cut ----------


(gdb) run -X -f /etc/httpd/httpd.conf -D STATUS    -D SSL
Starting program: /usr/sbin/httpd -X -f
/etc/httpd/httpd.conf -D STATUS    -D SSL
 
Program received signal SIGSEGV, Segmentation fault.
0x42b2905c in gost_LTX__mcrypt_decrypt () from
/usr/lib/libmcrypt/gost.so
(gdb) bt
#0  0x42b2905c in gost_LTX__mcrypt_decrypt () from
/usr/lib/libmcrypt/gost.so
#1  0x42b2b990 in ecb_LTX__mdecrypt () from
/usr/lib/libmcrypt/ecb.so
#2  0x4001fd65 in mcrypt_enc_get_algorithms_name ()
   from /usr/lib/libmcrypt.so.4
#3  0x4001f188 in mdecrypt_generic () from
/usr/lib/libmcrypt.so.4
#4  0x40490a4e in zif_mdecrypt_generic (ht=2,
return_value=0x81dbfc4,
    this_ptr=0x0, return_value_used=1) at mcrypt.c:578
#5  0x40424e39 in execute (op_array=0x825ef34) at
./zend_execute.c:1590
#6  0x4042508c in execute (op_array=0x825b3c4) at
./zend_execute.c:1630
#7  0x4042508c in execute (op_array=0x82b7b94) at
./zend_execute.c:1630
#8  0x40434013 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
    at zend.c:809
#9  0x40442eb6 in php_execute_script
(primary_file=0xbffff3a8) at main.c:1310
#10 0x4043e86e in apache_php_module_main (r=0x8175310,
display_source_mode=0)
    at sapi_apache.c:90
#11 0x4043f430 in send_php (r=0x8175310,
display_source_mode=0, filename=0x0)
    at mod_php4.c:575
#12 0x4043f4a3 in send_parsed_php (r=0x8175310) at
mod_php4.c:590
#13 0x8055250 in ap_invoke_handler ()
#14 0x80679cc in ap_some_auth_required ()
#15 0x8067a43 in ap_process_request ()
#16 0x805fe27 in ap_child_terminate ()
#17 0x805ffd5 in ap_child_terminate ()
#18 0x8060116 in ap_child_terminate ()
#19 0x8060738 in ap_child_terminate ()
#20 0x8060fb5 in main ()
#21 0x40120baf in __libc_start_main () from /lib/libc.so.6
(gdb)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-13 15:45 UTC] derick@php.net
I could not reproduce this with the latest CVS version.
Can you try a snapshot from snaps.php.net (in a about a day)?

Derick
 [2002-01-03 18:00 UTC] lobbin@php.net
No feedback. Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 13:01:30 2024 UTC