php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13068 mcrypt_module_open causes seg fault
Submitted: 2001-08-30 17:32 UTC Modified: 2001-09-07 03:29 UTC
From: scott at incursio dot com Assigned: derick (profile)
Status: Closed Package: mcrypt related
PHP Version: 4.0.6 OS: Linux
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: scott at incursio dot com
New email:
PHP Version: OS:

 

 [2001-08-30 17:32 UTC] scott at incursio dot com
Running PHP 4.0.6 and libmcrypt 2.4.15 on a Linux box (2.4.x kernel).

I've narrowed it down to the call to mcrypt_module_open.  That's the one that hoses me.

$cipher = "des"; 
$td = mcrypt_module_open ($cipher, "", MCRYPT_MODE_CBC, ""); 

Sometimes it works, other times, I get seg faults, which would rule out library permissions, etc.

Any ideas?

Scott

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-30 20:24 UTC] scott at incursio dot com
Correction, and solution.

It turns out that it wasn't mcrypt_module_open that was seg faulting, but mcrypt_decrypt.  The solution was that I didn't have a generic_init call.
 [2001-08-31 02:45 UTC] derick@php.net
It's still a bug, PHP should not crash. Assiging to myself.
 [2001-09-07 03:29 UTC] derick@php.net
I looked into it, and mcrypt_decrypt is using the old API which does NOT work in conjunction with mcrypt_module_open.
mcrypt_decrypt uses it's own mcrypt_module_open. I'm closing this bug, as there is no way to catch it (and it's not severe because you should not mix the old API and the new API).

Derick
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 09:01:28 2025 UTC