#74337 pointer returned by php_stream_fopen_tmpfile not validated#2475
Closed
skvoboo wants to merge 1 commit intophp:masterfrom
Closed
#74337 pointer returned by php_stream_fopen_tmpfile not validated#2475skvoboo wants to merge 1 commit intophp:masterfrom
skvoboo wants to merge 1 commit intophp:masterfrom
Conversation
weltling
reviewed
Apr 14, 2017
main/streams/memory.c
Outdated
|
|
||
| file = php_stream_fopen_tmpfile(); | ||
| if (file == NULL) { | ||
| php_error_docref(NULL, E_WARNING, "Unable to create temporary file. Check permissions in temporary files directory."); |
There was a problem hiding this comment.
It can fail to various reasons, so maybe could simplify the msg or even omit it if php_stream_fopen_tmpfile() already throws a warning.
Thanks.
Contributor
Author
There was a problem hiding this comment.
It can fail to various reasons, so maybe could simplify the msg or even omit it if php_stream_fopen_tmpfile() already throws a warning.
Message was simplified.
Member
|
@weltling what's the status here ? |
|
@krakjoe oh, i didn't realize it were assigned. LGTM, can take care before RC, if not merged earlier. Thanks. |
|
Merged as 793a8bd. Thanks. |
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.
The pointer returned by php_stream_fopen_tmpfile is not validated prior to use in memory.c.
In the case where a script is executed in an environment where the parent directory of system TMP directory is not readable to the user, it will cause a application crash with Access Violation.
The issue is similar to the https://bugs.php.net/bug.php?id=68986
Steps to reproduce: