Closed Bug 1850200 (CVE-2023-6211) Opened 1 year ago Closed 1 year ago

HTTPS-Only mode bypass through clickjacking

Categories

(Core :: DOM: Security, defect, P3)

defect

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox118 --- wontfix
firefox119 --- wontfix
firefox120 --- fixed

People

(Reporter: sdna.muneaki.nishimura, Assigned: maltejur)

References

(Blocks 1 open bug, )

Details

(Keywords: csectype-clickjacking, reporter-external, sec-low, Whiteboard: [adv-main120+][reporter-external] [client-bounty-form] [verif?][domsecurity-active])

Attachments

(4 files)

As well as the TLS certificate exception screen pointed out by CVE-2023-34414, HTTPS-Only mode disable button does not have activation-delay implemented. This could be used for clickjacking with human response time delays.

In the following example site, when the mouse touches the button labeled Click Me, the screen switches to the HTTPS-Only Mode warning page. If the user presses the button even a little late, the button to disable HTTPS-Only Mode is inadvertently pressed, and the page transition to the http: page is succeeded.
https://csrf.jp/2023/https-only/

Flags: sec-bounty?

A big part of bug 1695986 was the ability to gum up the graphics pipeline to make the clickjacking more reliable (the button wasn't drawn until well after it started accepting clicks), but when we were updating aboutNetError.js we should have checked all the other panel types for the same issue.

Group: firefox-core-security → core-security
Component: Security → DOM: Security
Keywords: sec-moderate
Product: Firefox → Core
Group: core-security → dom-core-security
Flags: needinfo?(mjurgens)
Keywords: csectype-spoof

I can work on this. For the timeout value we should probably use the existing security.dialog_enable_delay, although I feel like one second is a bit excessive and could possibly be an annoyance for some users. Also Dan, can you add me to the CC of the bug you mentioned and that is linked in the CVE? I currently do not have access to that.

Assignee: nobody → mjurgens
Status: NEW → ASSIGNED
Flags: needinfo?(mjurgens) → needinfo?(dveditz)

Added you to that bug. We should definitely use the standard pref. Arguments about the length of the delay are a separate issue and largely apply the same to all the places. By using the same pref all can be adjusted at once.

I'd argue that using "inert" instead of "disabled" would be better: Users notice when it's greyed out and then changes; with inert it would look exactly the same and the only people who notice (because the click did nothing) would be those who were about to be tricked.

Flags: needinfo?(dveditz)
Severity: -- → S3
Priority: -- → P3
Whiteboard: [reporter-external] [client-bounty-form] [verif?] → [reporter-external] [client-bounty-form] [verif?][domsecurity-active]
Attachment #9352460 - Attachment description: Bug 1850200 - Add test for HTTPS-Only clickjack delay r?freddyb → Bug 1850200 - Add test for delay on HTTPS-Only "Continue to HTTPS Site" button r?freddyb

Okay, I have decided to go with inert then for the disabled button, as I also think that works better. Since both inert and disabled are now used in different places, which is a bit inconsistent, I've opened a follow-up bug 1852949 to change all occurrences to inert.

Pushed by fbraun@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/32dbea1b0b91 Add delay to HTTPS-Only "Continue to HTTPS Site" button r=freddyb https://hg.mozilla.org/integration/autoland/rev/0bc9cdf35784 Add test for delay on HTTPS-Only "Continue to HTTPS Site" button r=freddyb

Backed out for failing toolkit/components/httpsonlyerror/tests/browser/browser_exception.js:
https://hg.mozilla.org/integration/autoland/rev/49a7e292daad5c6727d745e6910b8bde5c3f59a6

push with failures
failure log

TEST-UNEXPECTED-FAIL | toolkit/components/httpsonlyerror/tests/browser/browser_exception.js | Test timed out -

There are also this TV failure and that other TV failure, please check them before re-landing.

Flags: needinfo?(mjurgens)

Flaky tests are annoying.... Maybe we can remove the setTimeout/waits and use MutationObserver instead? :/

Thanks for the tip! I've used MutationObserver to fix browser_exception.js, and simplified browser_continue_button_delay.js so that it only checks wether there is a inert or disabled attribute on the button, and not what happens when you actually click on the button. Can you try to land the patch again Freddy? (if the tests look good to you)

Flags: needinfo?(mjurgens) → needinfo?(fbraun)

Maybe I misunderstood, or my explanation wasn't super clear.

I was thinking of using the MutationObserver in /browser_continue_button_delay.js to check for an attribute change (inert set/unset), rather than wait(). That would remove unnecessary test time and give you an immediate callback (where you would then have to measure the elapsed time)

Flags: needinfo?(fbraun)

Ah I see, that also makes sense, and sounds like the best way to do it. I'll change the test to do that.

Pushed by fbraun@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/987b1ef7afa3 Add delay to HTTPS-Only "Continue to HTTPS Site" button r=freddyb https://hg.mozilla.org/integration/autoland/rev/6da1ce80e10c Add test for delay on HTTPS-Only "Continue to HTTPS Site" button r=freddyb
Backout by imoraru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6d2252448523 Backed out 2 changesets for causing bc failures on browser_continue_button_delay.js. CLOSED TREE
Flags: needinfo?(mjurgens)
Pushed by fbraun@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/62ac1e644213 Add delay to HTTPS-Only "Continue to HTTPS Site" button r=freddyb https://hg.mozilla.org/integration/autoland/rev/4c5c17a49e40 Add test for delay on HTTPS-Only "Continue to HTTPS Site" button r=freddyb
Group: dom-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch

The patch landed in nightly and beta is affected.
:mjurgens, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox119 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(mjurgens)
Flags: needinfo?(mjurgens)

After looking at this closely, we think this is more accurately a low because the attack scenarios require a network vantage point and/or a user-trusted service that operates over HTTP. Additionally, this is an non-default opt-in feature.

Keywords: sec-moderatesec-low
Flags: sec-bounty? → sec-bounty+
QA Whiteboard: [post-critsmash-triage]
Flags: qe-verify-
See Also: → 1852949
Whiteboard: [reporter-external] [client-bounty-form] [verif?][domsecurity-active] → [adv-main120+][reporter-external] [client-bounty-form] [verif?][domsecurity-active]
Alias: CVE-2023-6211

Bulk-unhiding security bugs fixed in Firefox 119-121 (Fall 2023). Use "moo-doctrine-subsidy" to filter

Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: