#39498 [NEW]: ext/mcrypt/mcrypt.c hardcoded to use /dev/random
From: mark at exonetric dot com
Operating system: Linux 2.6/Debian Etch
PHP version: 4.4.4
PHP Bug Type: Performance problem
Bug description: ext/mcrypt/mcrypt.c hardcoded to use /dev/random
Description:
------------
mcrypt.c appears to be written to use /dev/random for entropy in all
cases. As good entropy is a limited resource when obtained from
/dev/random, code that makes frequent calls to mcrypt routines that
require entropy can block waiting for entropy unexpectedly.
PHP_FUNCTION(mcrypt_create_iv) should be modified to permit configuration
of /dev/random or /dev/urandom at least at compile time if not at run time.
Reproduce code:
---------------
any code that calls mcrypt routines frequently
Expected result:
----------------
if called frequently enough, will block waiting for entropy.
--
Edit bug report at http://bugs.php.net/?id=39498&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39498&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39498&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39498&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39498&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39498&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39498&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39498&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39498&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39498&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39498&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39498&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39498&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39498&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39498&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39498&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39498&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39498&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39498&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39498&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39498&r=mysqlcfg
Thread (4 messages)
- mark at exonetric dot com