Home > php教程 > php手册 > PHP 内存管理器符号比较多个溢出漏洞

PHP 内存管理器符号比较多个溢出漏洞

WBOY
Release: 2016-06-21 09:00:24
Original
874 people have browsed it

受影响系统:PHP PHP 5.2.0

不受影响系统:PHP PHP 5.2.1

描述:BUGTRAQ ID: 23238

PHP是广泛使用的通用目的脚本语言,特别适合于Web开发,可嵌入到HTML中。PHP的内存管理器实现上存在漏洞,本地攻击者可能利用此漏洞提升权限。如果通过emalloc()函数分配内存的话,PHP中新的Zend内存管理器会在内部的_zend_mm_alloc_int()函数中处理这个请求,首先使用ZEND_MM_TRUE_SIZE宏判断所请求内存块的真实大小,如下所示:

<ccid_code>static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_DC ...) {     size_t true_size, best_size = 0x7fffffff;     zend_mm_free_block *p, *end, *best_fit = NULL;     true_size = ZEND_MM_TRUE_SIZE(size);     The macro expands to     (((long)size</ccid_code>
Copy after login

但在进行比较之前这段代码将大小设置为有符长型,因此如果请求了正常情况下会导致内存破坏或越界的很大的内存块,就可能将其处理为负数,仅分配很小的内存块,导致多个可利用的缓冲区溢出。



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template