Open Bug 1487533 Opened 6 years ago Updated 2 years ago

Canceling DNS requests are forgeable by rogue Content Process

Categories

(Core :: Networking: DNS, enhancement, P2)

enhancement

Tracking

()

Fission Milestone Future

People

(Reporter: tjr, Assigned: valentin)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

(Low priority, but illustrative) In https://searchfox.org/mozilla-central/source/netwerk/dns/PDNSRequest.ipdl, CancelDNSRequest takes a hostname and an OriginAttributes member. It will cancel any pending DNS request that it can find that matches that hostname, OriginAttributes and flags. While a content process legitimately needs to be able to look up any domain name it wants; the OriginAttributes should only correspond to a legitimate origin being used by that Content Process. A rogue content process could forge the OriginAttributes and result in canceling DNS requests made by other Content Processes. We should validate the OriginAttributes sent by the Content Process and ensure the host present matches the Content Process. I expected to find a corresponding method that _created_ a DNSRequest, but was not able to. If it does exist, it might be forgable also. It's a fairly low-power DOS attack, but it's illustrative of the concern.
I take it back, the corresponding creation method appears to be PDNSRequest(nsCString hostName, OriginAttributes originAttributes, uint32_t flags) in https://searchfox.org/mozilla-central/source/netwerk/ipc/PNecko.ipdl The OriginAttirbutes there needs to be validated as well.
Also HTMLDNSPrefetch and CancelHTMLDNSPrefetch in PNecko.ipdl
Summary: CancelDNSRequest is forgeable by rogue Content Process → Canceling DNS requests are forgeable by rogue Content Process
We should fix this. Daniel, do you have time?
Priority: -- → P2
Whiteboard: [necko-triaged]
What's the impact of this when used maliciously? Rogue content that guesses/knows the name resolves of another tab and kills them so that the other tab can't show images, load css etc? Possibly even not following links. And of course kill prefetch of the other tab?
Assignee: nobody → daniel
(In reply to Daniel Stenberg [:bagder] from comment #4) > What's the impact of this when used maliciously? Rogue content that > guesses/knows the name resolves of another tab and kills them so that the > other tab can't show images, load css etc? Possibly even not following > links. And of course kill prefetch of the other tab? That sounds right. It might even be more limited. when I tried to trace this code, it seemed like the DNS requests may only be generated by Prefetch code. I'm not certain though. As it is, this can't be fixed right now because we don't yet have the infrastructure to validate the OriginAttributes. Also, as I noted, this is pretty low priority comparatively to other fission IPC bugs.
Depends on: fission-ipc-map
Assignee: daniel → nobody

This bug is not a Fission MVP blocker.

Fission Milestone: --- → Future
Assignee: nobody → valentin.gosu
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.