Bug #69556 [NEW]: openssl_verify() dumps core when curl.so is loaded before openssl.so

From: Date: Thu, 30 Apr 2015 21:43:02 +0000
Subject: Bug #69556 [NEW]: openssl_verify() dumps core when curl.so is loaded before openssl.so
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192434@lists.php.net to get a copy of this message
From: rk at redb dot cz Operating system: FreeBSD PHP version: 5.6.8 Package: OpenSSL related Bug Type: Bug Bug description:openssl_verify() dumps core when curl.so is loaded before openssl.so Description: ------------ When openssl.so is loaded before curl.so, everything is working as expected. Reversed order causes Abort (core dumped). PHP 5.5.24 gives Warnings (no core dumped): PHP Warning: openssl_verify(): Don't know how to get public key from this private key in ... PHP Warning: openssl_verify(): supplied key param cannot be coerced into a public key in ... PHP 5.5.22 works fine. Test script: --------------- https://gist.github.com/xert/6da7736f4f7e5ff22177 Expected result: ---------------- int(0) Actual result: -------------- Assertion failed: (pkey->pkey.rsa != NULL), function php_openssl_is_private_key, file /wrkdirs/usr/ports/security/php56-openssl/work/php-5.6.8/ext/openssl/openssl.c, line 3447. Abort (core dumped) Backtrace: #0 0x0000000801e2664c in thr_kill () from /lib/libc.so.7 #1 0x0000000801ecac4b in abort () from /lib/libc.so.7 #2 0x0000000801eae315 in __assert () from /lib/libc.so.7 #3 0x00000008044060ad in zif_openssl_csr_get_public_key () from /usr/local/lib/php/20131226-debug/openssl.so #4 0x000000080440583c in zif_openssl_csr_get_public_key () from /usr/local/lib/php/20131226-debug/openssl.so #5 0x000000080440b0ce in zif_openssl_verify () from /usr/local/lib/php/20131226-debug/openssl.so #6 0x000000000069253b in zend_do_fcall_common_helper_SPEC (execute_data=0x802440260) at zend_vm_execute.h:558 #7 0x0000000000698592 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0x802440260) at zend_vm_execute.h:2599 #8 0x0000000000691af4 in execute_ex (execute_data=0x802440260) at zend_vm_execute.h:363 #9 0x0000000000691b73 in zend_execute (op_array=0x802474b18) at zend_vm_execute.h:388 #10 0x0000000000652e46 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /wrkdirs/usr/ports/lang/php56/work/php-5.6.8/Zend/zend.c:1341 #11 0x00000000005c63df in php_execute_script (primary_file=0x7fffffffe480) at /wrkdirs/usr/ports/lang/php56/work/php-5.6.8/main/main.c:2597 #12 0x00000000006fdb7e in do_cli (argc=2, argv=0x7fffffffebe0) at /wrkdirs/usr/ports/lang/php56/work/php-5.6.8/sapi/cli/php_cli.c:994 #13 0x00000000006feadd in main (argc=2, argv=0x7fffffffebe0) at /wrkdirs/usr/ports/lang/php56/work/php-5.6.8/sapi/cli/php_cli.c:1378 -- Edit bug report at https://bugs.php.net/bug.php?id=69556&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69556&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69556&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69556&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=69556&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=69556&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=69556&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=69556&r=needscript Try newer version: https://bugs.php.net/fix.php?id=69556&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=69556&r=support Expected behavior: https://bugs.php.net/fix.php?id=69556&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=69556&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=69556&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=69556&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69556&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=69556&r=dst IIS Stability: https://bugs.php.net/fix.php?id=69556&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=69556&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=69556&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=69556&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=69556&r=mysqlcfg

« previous php.bugs (#192434) next »