Bug #73711 [Opn->Asn]: Segfault in openssl_pkey_new when generating DSA or DH key

From: Date: Wed, 14 Dec 2016 19:23:12 +0000
Subject: Bug #73711 [Opn->Asn]: Segfault in openssl_pkey_new when generating DSA or DH key
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206003@lists.php.net to get a copy of this message
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)

« previous php.bugs (#206003) next »