Closed Bug 2074787 Opened 1 month ago Closed 7 days ago

ECH silent failure and fallback for WebSocket connections

Categories

(Core :: Networking: WebSockets, defect, P2)

Firefox 156
defect

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: aleksandr.v.piskunov, Assigned: kershaw)

Details

(Whiteboard: [necko-triaged] [necko-priority-queue])

Attachments

(1 external file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:156.0) Gecko/20100101 Firefox/156.0

Steps to reproduce

  1. Some webapp using websocket http1.1 upgrade connection (HomeAssistant, Gotify, whatever)
  2. Behind nginx reverse proxy, ECH enabled, valid DNS HTTPS ECH record.
  3. Firefox 156, fresh profile.
  4. Wireshark watching for TLS Hello

Actual results

ECH works for plain HTTPS connections (HTTP 1.1, HTTP2 or HTTP3 - doesn't matter), only outer SNI is visible in Wireshark dumps. F12 DevTools show ECH=true.
ECH silently fails for websocket connections, falling back and leaking actual SNI. DevTools show ECH=false.

Setting network.dns.force_use_https_rr=true fixes this problem, websocket connections get correct ECH.

Expected results

As long as there is a HTTPS ECH record, every connection to that particular host should either get a correct ECH, renegotiate old/expired one, or fail visibly.

Silent fallback to non-encrypted SNI must not occur under any circumstances.

The Bugbug bot thinks this bug should belong to the 'Core::Networking: WebSockets' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Networking: WebSockets
Product: Firefox → Core

Kershaw, could you have a look?

Flags: needinfo?(kershaw)

This bug happens because we don’t allow HTTPS RR here for WebSocket connections. Enabling Happy Eyeballs should resolve it.
I’ll still create a patch to fix it when HE is disabled, since HEv3 isn’t enabled everywhere yet.

Severity: -- → S3
Flags: needinfo?(kershaw)
Priority: -- → P2
Whiteboard: [necko-triaged] [necko-priority-queue]
Assignee: nobody → kershaw
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

There is an r+ patch which didn't land and no activity in this bug for 1 week.
:kershaw, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(kershaw)
Flags: needinfo?(kershaw)
Pushed by kjang@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a4407469d026 https://hg.mozilla.org/integration/autoland/rev/e0673a1ccf1c Use HTTPS RR for WebSocket upgrades without Happy Eyeballs, r=necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 7 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: