Closed Bug 1913000 (CVE-2024-10464) Opened 2 years ago Closed 2 years ago

Browser chrome freeze on history API

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

VERIFIED FIXED
132 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr128 132+ verified
firefox130 --- wontfix
firefox131 --- wontfix
firefox132 + verified

People

(Reporter: andreien, Assigned: wwen)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

(Keywords: csectype-dos, reporter-external, sec-low, Whiteboard: [client-bounty-form] [adv-main132+] [adv-esr128.4+])

Attachments

(2 files, 2 external files)

The browser chrome (mostly) freezes when busy loop updating the scrollRestoration string.

This is the same bug as https://bugzilla.mozilla.org/show_bug.cgi?id=1314912, but instead can be reproduced on Firefox 129 with the following slightly different setup:

while (1) {
  history.scrollRestoration = "auto"
}

The effect is the same, the browser chrome is mostly frozen, and the parent process seems to be affected.

I have reproduced on different operating systems. I assume this bug should be sec-low.

Flags: sec-bounty?
Group: firefox-core-security → dom-core-security
Component: Security → DOM: Navigation
Product: Firefox → Core

I guess nsHistory::SetScrollRestoration could use a CheckLocationChangeRateLimit check.

Flags: needinfo?(pbz)

Yes, we could cover that field as well. Most likely this IPC call causes the DoS: https://searchfox.org/mozilla-central/rev/e942f7bc56cd103bba86b396ddeba5b1ab04f1a4/docshell/base/nsDocShell.cpp#11544

There are many APIs which can be DoSed like that, not sure if this is worth fixing on a case-by-case basis. For the history interface we've done it before so I'm not opposed to it.

William, would you like to take this bug? See Bug 1314912 and comment 1 for context.

Flags: needinfo?(pbz) → needinfo?(wwen)

yeah, on IPC side there would be likely many similar cases.

Yeah, I can definitely take this bug. I'll take a look later today.

Flags: needinfo?(wwen)

Thanks!

Assignee: nobody → wwen
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Severity: -- → S3
Blocks: eviltraps
Attachment #9423030 - Attachment description: Bug 1913000 = Add more rate limiting to History interface. r=pbz → WIP: Bug 1913000 - Add more rate limiting to History interface. r=pbz
Attachment #9423030 - Attachment description: WIP: Bug 1913000 - Add more rate limiting to History interface. r=pbz → Bug 1913000 - Add more rate limiting to History interface. r=pbz
Pushed by pzuhlcke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8cee2583590d Add more rate limiting to History interface. r=webidl,smaug,webdriver-reviewers,whimboo
Group: dom-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
Flags: sec-bounty? → sec-bounty-

Please nominate this for ESR128 approval when you get a chance. It grafts cleanly.

Flags: needinfo?(wwen)
Attachment #9428297 - Flags: approval-mozilla-esr128?
Attached file test.html —

Test site for QA to verify bug

esr128 Uplift Approval Request

  • User impact if declined: Possible DOS slowing or crashing browser
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: Open the test.html file attached in the bug, the browser chrome should not slow down or freeze
  • Risk associated with taking this patch: Low
  • Explanation of risk level: Rate limit is not aggresive, low potential for breakage. No breakage seen from rate limiting existing APIs
  • String changes made/needed: No
  • Is Android affected?: yes
Flags: qe-verify+
Flags: needinfo?(wwen)
Attachment #9428297 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+
Flags: in-testsuite+
QA Whiteboard: [post-critsmash-triage]

Using an old Nightly build from 2024-08-12 I get a OOM crash when using the attached testcase https://crash-stats.mozilla.org/report/index/6e8fd41e-64ce-4fb1-8d07-c93f70241018, verified that using latest Firefox Beta 132.0b7 and latest 128esr build from treeherder across platforms (Windows 11, macOS 13 and Ubuntu 22.04) the testcase does not crash anymore and it just displays the string "Welcome to My Simple jQuery Page" in the tab content.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Whiteboard: [client-bounty-form] → [client-bounty-form] [adv-main132+] [adv-esr128.4+]
Alias: CVE-2024-10464
Flags: sec-bounty-hof+
Group: core-security-release
Regressions: 1966845
Regressions: 2011507
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: