Bug #73711 [Opn->Asn]: Segfault in openssl_pkey_new when generating DSA or DH key
Edit report at https://bugs.php.net/bug.php?id=73711&edit=1
ID: 73711
Updated by: bukka@php.net
Reported by: margusk at gmail dot com
Summary: Segfault in openssl_pkey_new when generating DSA or
DH key
-Status: Open
+Status: Assigned
Type: Bug
Package: OpenSSL related
PHP Version: 7.1.0
-Assigned To:
+Assigned To: bukka
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2016-12-10 17:04:40] margusk at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=73711&edit=1
Thread (3 messages)