Skip to content

Conversation

nielsdos
Copy link
Member

@nielsdos nielsdos commented Nov 6, 2024

zend_save_lexical_state() can be nested multiple times, for example for the parser initialization and then in the heredoc lexing. The input should not be freed if we restore to the same filtered string.

zend_save_lexical_state() can be nested multiple times, for example for
the parser initialization and then in the heredoc lexing. The input
should not be freed if we restore to the same filtered string.
@nielsdos nielsdos linked an issue Nov 6, 2024 that may be closed by this pull request
@nielsdos nielsdos requested review from dstogov and iluuu1994 November 6, 2024 19:28
@nielsdos
Copy link
Member Author

This bug was hit again by #16791, where this lexer bug causes heap corruption causing issues later down the line.

Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@nielsdos nielsdos closed this in fc1db70 Nov 18, 2024
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.

UAF in lexer with encoding translation and heredocs

3 participants