Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

MSIE integer overflows

From: Berend-Jan Wever <SkyLined(at)edup.tudelft.nl>
Date: Sun May 11 2003 - 17:03:34 EDT


Hi,

I've been testing MSIE for integer overflows in the DOM and jscript. I've found quite a few in one night testing. Nothing serious (yet) but since IE seems to be riddled with them there's got to be a few that can be exploited.

A few examples of buggy jscript:
Integers seem to be 62 bit long:

    var i = 32*256*256 * 256*256*256*256-1;     document.write((i==++i) + ' ' + (i==++i) + '<BR>'); prints:
false true

But array functions run into problems around 32 bits:

    var i = 128*256*256*256-3;
    var a = new Array();
    a[i]=1;

    document.write(a.push('a')+'
'); document.write(a.push('b')+'
'); document.write(a.push('c')+'
'); document.write(a.pop()+'
'); document.write(a.pop()+'
'); document.write(a.pop()+'
');

prints:
2147483647
-2147483648
-2147483647

undefined
b
a

I've been trying to think where I can find an integer that will cause troubles if it overflows, but I have not found anything... anybody got any idears ?

Cheers,

Do you need help?X

Berend-Jan Wever
http://spoor12.edup.tudelft.nl Received on Mon May 12 16:52:09 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:39 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library