|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73008 Bug #72286 is actually a gc use after free and is exploitable
Submitted: 2016-09-03 19:54 UTC Modified: 2017-01-02 12:17 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: xavier dot combelle at gmail dot com Assigned: dmitry (profile)
Status: Duplicate Package: *General Issues
PHP Version: 5.6.25 OS: debian jessie
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:
Solve the problem:
6 + 43 = ?
Subscribe to this entry?

 [2016-09-03 19:54 UTC] xavier dot combelle at gmail dot com
I use a fresh php just compiled for test like this 

./sapi/cli/php ~/public_html/test.php

It occurred to me that Bug #72286, is indeed an use after free kind of bug so could be exploitable.

With a variation of Bug #72286 report, I show how the bug could lead to not intended execution.

For the proof of concept I just call a method which echo "dangerous". If I don't mistake attribute change could be also obtained.

Apart that the destructed  object should be take in a reference cycle, and the garbage collection triggered, the only constraint I see of the proof of concept is that a target object must be created inside the destructor and the  target method/attribute should be call

Test script:

Expected result:
not dangerous

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-03 20:08 UTC]
-Type: Security +Type: Bug
 [2016-09-03 20:08 UTC]
-Assigned To: +Assigned To: dmitry
 [2017-01-02 12:17 UTC]
-Status: Assigned +Status: Duplicate
 [2017-01-02 12:17 UTC]
Marking as duplicate of bug #72286.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Jun 05 00:01:30 2020 UTC