php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80240 Use after free multi yield from
Submitted: 2020-10-15 13:09 UTC Modified: 2020-10-22 08:43 UTC
From: nikic@php.net Assigned: nikic (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 8.0.0rc1 OS:
Private report: No CVE-ID: None
 [2020-10-15 13:09 UTC] nikic@php.net
Description:
------------
@bwoebi came up with this reduction of oss-fuzz #25697 a while ago, report a bug to make sure it doesn't get lost in a chat log...

Test script:
---------------
<?php

function gen() {
    yield 0;
    yield from gen();
}

function bar($gen) {
    yield from $gen;
}

$gen = gen();
$a = bar($gen);
$b = bar($gen);
$a->rewind();
$b->rewind();
$a->next();
unset($gen);
unset($a);
unset($b);



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-16 10:15 UTC] nikic@php.net
-Assigned To: +Assigned To: nikic
 [2020-10-22 08:43 UTC] nikic@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Nov 30 11:01:22 2020 UTC