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
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: nikic@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Wed Nov 27 10:01:27 2024 UTC