Bug #75420 [NEW]: Crash when modifing property name in __isset for BP_VAR_IS
| From: | nikic@php.net | Date: | Mon, 23 Oct 2017 20:00:08 +0000 |
| Subject: | Bug #75420 [NEW]: Crash when modifing property name in __isset for BP_VAR_IS | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-211861@lists.php.net to get a copy of this message | ||
From: nikic
Operating system:
PHP version: 7.0.24
Package: Scripting Engine problem
Bug Type: Bug
Bug description:Crash when modifing property name in __isset for BP_VAR_IS
Description:
------------
$name is changed from string to int in the __isset() call, so that the
subsequent __get() call crashes.
Test script:
---------------
<?php
class Test {
public function __isset($x) { $GLOBALS['name'] = 24; return true; }
public function __get($x) { var_dump($x); return 42; }
}
$obj = new Test;
$name = "foo";
var_dump($obj->$name ?? 12);
--
Edit bug report at https://bugs.php.net/bug.php?id=75420&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75420&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75420&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75420&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75420&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75420&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75420&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75420&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75420&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75420&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75420&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75420&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75420&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75420&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75420&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75420&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75420&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75420&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75420&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75420&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75420&r=mysqlcfg