Most Java JVMs are prone to very serious denial of service (all JVMs for Oracle / Sun up to 1.6.0_24 [this is not at the time of this writing], and this did not get the HotFix that came out yesterday, for example).
http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
Following:
curl -H 'Accept-Language: en-us;q=2.2250738585072012e-308' http:
Tomcat web server lot crash on the planet.
My question is simple: who is to blame?
Apparently, getLocale() calls the (very badly) listened Double.parseDouble(...) , and then you can trivially execute the denial of service on Tomcat.
Is the error when executing Double.parseDouble(...) blame?
It seems to me that the real problem is that the HTTP specifications are using floating point numbers for something that really doesn't look very much like scientific calculations for me. Using a floating point number for such a thing seems more than strange: it is easy to prove that implementation in different languages will give different results.
So who is to blame?
Java is terribly lame (the error has been known since 10 years) implementation of Double.parseDouble(...) ?
HTTP specs? (remember that PHP got the same error).
I can understand that you blame a language if it happens with one language ... But when two remote denial of service attacks happen with two different languages due to the fact that the HTTP specifications dictate the parsing of floating point numbers for what something that is not a scientific calculation should call a bell.
Floating point numbers should only be used for scientific calculations . Unless you have floating point numbers and no epsilon, you are doing it wrong.
SyntaxT3rr0r
source share