Open Bug 1807694 Opened 3 years ago Updated 2 years ago

Resource exhaustion by creating very large DOM from loop

Categories

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

defect

Tracking

()

UNCONFIRMED

People

(Reporter: alisyarief.404, Unassigned)

References

Details

(Keywords: dupeme, reporter-external, Whiteboard: [reporter-external] [client-bounty-form] [verif?])

Attachments

(1 file)

Attached file MemoryLeaks.html

Memory Leaks Firefox Browser

A memory leak in a browser can occur when JavaScript code or Firefox Browser allocate memory for use, but fail to properly release it when it is no longer needed. This can cause the browser to use more and more memory over time, eventually leading to performance issues or even crashing.

Repro Steps
macOS Monterey : 12.6.2 (21G320)
Firefox Version : 108.0.1 (64-bit)

Victim Click "Create Elements" button and then create a large number of div elements and append them to the container element.

This elements are never removed from the DOM, Firefox Browser will continue to allocate memory for them even though they are no longer needed.
As a result, the browser's memory usage will increase with each click of the button, potentially leading to a memory leak.

File Script in Attachment

Video POC : https://drive.google.com/file/d/1_SiuzsojtyAs86tdmQDR7ncZKl9iJMBx/view?usp=sharing

Thanks

Flags: sec-bounty?

Resource exhaustion is not a security problem in browsers. This is a common pattern in today's "infinite scroll" style web applications. Browsers need to strike a balance between punishing "greedy" pages (killing them is often the only workable choice) and showing the user as much of the content they requested as possible.

Different browsers balance things in different ways and at different times (e.g. how often does the "garbage collector" run?) but this testcase should behave similarly on all browsers.

Group: firefox-core-security
Component: Security → DOM: Core & HTML
Keywords: dupeme
Product: Firefox → Core
Summary: Memory Leaks Firefox Browser macOS → Resource exhaustion by creating very large DOM from loop
See Also: → 1807826
Severity: -- → S3
Flags: sec-bounty? → sec-bounty-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: