close
Skip to content

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

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

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

Conversation

@devnexen
Copy link
Copy Markdown
Member

@devnexen devnexen commented May 2, 2026

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.
@devnexen devnexen 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 owner May 2, 2026 16:17
Copy link
Copy Markdown
Member

@Girgias Girgias left a comment

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

@devnexen devnexen closed this in 7192664 May 4, 2026
@iluuu1994
Copy link
Copy Markdown
Member

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

@devnexen
Copy link
Copy Markdown
Member Author

devnexen commented May 4, 2026

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.

Sign up for free to 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