New issue
Advanced search Search tips

Issue 740066 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Feature



Sign in to add a comment

DOSing IndexedDB API calls will freeze the browser

Reported by cgerv...@camcloud.com, Jul 7 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Steps to reproduce the problem:
1. Open the included html page
2. Run the code by clicking "I consent" button on the page
3. Your browser will become unresponsive in the tab, for a period of time. This can be extended to cause effectively a Denial of Service attack on the tab, once consent is given try to do anything on the page (ie, select text, scroll, etc), it will fail to respond

What is the expected behavior?
Theory is, it should throttle or rate-limit the storage requests to prevent a crash

What went wrong?
It did not throttle or rate limit, and ultimately crashes the browser. This effects the major three browsers (Chrome/Chromium, Firefox, Edge), there should be some sort of rate-limiting to throttling in-place to prevent a crash attack

Did this work before? No 

Chrome version: 59.0.3071.115  Channel: stable
OS Version: 10.0
Flash Version: N/A
 
consent.html
2.2 KB View Download
Ultimate result when it's looped attached (works on both Chrome lastest and Canary)
poc4.png
16.9 KB View Download
Screen of crash (takes about 1 minute to fully crash)
poc-cr-crash-1.png
13.5 KB View Download
It also can eat 2+ GB of memory and over 40% cpu.
poc-cr-crash-2.png
12.8 KB View Download
poc-cr-crash3.png
13.4 KB View Download
poc-cr-crash-4.png
8.1 KB View Download
Components: Blink>Storage>IndexedDB
Can you supply the ServerID of the crash from chrome://crashes ? We do not track DoS-only issues as security bugs, so this will help us understand exploitability.

For DOMStorage, we deliberately crash the tab if an unreasonable number of storage actions are attempted; I don't know if IndexedDB has a similar protection.

With 64bit Chrome 61.0.3150.1, I'm not able to reproduce a tab crash; the browser becomes unresponsive for under a minute, then behaves normally.
Crash ID a7d2f121-d8ce-42ec-9943-4a96564f494e
Local Crash ID 016e9961-a432-4662-9310-81f4bebd4d5b

Crash report captured on Friday, July 7, 2017 at 8:41:38 AM (upload requested by user, not yet uploaded)

Local Crash ID 7797d8d0-db51-4faf-8e49-4bbfd283fba2

Crash Report ID 87e4d518b8000000 (Local Crash ID: 1838911c-b1cf-4f0a-8fca-cc75dc0f4552)

Try this file, I updated it to crash the entire browser instead of brief unresponsive.
consent.html
2.4 KB View Download
If you open task manager while running it (on Windows) you'll see the RAM and CPU usage spike as well, while the browser is non-responsive, and doesn't deliberate crash the tab (or, prompt to) for a few minutes.
I agree with elawrence@, we generally don't treat these as security bugs.
I'm inclined to mark it as regular bug and let component owner to decide how to proceed from here. 

elawrence@, WDYT?


It can be throttled to make it so Chrome doesn't cause the deliberate tab crash, while still eating CPU/RAM up, which eventually when it exhausts all the ram and CPU the machine will cease function as it's eaten all available resources
Labels: -Type-Bug-Security -Restrict-View-SecurityTeam -Via-Wizard-Security Type-Feature

Comment 10 by woxxom@gmail.com, Jul 8 2017

Some observations using consent.html from c#5.

* 32-bit Chrome 61.0.3141.7 dev.
  For some reason it didn't display Wait/Kill at all and [expectedly] crashed entirely.
  Crash Report ID af605aacb8000000
  Stack trace shows IndexedDB -> LevelDB -> malloc -> NoMemory exception path.
  Obviously the related code should be fixed to crash the tab before depleting main process memory.

* 64-bit Chrome 61.0.3152.0 canary.
  Crashes only 1 tab.
  Apparently because there is a hardcoded limit for a tab process at 3.5GB.

* The "Wait / Kill" dialog could display the current CPU & memory usage updated each second.
  Currently it's not obvious to a user that there's an unrecoverable problem.
  Seeing the memory grow past 1GB in less than a minute would be more obvious.
  This warning can also be displayed when the tab memory usage grows to 2GB (once).
Cc: pwnall@chromium.org
Owner: dmu...@chromium.org
Status: Assigned (was: Unconfirmed)
dmurph@, pwnall@ - please take a look

We've put some rate limiting in place already but we know it's not comprehensive.
Issue 740351 has been merged into this issue.
Summary: DOSing IndexedDB API calls will freeze the browser (was: Browser Tab Crash via indexedDB overload)
Cc: dmu...@chromium.org
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment