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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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 16:00:01 2026 UTC