php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27009 mcrypt now crashes apache
Submitted: 2004-01-22 13:47 UTC Modified: 2004-01-31 23:15 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:1 (25.0%)
From: ronan at ronanmcnulty dot co dot uk Assigned:
Status: No Feedback Package: mcrypt related
PHP Version: 4.3.4 OS: winxp
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ronan at ronanmcnulty dot co dot uk
New email:
PHP Version: OS:

 

 [2004-01-22 13:47 UTC] ronan at ronanmcnulty dot co dot uk
Description:
------------
When I use the example:
mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT);

Apache crashes:

szAppName : Apache.exe     szAppVer : 0.0.0.0     szModName : libmcrypt.dll
szModVer : 0.0.0.0     offset : 00022685     

Reproduce code:
---------------
mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT);

Expected result:
----------------
I expect apache NOT to crash!

Actual result:
--------------
Apache actually crashes

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-22 14:03 UTC] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.
 [2004-01-31 23:15 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2004-07-08 21:54 UTC] danielpm8 at hotmail dot com
Hi,
I am experiencing this problem also. When I run mcrypt_decrypt it causes apache to crash. However, mcrypt_encrypt is working fine.

I have Mcrypt module loaded as a dynamic module on apache. I am using Windows XP professional, apache 1.3 and php 4.3.4 . The mcrypt dll library is a "libmcrypt + php 4.3.x on windows".

The following is the example code I used, which causes apache to crash.

If you any questions or suggestions please do not hesitate to contact me. Thanks in advance.

Cheers,



Daniel

==================================
Example code
================================

example6_encrypt();

function example6_encrypt(){
	$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
    $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
    $key = "This is a very secret key";
    $text = "Meet me at 11 o'clock behind the monument.";
    //echo strlen($text) . "\n";

    $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);
    //echo strlen($crypttext) . "\n";
	echo "<p>encrypted string: <b>$crypttext</b></p>";

	example6_decrypt($crypttext);
}

/*
string mcrypt_decrypt ( string cipher, string key, string data, string mode [, string iv])
*/
function example6_decrypt($text){
	$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
    $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
    $key = "This is a very secret key";

	$decrypt_text = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);

	echo "<p>decrypted string: <b>$decrypt_text</b></p>";
}
 [2006-02-03 21:39 UTC] keymone at gmail dot com
Windows 2003 Server SP1
PHP 4.3.2
this line crashes Apache/1.3.24

$bar = mcrypt_ecb(MCRYPT_RIJNDAEL_128 , 'foo', $bar, MCRYPT_DECRYPT);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 23:01:29 2024 UTC