forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug #73147: Use After Free in PHP7 unserialize()
- Loading branch information
Showing
4 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
Bug #73147: Use After Free in PHP7 unserialize() | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded("curl")) { | ||
exit("skip curl extension not loaded"); | ||
} | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
$poc = 'a:1:{i:0;O:8:"CURLFile":1:{s:4:"name";R:1;}}'; | ||
try { | ||
var_dump(unserialize($poc)); | ||
} catch(Exception $e) { | ||
echo $e->getMessage(); | ||
} | ||
?> | ||
--EXPECT-- | ||
Unserialization of CURLFile instances is not allowed |