Bug 1260707 - php: Another use-after-free vulnerability in unserialize() with SplDoublyLinkedList
Summary: php: Another use-after-free vulnerability in unserialize() with SplDoublyLink...
Status: CLOSED DUPLICATE of bug 1260642
Alias: None
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=moderate,public=20150827,repor...
Keywords: Security
Depends On: 1260708
Blocks: 1260756
TreeView+ depends on / blocked
 
Reported: 2015-09-07 13:33 UTC by Adam Mariš
Modified: 2019-06-08 20:44 UTC (History)
15 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2015-09-09 08:00:09 UTC


Attachments (Terms of Use)

Description Adam Mariš 2015-09-07 13:33:15 UTC
Another use-after-free vulnerability in unserialize() was found when during deserialization it will still allow to use R: or r: to set references to the already freed memory.

Vulnerable code:

while(*p == ':') {
	++p;
	ALLOC_INIT_ZVAL(elem);
	if (!php_var_unserialize(&elem, &p, s + buf_len, &var_hash TSRMLS_CC)) {
		zval_ptr_dtor(&elem);
		goto error;
	}
	spl_ptr_llist_push(intern->llist, elem TSRMLS_CC);
}

Upstream report:

https://bugs.php.net/bug.php?id=70366

Upstream patch:

http://git.php.net/?p=php-src.git;a=commit;h=259057b2a484747a6c73ce54c4fa0f5acbd56179

Comment 1 Adam Mariš 2015-09-07 13:33:44 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1260708]

Comment 2 Adam Mariš 2015-09-09 08:00:09 UTC

*** This bug has been marked as a duplicate of bug 1260642 ***

Comment 3 Fedora Update System 2015-09-14 22:19:29 UTC
php-5.6.13-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2015-09-14 23:18:59 UTC
php-5.6.13-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2015-09-18 18:38:50 UTC
php-5.6.13-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.