php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78391 Assertion failure in openssl_random_pseudo_bytes
Submitted: 2019-08-09 12:51 UTC Modified: 2019-08-09 13:00 UTC
From: ildar dot aim at gmail dot com Assigned: nikic (profile)
Status: Closed Package: OpenSSL related
PHP Version: 7.4.0beta2 OS: Linux x86_64
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: ildar dot aim at gmail dot com
New email:
PHP Version: OS:

 

 [2019-08-09 12:51 UTC] ildar dot aim at gmail dot com
Description:
------------
aim-server[~/tmp]$ /opt/phpfarm_new/inst/php-7.4.0beta2/bin/php -r '$isStrongCrypto=false;print_r(openssl_random_pseudo_bytes(16, $isStrongCrypto));die;'
php: /opt/phpfarm_new/src/php-7.4.0beta2/ext/openssl/openssl.c:6982: zif_openssl_random_pseudo_bytes: Assertion `(zval_get_type(&(*(zstrong_result_returned))) == 10)' failed.
zsh: abort (core dumped)  /opt/phpfarm_new/inst/php-7.4.0beta2/bin/php -r 


Test script:
---------------
aim-server[~/tmp]$ /opt/phpfarm_new/inst/php-7.4.0beta2/bin/php -r '$isStrongCrypto=false;$h = openssl_random_pseudo_bytes(16, $isStrongCrypto);die;' 
php: /opt/phpfarm_new/src/php-7.4.0beta2/ext/openssl/openssl.c:6982: zif_openssl_random_pseudo_bytes: Assertion `(zval_get_type(&(*(zstrong_result_returned))) == 10)' failed.
zsh: abort (core dumped)  /opt/phpfarm_new/inst/php-7.4.0beta2/bin/php -r 
aim-server[~/tmp]$ /opt/phpfarm_new/inst/php-7.4.0beta2/bin/php -v                                                                                   
PHP 7.4.0beta2 (cli) (built: Aug  7 2019 16:34:24) ( NTS DEBUG )
Copyright (c) The PHP Group
Zend Engine v3.4.0-dev, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.0beta2, Copyright (c), by Zend Technologies
aim-server[~/tmp]$ openssl version                                
OpenSSL 1.1.1c  28 May 2019
aim-server[~/tmp]$ 


Expected result:
----------------
generated string

Actual result:
--------------
zif_openssl_random_pseudo_bytes: Assertion `(zval_get_type(&(*(zstrong_result_returned))) == 10)' failed.
zsh: abort (core dumped)  /opt/phpfarm_new/inst/php-7.4.0beta2/bin/php -r 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-09 12:53 UTC] ildar dot aim at gmail dot com
-Summary: php-7.4.0beta2/ext/openssl/openssl.c:6982: zif_openssl_random_pseudo_bytes: Ass +Summary: php-7.4.0beta2 ... openssl.c:6982: zif_openssl_random_pseudo_bytes: core dumped
 [2019-08-09 12:53 UTC] ildar dot aim at gmail dot com
changed subject
 [2019-08-09 12:54 UTC] nikic@php.net
-Summary: php-7.4.0beta2 ... openssl.c:6982: zif_openssl_random_pseudo_bytes: core dumped +Summary: php-7.4.0beta2/ext/openssl/openssl.c:6982: zif_openssl_random_pseudo_bytes: Ass -Status: Open +Status: Verified
 [2019-08-09 13:00 UTC] nikic@php.net
-Summary: php-7.4.0beta2/ext/openssl/openssl.c:6982: zif_openssl_random_pseudo_bytes: Ass +Summary: Assertion failure in openssl_random_pseudo_bytes -Status: Verified +Status: Assigned -Assigned To: +Assigned To: nikic
 [2019-08-09 13:03 UTC] nikic@php.net
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=69a771346a649d993cc19362f3966a8f59e95d75
Log: Fixed bug #78391
 [2019-08-09 13:03 UTC] nikic@php.net
-Status: Assigned +Status: Closed
 [2019-08-09 13:04 UTC] nikic@php.net
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=699b465da20fcb25747b3e1bad2e9f84a9d6d8b0
Log: Fixed bug #78391
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC