Closed Bug 1702512 Opened 3 years ago Closed 3 years ago

Cannot connect to TURN/STUN on port 53

Categories

(Core :: WebRTC: Networking, defect)

Firefox 87
defect

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: alex, Assigned: bwc)

References

Details

Attachments

(2 files)

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

Steps to reproduce:

  1. go to https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
  2. add a stun or turn url supposedly listening on port 53
  3. hit "gather candidates"

Actual results:

A generic NS_ERROR_UNEXPECTED is returned. Gathering fails.

Expected results:

Gathering should not fail. UDP port 53 is frequently used for TURN to get through firewalls.

This recent commit introduced the issue: https://hg.mozilla.org/mozilla-central/rev/8471b70b4df960d3599dcd951f0b05fb4f7bd420.

Now the bad port list specified in netwerk/base/nsIOService.cpp is always checked unless the specified port is included in the gGoodWebrtcPortList here: https://searchfox.org/mozilla-central/rev/b7b156e53643f0237f3e98a76e5fc7fa9e3b4e71/dom/media/webrtc/jsapi/MediaTransportHandler.cpp#291

Maybe just adding 53 to that list is enough?

The same issue was also raised in Chromium, and port 53 has been whitelisted: https://bugs.chromium.org/p/webrtc/issues/detail?id=12581

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

Component: Untriaged → Networking
Product: Firefox → Core

:freddy, your thoughts?

Flags: needinfo?(fbraun)
See Also: → 1702163, 1529588
Component: Networking → WebRTC: Networking

The reasoning in https://bugs.chromium.org/p/webrtc/issues/detail?id=12581#c7 makes sense for STUN/TURN specifically.
Hence, I'd cautiously agree with the reporter's suggestion to allow-list port 53 in gGoodWebrtcPortList.

Flags: needinfo?(fbraun)
Assignee: nobody → docfaraday

This is sometimes used by deployments that want to work around NATs that
block UDP.

Depends on D110948

Try looks good.

Pushed by bcampen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8c3f9ec22b9a
Test cases for bug. r=mjf
https://hg.mozilla.org/integration/autoland/rev/e67f580f2ec8
Add 53 to the list of allowed ports for webrtc. r=mjf
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: