Zend: include() with a non-literal argument reads out of bounds with … - #23095
Closed
devnexen wants to merge 1 commit into
Closed
Zend: include() with a non-literal argument reads out of bounds with …#23095devnexen wants to merge 1 commit into
devnexen wants to merge 1 commit into
Conversation
…error_include_args=1. Fix php#23083 RT_CONSTANT() is only valid when op1 is a literal, so a CV or TMP operand turned a frame offset into a pointer inside the opline array. Read the operand from the call frame instead unless op1_type is IS_CONST.
NattyNarwhal
approved these changes
Aug 6, 2026
NattyNarwhal
left a comment
Member
There was a problem hiding this comment.
Thanks for catching my mistake here
devnexen
marked this pull request as ready for review
August 6, 2026 20:31
Member
|
IMHO I think the long term solution would be doing something like #22851 (comment) but the logic is pretty hairy in that function already. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…error_include_args=1.
Fix #23083
RT_CONSTANT() is only valid when op1 is a literal, so a CV or TMP operand turned a frame offset into a pointer inside the opline array. Read the operand from the call frame instead unless op1_type is IS_CONST.