PHP ini_restore()内存信息泄露漏洞

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

BUGTRAQ ID: 36009 CVE ID: CVE-2009-2626 PHP是广泛使用的通用目的脚本语言,特别适合于Web开发,可嵌入到HTML中。 在使用ini_restore()函数重置PHP配置环境时PG()类中的变量会显示任意部分的内存。如果要利用这个漏洞,攻击者必须要通过ini_set()函数声明变量。 - ---zend_ini.c--- static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage TSRMLS_DC) /* {{{ */ { if (ini_entry->modified) { if (ini_entry->on_modify) { zend_try { /* even if on_modify bails out, we have to continue on with restoring, since there can be allocated variables that would be freed on MM shutdown and would lead to memory corruption later ini entry is modified again */ ini_entry->on_modify(ini_entry, ini_entry->orig_value, ini_entry->orig_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC); } zend_end_try(); } if (ini_entry->value != ini_entry->orig_value) { efree(ini_entry->value); } ini_entry->value = ini_entry->orig_value; ini_entry->value_length = ini_entry->orig_value_length; ini_entry->modified = 0;...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息