php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68900 Pointer use after free
Submitted: 2015-01-24 18:39 UTC Modified: 2015-01-24 23:26 UTC
From: bugreports at internot dot info Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.5.21 OS: Linux Ubuntu 14.04
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bugreports at internot dot info
New email:
PHP Version: OS:

 

 [2015-01-24 18:39 UTC] bugreports at internot dot info
Description:
------------
Hi,

In /Zend/zend_object_handlers.c:


This frees 'member'("160        zval_ptr_dtor(&member);"):
470                        rv = zend_std_call_getter(object, member TSRMLS_CC);


but then it is used here:

487                                                zend_error(E_NOTICE, "Indirect modification of overloaded property %s::$%s has no effect", zobj->ce->name, Z_STRVAL_P(member));





Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-24 23:26 UTC] stas@php.net
-Status: Open +Status: Not a bug -Type: Security +Type: Bug
 [2015-01-24 23:26 UTC] stas@php.net
zval_ptr_dtor does not always free the argument, it only frees when refcount is 1. However, SEPARATE_ARG_IF_REF() either increments the refcount or creates a copy with refcount 1, so in neither case the original "member" would be freed.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 15:00:02 2026 UTC