SecurityReason.com - Our Reason is

Security

Register | Forget Password | Login
SecurityReason
WLB
Services
RSS
Corporate
Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Home arrow SecurityAlert Database

Arrow  Topic :

PHP unserialize() 64 bit Array Creation Denial of Service Vulnerability


Arrow  SecurityAlert : 2315
Arrow  CVE : CVE-2007-0988
Arrow  SecurityRisk : Medium  Security Risk Medium  (About)
Arrow  Remote Exploit : No
Arrow  Local Exploit : Yes
Arrow  Exploit Available : Yes
Arrow  Credit : Stefan Esser
Arrow  Published : 03.03.2007

Arrow  Affected Software : Affected is PHP 4.4.4/5.2.0 and below.



Arrow  Advisory Content :  

A user supplied serialized string might trigger on 64 bit systems a tight
endless loop within zend_hash_init() exhausting CPU ressources.

Before PHP 4.3.11 was released it was discovered that there is a problem in
the unserialize() function that could be exploited to produce a tight
endless loop inside zend_hash_init() through a negative array element count
stored inside the serialized string.

This was fixed by raising an error when a negative integer value was found
before it was passed to the zend_hash_init() function. When such a value
was passed down to that function is resulted in a shift left integer
overflow that caused a tight endless loop.

A while later there were troubles with unserialize() on 64bit systems which
resulted in several variables being changed from the 'int' to 'long' type.
Unfortunately zend_hash_init() still works with 'int's and therefore only
the lower 32 bit of the number are passed from unserialize() to
zend_hash_init().

Therefore the protection against negative element counts was no longer
working, because on a 64bit system a 32bit number inside a signed 'long'
can still be positive.
Proof of concept, exploit or instructions to reproduce

To reproduce it just try the following PHP code on a 64bit system.

<?php unserialize("a:2147483649:{"); ?>

Notes

PHP 4.4.5 and PHP 5.2.1 already contain fixes for this vulnerability.

You should also keep in mind that the script will still be terminated after
the maximum execution time. However when this time is for example set to 30
seconds and 10 requests are sent that trigger the endless loop, this will
result in a 100% CPU load situation for 5 minutes.





Arrow  Feedback :

If you have additional information or notice any errors regarding this security advisory, please use contact form or email us at info()securityreason()com.
Alert

libc/fnmatch(3) DoS

Security Risk Medium- 2011-05-13

Allow attacker to denial of service apache 2.2.17 server

Apache RSS Apache Alert

» Apache HTTP Server Denial
   of Service Vulnerability

» Multiple Vendors
   libc/fnmatch(3) DoS (incl
   apache poc)

» Apache Continuum
   cross-site scripting
   vulnerability

» Apache Tomcat DoS
   Vulnerability

PHP RSS PHP Alert

» PHP Hashtables Denial of
   Service

» PHP 5.3.6 multiple null
   pointer dereference

» PHP 5.3.6 ZipArchive
   invalid use glob(3)

» libzip 0.9.3
   _zip_name_locate NULL
   Pointer Dereference (incl
   PHP 5.3.5)

ADT

Protect your family and valuables with Home Security Systems

Copyright © SecurityReason.com. All Rights Reserved.