Critacal flaw in Mozilla based browsers
Posted: 2005-04-06 02:46am
Get your fill of sci-fi, science, and mockery of stupid ideas
http://stardestroyer.dyndns-home.com/
http://stardestroyer.dyndns-home.com/viewtopic.php?f=24&t=66074
Yep. That's what happens when you try to access memory that doesn't belong to you. Seg. fault/core dump.Praxis wrote:Weird. It worked, showing some sites I had just been to. I clicked a couple more times and suddenly Firefox crashed.
Code: Select all
function genGluck(str){
var x = str;
var rx=/end/i;
x = x.replace(rx,function($1){
$1.match(rx);
return "";
});
x = x.replace(/^end/,"");
return x;
}
function readMemory()
{
var mem = genGluck("XXXend");
mem = mem.replace(/[^\.\\\:\/\'\(\)\"\_\?\=\%\&\;\#\@\- a-zA-Z0-9]+/g, " ");
document.getElementById('result').value = mem;
}
The last regexp is doing the reverse of what you say: it's keeping only the human-readable characters, and replacing unprintable characters with a space. Note the '^' at the front of the set; it's matching characters in the complement of that set.Dooey Jo wrote: Now, how the hell does that work? That first regexp up there should replace "end" with nothing, right? And the second regexp replaces all "end" with something before with nothing, so all that basically does is removes that last "end". And that last, mem.replace, should replace most readable characters with a blank space, so why does it write characters from the memory?
Ah yes, right you are! *cleans glasses*Spacebeard wrote:The last regexp is doing the reverse of what you say: it's keeping only the human-readable characters, and replacing unprintable characters with a space. Note the '^' at the front of the set; it's matching characters in the complement of that set.
Yes, that is what I find strange. That function should just replace the match with nothing, it should not make memory accessible. Well, I guess that's why it's a bug...The bug is exploited in the 'genGluck' function. I'm not familiar with Javascript, but it looks as though by using a lambda function as the argument to 'replace' as they do, they are able to read off the end of their allocated string and into the heap. Probably the memory accessible to them depends on where in the heap their string got allocated.
Java is not the same as JavaScript.The Dark wrote:*shrug* I don't have Java installed for my Firefox anyway (at least, I don't think I do). I still use IE for Java work because the webpages I work on recognize my copy of it. I wonder if ZoneAlarm blocks that security hole...
Doh! . I can't read today. That's what comes of reading through multiple things at work, none of them get read completely correct.Uraniun235 wrote:Java is not the same as JavaScript.The Dark wrote:*shrug* I don't have Java installed for my Firefox anyway (at least, I don't think I do). I still use IE for Java work because the webpages I work on recognize my copy of it. I wonder if ZoneAlarm blocks that security hole...
For example, both Google Maps and Gmail heavily use JavaScript. The technology is generically known as Ajax, or "Asynchronous JavaScript + XML."Dooey Jo wrote:Javascript can be very useful, too. Most websites would be a lot less functional without it (for most people anyway). It sucks though that there are people out there that use it to do bad stuff, but I guess that's just the way humans are. Someone comes up with a great idea and someone else have to use it do annoy the shit out of others...