php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61500 Segfault in xdebug? zend? binary operation?
Submitted: 2012-03-24 19:19 UTC Modified: 2013-02-18 00:39 UTC
From: piotrekrogowski at gmail dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 5.3.10 OS: Linux
Private report: No CVE-ID: None
 [2012-03-24 19:19 UTC] piotrekrogowski at gmail dot com
Description:
------------
segfault in this example
Starting program: /usr/bin/php index.php                                                                                                                                        
[Thread debugging using libthread_db enabled]                                                                                                                                   
Using host libthread_db library "/lib64/libthread_db.so.1".                                                                                                                     
[New Thread 0x7ffff7192700 (LWP 987)]                                                                                                                                           
[Thread 0x7ffff7192700 (LWP 987) exited]                                                                                                                                        
                                                                                                                                                                                
Program received signal SIGSEGV, Segmentation fault.                                                                                                                            
0x00000000006f1e40 in zend_hash_num_elements ()                                                                                                                                 
(gdb) bt                                                                                                                                                                        
#0  0x00000000006f1e40 in zend_hash_num_elements ()                                                                                                                             
#1  0x00000000006ddf05 in bitwise_and_function ()                                                                                                                               
#2  0x0000000000756877 in ?? ()                                                                                                                                                 
#3  0x000000000070a03e in execute ()                                                                                                                                            
#4  0x00007ffff7c2f5f7 in xdebug_execute () from /usr/lib64/php5.3/lib/extensions/no-debug-zts-20090626/xdebug.so                                                               
#5  0x00000000007676f0 in ?? ()
#6  0x000000000070a03e in execute ()
#7  0x00007ffff7c2f5f7 in xdebug_execute () from /usr/lib64/php5.3/lib/extensions/no-debug-zts-20090626/xdebug.so
#8  0x000000000071b7b3 in ?? ()
#9  0x000000000070a03e in execute ()
#10 0x00007ffff7c2f5f7 in xdebug_execute () from /usr/lib64/php5.3/lib/extensions/no-debug-zts-20090626/xdebug.so
#11 0x00000000006e4c09 in zend_execute_scripts ()
#12 0x000000000068606e in php_execute_script ()
#13 0x000000000046d7e0 in main ()

PHP 5.3.10-pl2-gentoo (cli) (built: Mar 20 2012 01:15:33) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.1.4, Copyright (c) 2002-2012, by Derick Rethans

[PHP Modules]
bz2
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
gd
geoip
gettext
hash
iconv
json
ldap
libxml
mbstring
mcrypt
memcached
mysql
mysqli
openssl
pcre
PDO
pdo_mysql
pdo_pgsql
pgsql
Phar
posix
pspell
readline
Reflection
session
SimpleXML
SPL
standard
tokenizer
xdebug
xhprof
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]
Xdebug

Test script:
---------------
<?php
/* exploit PHP 5.3.10-pl2-gentoo
 * @copyright Piotr Rogowski <piotrekrogowski@gmail.com>
 */
class segfault
{
	static $var = array();
	
	static function crash()
	{
		$item = &self::$var;
		$item &= $item[1] = array();
		
	}
}
segfault::crash();
?>

Expected result:
----------------
segfault

Actual result:
--------------
not segfault :P

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-24 19:44 UTC] pajoye@php.net
Looks like it is fixed already. Please try a 5.3 snapshot.
 [2012-03-24 19:44 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2013-02-18 00:35 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 [2013-02-18 00:39 UTC] piotrekrogowski at gmail dot com
-Status: No Feedback +Status: Closed
 [2013-02-18 00:39 UTC] piotrekrogowski at gmail dot com
Problem seems to be solved
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC