Closed
Bug 1281482
(CVE-2017-5388)
Opened 9 years ago
Closed 8 years ago
WebRTC can be used to generate a large amount of UDP traffic for DDOS attacks (when using e10s)
Categories
(Core :: WebRTC: Networking, defect, P1)
Core
WebRTC: Networking
Tracking
()
People
(Reporter: fluffy, Assigned: bwc)
Details
(Keywords: csectype-dos, sec-low, Whiteboard: [post-critsmash-triage][adv-main51+])
Attachments
(2 files)
1.12 KB,
text/html
|
Details | |
5.49 KB,
patch
|
drno
:
review+
gchang
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
1. Create a large number of webkitRTCPeerConnection objects
2. Point the STUN server for ICE at the a the target to DDOS
3. Set them up with to start gathering stun address
A STUN packet is sent every 1 ms. This allows an attacker doing perhaps an add buy and using to have each browser display the add send about 500 kbps of UDP traffic to an IP and port of the attackers choosing and might contribute to a DDOS attack on say DNS servers.
Currently plan to talk about this at upcoming IETF which has a a draft deadline of July 8 but am happy to work with FF team to change that timing if needed. I am strongly committed to what is good for the WebRTC community do not want to do anything that would have any negative impact on FF.
Updated•9 years ago
|
Group: core-security → media-core-security
Comment 1•9 years ago
|
||
Phew, good thing we don't implement webkitRTCPeerConnection. I managed to get 3.5Mbps out of Firefox when I did this last.
Byron, we should be limiting to 8k bytes per second (64 kbps) [1], per content process (worth fixing? probably not). Does Cullen's report sound correct? Or did we neglect to rate limit gathering checks when we added the rate limit in bug 906384?
[1] http://searchfox.org/mozilla-central/source/media/mtransport/nr_socket_prsock.cpp#770-773
Flags: needinfo?(docfaraday)
Assignee | ||
Comment 2•9 years ago
|
||
STUN requests for gathering are rate limited just like ICE checks are. The problem is this rate limit does not apply for e10s. I doubt it makes sense to try to make the rate limit apply across all content processes right now, although if/when we start using more than one we might want to look into moving the rate limit into the parent process somehow.
Flags: needinfo?(docfaraday)
Updated•9 years ago
|
Keywords: csectype-dos,
sec-low
Comment 3•9 years ago
|
||
Byron - How much work would it be to implement/fix the limit in e10s? (ignoring the per-content-process thing, which I don't think I care about much if at all even if we turn on multiple content processes).
I think we do want to fix this very soon given the plans to ship e10s to production; and if the fix is simple enough uplift to Aurora.
Assignee: nobody → docfaraday
Rank: 15
Flags: needinfo?(docfaraday)
Priority: -- → P1
Updated•9 years ago
|
Summary: WebRTC can be used to generate a large amount of UDP traffic for DDOS attacks → WebRTC can be used to generate a large amount of UDP traffic for DDOS attacks (when using e10s)
Comment 5•9 years ago
|
||
[Tracking Requested - why for this release]: we plan to ship e10s in 48
Comment 6•9 years ago
|
||
Not tracking as it is a sec low, we are at the end of the cycle and the reporter is ok to delay the announce of the issue.
![]() |
||
Updated•9 years ago
|
tracking-e10s:
--- → +
Comment 7•9 years ago
|
||
Tracking for 49, while it's sec-low it sounds like it would be nice to fix in 49. We could still take a patch in beta. Byron are you able to take a look?
Assignee | ||
Comment 8•9 years ago
|
||
I've got other stuff I'm juggling at the moment. I might be able to later today or next week.
Flags: needinfo?(docfaraday)
Comment 9•9 years ago
|
||
Wontfix for 49 as we are now heading into beta 8. We could still potentially take a patch in aurora.
Hi Jesup, Byron, I noticed that this bug is marked as a P1 issue. Do we have a fix in the works? I'd be happy to take an uplift in Beta50 for it if deemed safe.
Flags: needinfo?(rjesup)
Flags: needinfo?(docfaraday)
Assignee | ||
Comment 11•8 years ago
|
||
Nothing in progress yet, but I can toss something together today.
Flags: needinfo?(docfaraday)
Assignee | ||
Comment 12•8 years ago
|
||
.
Assignee | ||
Comment 13•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8793812 -
Flags: review?(drno)
Comment 14•8 years ago
|
||
Comment on attachment 8793812 [details] [diff] [review]
Extend STUN rate limit to e10s sockets
Review of attachment 8793812 [details] [diff] [review]:
-----------------------------------------------------------------
::: media/mtransport/nr_socket_prsock.cpp
@@ +788,5 @@
> +#endif
> + }
> +
> + // Take len tokens from both buckets.
> + // (not threadsafe, but no problem since this is only called from STS)
In e10s case this is not going to be called on STS. Is that a problem?
Assignee | ||
Comment 15•8 years ago
|
||
(In reply to Nils Ohlmeier [:drno] from comment #14)
> Comment on attachment 8793812 [details] [diff] [review]
> Extend STUN rate limit to e10s sockets
>
> Review of attachment 8793812 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: media/mtransport/nr_socket_prsock.cpp
> @@ +788,5 @@
> > +#endif
> > + }
> > +
> > + // Take len tokens from both buckets.
> > + // (not threadsafe, but no problem since this is only called from STS)
>
> In e10s case this is not going to be called on STS. Is that a problem?
Hmm. I think in the e10s case, this code will be called only from one thread, on the content process. So I think we're ok, although the comment should probably be corrected.
Assignee | ||
Comment 16•8 years ago
|
||
Actually, it is called from STS in both cases, just different processes. So we should be good.
Comment 17•8 years ago
|
||
Comment on attachment 8793812 [details] [diff] [review]
Extend STUN rate limit to e10s sockets
Review of attachment 8793812 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM
Attachment #8793812 -
Flags: review?(drno) → review+
Assignee | ||
Comment 18•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/2f21fdc94dcfb4635ed5218ea3d2dd43fb332d07
Bug 1281482: Extend STUN rate limit to e10s sockets. r=drno
Comment 19•8 years ago
|
||
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Hi Byron, Dan, should we uplift this fix to Beta50?
Flags: needinfo?(dveditz)
Flags: needinfo?(docfaraday)
Comment 21•8 years ago
|
||
Hi Byron and Dan,
and 51 aurora?
Assignee | ||
Comment 22•8 years ago
|
||
It is a pretty low-impact bug, to be honest. I could be convinced otherwise.
Flags: needinfo?(docfaraday)
Comment 23•8 years ago
|
||
It's mostly low-impact (and hard for people to find!), but it's also quite low-risk (mostly just encapsulating a bit of code in a function, and calling it from one additional place).
Should go for at least 51, and 52 seems reasonable. I might rate it higher than low, since e10s is on by default. Not crit, but medium at least; perhaps high.
Flags: needinfo?(rjesup) → needinfo?(docfaraday)
Assignee | ||
Comment 24•8 years ago
|
||
Comment on attachment 8793812 [details] [diff] [review]
Extend STUN rate limit to e10s sockets
Approval Request Comment
[Feature/regressing bug #]:
Present since webrtc landed.
[User impact if declined]:
Content will be able to cause the browser to saturate the upstream at an arbitrary IP:port over UDP.
[Describe test coverage new/current, TreeHerder]:
None.
[Risks and why]:
Pretty low. Just moving some code around, and calling it in one additional place.
[String/UUID change made/needed]:
None.
Flags: needinfo?(docfaraday)
Attachment #8793812 -
Flags: approval-mozilla-aurora?
Updated•8 years ago
|
Group: media-core-security → core-security-release
Thanks guys, this is now a wontfix for Fx50.
Comment 26•8 years ago
|
||
Comment on attachment 8793812 [details] [diff] [review]
Extend STUN rate limit to e10s sockets
Fix a sec issue. Take it in 51 aurora.
Attachment #8793812 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 27•8 years ago
|
||
Comment 28•8 years ago
|
||
wontfix on 50 and taking in 51 LGTM.
Flags: needinfo?(dveditz)
Comment 21 is private:
false
Updated•8 years ago
|
Flags: qe-verify-
Whiteboard: [post-critsmash-triage]
Updated•8 years ago
|
Whiteboard: [post-critsmash-triage] → [post-critsmash-triage][adv-main51+]
Updated•8 years ago
|
Alias: CVE-2017-5388
Updated•7 years ago
|
Group: core-security-release
You need to log in
before you can comment on or make changes to this bug.
Description
•