Skip to content

Fix GH-21927: Use-after-free of self-freeing MultipleIterator children. - #21933

Closed
devnexen wants to merge 1 commit into
php:PHP-8.4from
devnexen:gh21927
Closed

Fix GH-21927: Use-after-free of self-freeing MultipleIterator children.#21933
devnexen wants to merge 1 commit into
php:PHP-8.4from
devnexen:gh21927

Conversation

@devnexen

Copy link
Copy Markdown
Member

Add a refcount on the child iterator across rewind/next/valid/current/key calls so user methods can detach themselves without freeing the object mid-call.

…dren.
Add a refcount on the child iterator across rewind/next/valid/current/key
calls so user methods can detach themselves without freeing the object
mid-call.
@devnexendevnexen linked an issue May 2, 2026 that may be closed by this pull request
@devnexen
devnexen marked this pull request as ready for review May 2, 2026 16:17
@devnexen
devnexen requested a review from Girgias as a code ownerMay 2, 2026 16:17

@GirgiasGirgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, MultipleIterator is a mess anyway

@iluuu1994

Copy link
Copy Markdown
Member

Didn't we agree not to merge fuzzer issues into stable branches?

@devnexen

Copy link
Copy Markdown
MemberAuthor

I did not know it originated from fuzzer findings, do you want me to revert ?

@iluuu1994

Copy link
Copy Markdown
Member

fuzzer issue anything artificial, I suppose. It's ok if you're confident that the fix is correct. I didn't see an issue looking through it.

@devnexen
devnexen deleted the gh21927 branch August 23, 2026 14:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use-after-free of self-freeing MultipleIterator children

3 participants

@devnexen@iluuu1994@Girgias