Bug #74310 [NEW]: segfault in i_zval_ptr_dtor()

From: Date: Fri, 24 Mar 2017 22:59:51 +0000
Subject: Bug #74310 [NEW]: segfault in i_zval_ptr_dtor()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208061@lists.php.net to get a copy of this message
From:             brian dot carpenter at gmail dot com
Operating system: Debian 8 x64
PHP version:      7.1Git-2017-03-24 (Git)
Package:          Reproducible crash
Bug Type:         Bug
Bug description:segfault in i_zval_ptr_dtor()

Description:
------------
Segfault found in PHP 7.2.0-dev (git 37da80b) on Debian 8.x x64, built
with afl-gcc.

Test script:
---------------
<?${$o{8}=8}{$o{8}.=0}?><?${$o{8}.=0}<${$o{8}.=0}=0?><?0==${$o{8}.=0}<${$o{8}.=0}.Q?><?$$o{$o{8}.=0}=${$o{8}.=0}=$$o=Q?><?${${0}}=$$o{$o{8}.=0}=$$$o=0?>

or

https://drive.google.com/file/d/0B3Tl4QiWJUt8V2hiQ2FDYmlRZ1U/view?usp=sharing

Expected result:
----------------
No crash.

Actual result:
--------------
==387==ERROR: AddressSanitizer: SEGV on unknown address 0x7f9b69800000
(pc 0x000001b8c308 sp 0x7ffd5005a7b0 bp 0x7f9b6a25f248 T0)
    #0 0x1b8c307 in i_zval_ptr_dtor
/root/php-git/Zend/zend_variables.h:48
    #1 0x1b8c307 in zend_unclean_zval_ptr_dtor
/root/php-git/Zend/zend_execute_API.c:212
    #2 0x1cc4b3a in _zend_hash_del_el_ex
/root/php-git/Zend/zend_hash.c:997
    #3 0x1cc4b3a in _zend_hash_del_el
/root/php-git/Zend/zend_hash.c:1020
    #4 0x1cc4b3a in zend_hash_graceful_reverse_destroy
/root/php-git/Zend/zend_hash.c:1476
    #5 0x1b8f83c in shutdown_executor
/root/php-git/Zend/zend_execute_API.c:281
    #6 0x1c1e1d4 in zend_deactivate /root/php-git/Zend/zend.c:1060
    #7 0x192f468 in php_request_shutdown /root/php-git/main/main.c:1879
    #8 0x238b5a9 in do_cli /root/php-git/sapi/cli/php_cli.c:1164
    #9 0x47253b in main /root/php-git/sapi/cli/php_cli.c:1390
    #10 0x7f9b6d3b9b44 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
    #11 0x47318e (/root/php-git/sapi/cli/php+0x47318e)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /root/php-git/Zend/zend_variables.h:48
i_zval_ptr_dtor

-- 
Edit bug report at https://bugs.php.net/bug.php?id=74310&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=74310&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=74310&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=74310&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=74310&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=74310&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=74310&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=74310&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=74310&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=74310&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=74310&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=74310&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=74310&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=74310&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74310&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=74310&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=74310&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=74310&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74310&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=74310&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=74310&r=mysqlcfg



Thread (9 messages)

« previous php.bugs (#208061) next »