Bug #70323 [Ana->Csd]: Regression in zend_fetch_debug_backtrace() can cause segfaults
| From: | laruence@php.net | Date: | Mon, 09 Nov 2015 09:15:26 +0000 |
| Subject: | Bug #70323 [Ana->Csd]: Regression in zend_fetch_debug_backtrace() can cause segfaults | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-197129@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70323&edit=1
ID: 70323
Updated by: laruence@php.net
Reported by: aharvey@php.net
Summary: Regression in zend_fetch_debug_backtrace() can cause
segfaults
-Status: Analyzed
+Status: Closed
Type: Bug
Package: Reproducible crash
Operating System: Irrelevant
PHP Version: 7.0Git-2015-08-22 (Git)
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d70aa14f2c1617800cbab431db5c2ea021969cc6
Log: Fixed bug #70323 (Regression in zend_fetch_debug_backtrace() can cause segfaults)
Previous Comments:
------------------------------------------------------------------------
[2015-08-24 18:52:13] aharvey@php.net
I tend to agree (and have added a check to my own code to stop that), but since this was a safe
operation in PHP 5 and isn't in PHP 7, I think we should fix it before the final release.
------------------------------------------------------------------------
[2015-08-23 05:15:17] laruence@php.net
Not sure about that, if there is no active_execute_data, then it must not in execution.. then maybe
this fucntion should not be called at all
however, add a protection in such a not-common used function, seems is also okey. :)
------------------------------------------------------------------------
[2015-08-22 01:57:25] aharvey@php.net
Description:
------------
In PHP 5, zend_fetch_debug_backtrace() checks if the current execute data is NULL before attempting
to access fields on that structure.
PHP 7's implementation of zend_fetch_debug_backtrace() includes some new code that accesses
execute data fields without proper checks, thereby making it possible for the function to segfault
if EG(current_execute_data) is NULL.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70323&edit=1