DoS: Infinite loop processing 2.2250738585072011e-308
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | php |
Unknown
|
Unknown
|
||
| | php5 (Debian) |
Fix Released
|
Unknown
|
||
| | php5 (Fedora) |
Unknown
|
Unknown
|
||
| | php5 (Ubuntu) |
Undecided
|
Unassigned | ||
| | Lucid |
Undecided
|
Steve Beattie | ||
| | Maverick |
Undecided
|
Steve Beattie | ||
| | Natty |
Undecided
|
Unassigned | ||
Bug Description
Binary package hint: php5
Processing certain textual forms of MAX_FLOAT leads to an infinite loop/hang/DoS:
php -r "print 2.2250738585072
hangs indefinitely, whereas:
php -r "print 2.2250738585072
returns immediately.
Confirmed for natty/php5-
Fixed in new upstream releases:
http://
http://
| visibility: | private → public |
| description: | updated |
| Changed in php5 (Ubuntu Maverick): | |
| status: | New → Confirmed |
| Changed in php5 (Ubuntu Lucid): | |
| status: | New → Incomplete |
| Steven van der Vegt (s-vandervegt) wrote : | #2 |
And there's a patch:
Fix: http://
Test case: http://
Confirmed in Ubuntu 10.04 "lucid" using:
echo '<?php $d = 2.2250738585072
which hangs.
Ubuntu 8.04 "hardy" does not hang.
| Changed in php5 (Ubuntu Lucid): | |
| status: | Incomplete → Confirmed |
| description: | updated |
| Changed in php5 (Ubuntu Maverick): | |
| assignee: | nobody → Steve Beattie (sbeattie) |
| Changed in php5 (Ubuntu Lucid): | |
| assignee: | nobody → Steve Beattie (sbeattie) |
| Steve Beattie (sbeattie) wrote : | #4 |
I've confirmed that marking the double variables as volatile in maverick's php causes the infinite loop not to get triggered on i386 (and think I understand why that's the case). However, attempts to reproduce the issue with php from 9.10 (karmic), 8.04 (hardy), and 6.06 (dapper) fail for no apparent reason -- the zend_strtod.c code is nearly identical between karmic and lucid's versions. Does anyone have an indication as to what's different that woul cause this issue not to be triggered on older releases? Thanks.
| Daniel Hahler (blueyed) wrote : | #5 |
Maybe it is related to some compiler flags? (e.g. it can be worked around by using "-ffloat-store" in CFLAGS).
See http://
| description: | updated |
| Launchpad Janitor (janitor) wrote : | #6 |
This bug was fixed in the package php5 - 5.3.3-1ubuntu12
---------------
php5 (5.3.3-1ubuntu12) natty; urgency=low
* debian/
(LP: #697181)
-- Chuck Short <email address hidden> Fri, 07 Jan 2011 12:57:59 -0500
| Changed in php5 (Ubuntu Natty): | |
| status: | Confirmed → Fix Released |
| Changed in php5 (Debian): | |
| status: | Unknown → Fix Released |
| Launchpad Janitor (janitor) wrote : | #7 |
This bug was fixed in the package php5 - 5.3.3-1ubuntu9.2
---------------
php5 (5.3.3-1ubuntu9.2) maverick-security; urgency=low
* SECURITY UPDATE: open_basedir bypass
- debian/
php_
- CVE-2010-3436
* SECURITY UPDATE: NULL pointer dereference crash
- debian/
getting zip comment
- CVE-2010-3709
* SECURITY UPDATE: memory consumption denial of service
- debian/
longer than RFC 2821 allows
- CVE-2010-3710
* SECURITY UPDATE: xml decode bypass
- debian/
- CVE-2010-3870
* SECURITY UPDATE: memory disclosure
- debian/
length in mb_strcut()
- CVE-2010-4156
* SECURITY UPDATE: integer overflow can cause an application crash
- debian/
NumberFor
- CVE-2010-4409
* SECURITY UPDATE: infinite loop/denial of service when dealing with
certain textual forms of MAX_FLOAT (LP: #697181)
- debian/
as volatile to avoid x87 registers in zend_strtod()
- CVE-2010-4645
-- Steve Beattie <email address hidden> Wed, 05 Jan 2011 22:45:19 -0800
| Launchpad Janitor (janitor) wrote : | #8 |
This bug was fixed in the package php5 - 5.3.2-1ubuntu4.6
---------------
php5 (5.3.2-1ubuntu4.6) lucid-security; urgency=low
* SECURITY UPDATE: open_basedir bypass
- debian/
php_
- CVE-2010-3436
* SECURITY UPDATE: NULL pointer dereference crash
- debian/
getting zip comment
- CVE-2010-3709
* SECURITY UPDATE: memory consumption denial of service
- debian/
longer than RFC 2821 allows
- CVE-2010-3710
* SECURITY UPDATE: xml decode bypass
- debian/
- CVE-2010-3870
* SECURITY UPDATE: integer overflow can cause an application crash
- debian/
NumberFor
- CVE-2010-4409
* SECURITY UPDATE: infinite loop/denial of service when dealing with
certain textual forms of MAX_FLOAT (LP: #697181)
- debian/
as volatile to avoid x87 registers in zend_strtod()
- CVE-2010-4645
-- Steve Beattie <email address hidden> Fri, 07 Jan 2011 10:56:23 -0800
| Changed in php5 (Ubuntu Lucid): | |
| status: | Confirmed → Fix Released |
| Changed in php5 (Ubuntu Maverick): | |
| status: | Confirmed → Fix Released |


Confirmed on Ubuntu 10.10+ 32bit
php --version
PHP 5.3.3-1ubuntu9.1 with Suhosin-Patch (cli) (built: Oct 15 2010 14:17:04)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Suhosin v0.9.31, Copyright (c) 2007-2010, by SektionEins GmbH
see also: www.exploringbi nary.com/ php-hangs- on-numeric- value-2- 225073858507201 1e-308/
http://