Comment 14 for bug 1626883

Revision history for this message
vdloo (rickvandeloo) wrote :

Can confirm that this affects 1.0.1-4ubuntu5.37 on 12.04

Reproducible by trying to openssl_x509_parse the ssl cert for sourceforge with PHP 5.5.30-1+deb.sury.org~precise+1

$ openssl s_client -connect sourceforge.net:443 </dev/null |& sed -n '/BEGIN CERTIFICATE/,$p' | sed '/END CERTIFICATE/q' > cert.txt
$ echo "<?php openssl_x509_parse(file_get_contents('cert.txt'));" > segfault.php
$ php segfault.php
Segmentation fault (core dumped)

The backtrace:
$ gdb php
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) r segf.php
Starting program: /usr/bin/php segf.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5c40f81 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff5c40f81 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00000000006e8e8d in add_assoc_string_ex ()
#2 0x00000000004a67ba in zif_openssl_x509_parse ()
#3 0x00000000006d4959 in dtrace_execute_internal ()
#4 0x00000000007911de in ?? ()
#5 0x0000000000754358 in execute_ex ()
#6 0x00000000006d4846 in dtrace_execute_ex ()
#7 0x00007ffff4f72ecc in ?? () from /usr/lib/php5/20121212/ioncube_loader_lin_5.5.so
#8 0x00000000006e66b4 in zend_execute_scripts ()
#9 0x000000000068380d in php_execute_script ()
#10 0x00000000007949c3 in ?? ()
#11 0x0000000000465081 in main ()
(gdb)