php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68902 Use after free in ext/opcache/zend_persist.c
Submitted: 2015-01-24 18:58 UTC Modified: 2015-01-25 23:28 UTC
From: bugreports at internot dot info Assigned:
Status: Not a bug Package: opcache
PHP Version: 5.5.21 OS: Linux Ubuntu 14.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
30 - 30 = ?
Subscribe to this entry?

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

In     /ext/opcache/zend_persist.c:

239                        efree(orig_literals);


but then it is used in multiple places:

255                                opline->op1.zv = (zval*)((char*)opline->op1.zv + ((char*)op_array->literals - (char*)orig_literals));

.
263                                opline->op2.zv = (zval*)((char*)opline->op2.zv + ((char*)op_array->literals - (char*)orig_literals));





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-24 23:49 UTC] stas@php.net
-Summary: Use after free +Summary: Use after free in ext/opcache/zend_persist.c -Status: Open +Status: Not a bug -Type: Security +Type: Bug
 [2015-01-24 23:49 UTC] stas@php.net
I do not see dereferencing this pointer in any of these places.
 [2015-01-25 23:28 UTC] bugreports at internot dot info
232                        orig_literals = op_array->literals;

?
 [2015-02-02 23:55 UTC] a at b dot c dot de
And then see the line immediately after that....

    op_array->literals = p;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC