Closed Bug 1690931 Opened 5 years ago Closed 5 years ago

Firefox bypasses system DNS lookup

Categories

(Core :: Networking: DNS, defect)

Firefox 84
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: carls, Unassigned)

Details

Attachments

(2 files)

Attached image twit.png

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

Steps to reproduce:

  1. Add (block) twitter.com to /etc/hosts:
    0.0.0.0 twitter.com
  2. Surf to https://twitter.com

I have cleared the cache and restarted Firefox.
I have disabled DNS over HTTPS.
Chromium as well as dig and nslookup correctly reports the failed lookup.

Actual results:

Twitter's login page loads

Expected results:

A DNS lookup error should be presented

Just upgraded to Firefox 85.0 and the problem persists.

Flags: needinfo?(carls)

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

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

(In reply to Robert Longson [:longsonr] from comment #2)

Have you disabled DNS over https? https://support.mozilla.org/en-US/kb/firefox-dns-over-https

Yes, DNS over HTTPS is disabled.

Flags: needinfo?(carls)

I can't reproduce this, so could you try to get the http log?
Thanks.

Flags: needinfo?(carls)

Hi Carl, thank you for the report.
Adding an entry to /etc/hosts should prevent us from using TRR - see bug 1616252
But maybe there is a bug in the implementation.

Could you post the contents of about:support here along with a HTTP log?
https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging
If possible, use a separate profile with no extensions.

Thanks!

Flags: needinfo?(carls)

(In reply to Valentin Gosu [:valentin] (he/him) from comment #6)

Hi Carl, thank you for the report.
Adding an entry to /etc/hosts should prevent us from using TRR - see bug 1616252
But maybe there is a bug in the implementation.

Could you post the contents of about:support here along with a HTTP log?
https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging
If possible, use a separate profile with no extensions.

Thanks!

Hmm, I can't reproduce it with another profile.
The only extension I've otherwise got running is uBlock Origin.
I've created logs for both profiles and if I'm reading them correctly, in both cases twitter.com resolves to 0.0.0.0
I have attached logs from both profiles and about:support from my own profile.

If I'm looking at the correct place in the log it seems that twitter is being loaded from the cache.
You can check this by clearing the HTTP cache.
Go to History -> Clear recent history -> Make sure that Cache is checked -> Clear
Note: be careful with what other boxes are checked if you care about preserving your browsing history.

Thanks!

Flags: needinfo?(carls)

(In reply to Valentin Gosu [:valentin] (he/him) from comment #11)

If I'm looking at the correct place in the log it seems that twitter is being loaded from the cache.
You can check this by clearing the HTTP cache.
Go to History -> Clear recent history -> Make sure that Cache is checked -> Clear
Note: be careful with what other boxes are checked if you care about preserving your browsing history.

Thanks!

I've tried clearing the cache and offline website data multiple times but the problem persists.
If I look in the cache directory, I can see there's a bunch of stuff still left there after clearing it, including several twitter logos and graphics from their login site.

Flags: needinfo?(carls)

Ah, I think I know what's going on here.
It's probably caused by the service worker.
It got registered before you added the /etc/hosts rule, then it gets loaded even when you clear the cache.
Could you check if going to about:serviceworkers and clicking unregister for the twitter worker fixes the issue? It should be unable to load after that.

Flags: needinfo?(carls)

That's the ticket, works as expected now. Thanks!

Flags: needinfo?(carls)

Thanks for looking into this. Cheers!

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: