php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75420 Crash when modifing property name in __isset for BP_VAR_IS
Submitted: 2017-10-23 20:00 UTC Modified: 2017-10-24 01:31 UTC
From: nikic@php.net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 7.0.24 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nikic@php.net
New email:
PHP Version: OS:

 

 [2017-10-23 20:00 UTC] nikic@php.net
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);



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-24 01:31 UTC] kalle@php.net
-Status: Open +Status: Verified
 [2017-10-26 02:19 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d2047503cbc080ef96b00ac254604aaa01cf618e
Log: Fixed bug #75420 (Crash when modifing property name in __isset for BP_VAR_IS)
 [2017-10-26 02:19 UTC] laruence@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 09:01:28 2024 UTC