Bug #73711 [NEW]: Segfault in openssl_pkey_new when generating DSA or DH key

From: Date: Sat, 10 Dec 2016 17:04:41 +0000
Subject: Bug #73711 [NEW]: Segfault in openssl_pkey_new when generating DSA or DH key
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-205893@lists.php.net to get a copy of this message
From: margusk at gmail dot com Operating system: PHP version: 7.1.0 Package: OpenSSL related Bug Type: Bug Bug description:Segfault in openssl_pkey_new when generating DSA or DH key Description: ------------ When generating new DSA or DH key using openssl_pkey_new(), then script terminates with Segmentation Fault. The problem lies in method php_openssl_generate_private_key() (ext/openssl/openssl.c), where "dsaparam" and "dhparam" variables are not initialized. Both PHP 7.0 and 7.1 are affected. Test script: --------------- <?php $k = openssl_pkey_new (array ("private_key_type" => OPENSSL_KEYTYPE_DSA)); echo "Success!"; ?> Expected result: ---------------- Success! Actual result: -------------- Segmentation Fault -- Edit bug report at https://bugs.php.net/bug.php?id=73711&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73711&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73711&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73711&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73711&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73711&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73711&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73711&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73711&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73711&r=support Expected behavior: https://bugs.php.net/fix.php?id=73711&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73711&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73711&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73711&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73711&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73711&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73711&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73711&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73711&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73711&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73711&r=mysqlcfg

« previous php.bugs (#205893) next »