Don't let Android leak DNS queries
In legacy/trac#27431 (moved) and legacy/trac#27375 (moved), it was reported Android is leaking DNS requests. From [ticket:27431#comment:1 27431], in summary:
This is exactly what we feared. It looks like this is the result
of a bug within the Android core HTTP library. This leak is already
fixed in the more recent releases of Android. In particular, any
version after Android O (API 26+) should not leak DNS queries.
We should patch TBA so it relies on the Android core library as little as possible. We don't need the fancy optimizations Android provide with request pools and such, so I think we can simply create and manage a proxy connection ourselves.
legacy/trac#27822 (moved) maybe related (but there isn't enough info available).
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Matthew Finkel added TorBrowserTeam201810R in Legacy / Trac component::applications/tor browser in Legacy / Trac owner::tbb-team in Legacy / Trac parent::5709 in Legacy / Trac priority::immediate in Legacy / Trac resolution::fixed in Legacy / Trac severity::normal in Legacy / Trac sponsor::8 in Legacy / Trac status::closed in Legacy / Trac tbb-mobile in Legacy / Trac tbb-proxy-bypass in Legacy / Trac type::defect in Legacy / Trac labels
added TorBrowserTeam201810R in Legacy / Trac component::applications/tor browser in Legacy / Trac owner::tbb-team in Legacy / Trac parent::5709 in Legacy / Trac priority::immediate in Legacy / Trac resolution::fixed in Legacy / Trac severity::normal in Legacy / Trac sponsor::8 in Legacy / Trac status::closed in Legacy / Trac tbb-mobile in Legacy / Trac tbb-proxy-bypass in Legacy / Trac type::defect in Legacy / Trac labels
-I made comment in legacy/trac#27822 (moved) and indeed i was using android o sdk 27 -so again i tested tor on android 7.1 -dns leaks on 7.1 -latest alpha leaks dns -but orfox is running fine does not leaks dns at all
Trac:
Username: new_user- Developer
Trac:
Keywords: N/A deleted, tbb-proxy-bypass added
Priority: Very High to Immediate - Author
I have branch
28125
on my public repo. I haven't confirmed it prevents all leaks, yet (but it should). It simply prevents all non-Necko connections. A better patch will take some more time.Trac:
Status: new to needs_review - Author
Replying to new_user:
-I made comment in legacy/trac#27822 (moved) and indeed i was using android o sdk 27 -so again i tested tor on android 7.1 -dns leaks on 7.1 -latest alpha leaks dns -but orfox is running fine does not leaks dns at all
Are you using a physical device or an emulator?
- Developer
Trac:
Keywords: N/A deleted, TorBrowserTeam201810R added @sysrqb yes i used real device in all tests
and this app- https://f-droid.org/en/packages/org.adaway/
did not captured whole packet just dns.
although we can use binary for full capture witch comes with lineage os or you can install [https://f-droid.org/en/packages/com.termux/] and use tcpdump with root.
Trac:
Username: new_user- Developer
Replying to sysrqb:
I have branch
28125
on my public repo. I haven't confirmed it prevents all leaks, yet (but it should). It simply prevents all non-Necko connections. A better patch will take some more time.Looks good to me. Do we have an understanding about what those changes break (we'd need to mention that at least in our blog post).
igt0: could you give it a round of testing on your devices, so we can start getting the Firefox security updates to android.
- Author
Replying to new_user:
and one question why orfox was not leaking dns or my test was flawed??
i am just an end user, so wanna know expert's opinion should i continue to use orfox
Yes, Orfox uses a different Proxy type (HTTP CONNECT, instead of SOCKS5).
For all my tests I have been using a real device connected to my computer and I am using mitmproxy(https://mitmproxy.org/) to debug http(s) protocol and wireshark for non tls stuff.
mobile/android/geckoview/src/thirdparty/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java Steps:
- Open https://bitmovin-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8 or https://content.jwplatform.com/manifests/yp34SRmf.m3u8
- Look for connections to both URLs.
Result: I was not able to verify any connection open for those URLs.
mobile/android/base/java/org/mozilla/gecko/updater/UpdateService.java
Test cases:
- Enabled MOZ_UPDATER
- Click in the check for updates button
- Verify if any connection was made to the update URL
Result: No request was made
mobile/android/base/java/org/mozilla/gecko/CrashReporter.java Not able to test.
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoMediaDrmBridgeV21.java
It is disabled in our prefs and we don't plan to enable soon. So I didn't test it.
- Author
Great, thanks! I think the most noticeable change resulting from this patch is that favicons are not downloaded.
The patch prevents connections for the following functionality:
- Sending Crash reports (already disabled) -
CrashReporter.java
- Search suggestions (SuggestClient.java)
- Pocket (already broken, needs API key) -
PocketStoriesLoader.java
- After installation from Google Play (under certain conditions) -
Distribution.java
- Downloadable Content (Disabled at compile time) -
dlc/BaseAction.java
- Top/Suggested Sites -
ImageLoader.java
- (Fav)Icon download per tab -
IconDownloader.java
- Region-specific search engine (always default in TBA because missing API key) -
SearchEngineManager.java
- Download A/B testing framework config (already disabled) -
Switchboard.java
As a result, the newly broken functionality includes Image downloading for Top/Suggested sites and favicon download.
- Sending Crash reports (already disabled) -
- Developer
Okay, the broken functionality is not great but I think we should pick what we have. commit 2c4b103c on
tor-browser.60.3.0esr-8.5-1
has the fix.Trac:
Status: needs_review to closed
Resolution: N/A to fixed - Developer
More Sponsor8 items.
Trac:
Sponsor: N/A to Sponsor8 - Trac closed
closed
- Matthew Finkel mentioned in issue legacy/trac#28756 (moved)
mentioned in issue legacy/trac#28756 (moved)
- Georg Koppen mentioned in issue legacy/trac#29859 (moved)
mentioned in issue legacy/trac#29859 (moved)
- Georg Koppen mentioned in issue legacy/trac#30139 (moved)
mentioned in issue legacy/trac#30139 (moved)
- Georg Koppen mentioned in issue legacy/trac#30140 (moved)
mentioned in issue legacy/trac#30140 (moved)
- Georg Koppen mentioned in issue legacy/trac#30668 (moved)
mentioned in issue legacy/trac#30668 (moved)
- Matthew Finkel mentioned in issue legacy/trac#31934 (moved)
mentioned in issue legacy/trac#31934 (moved)
- Trac moved from legacy/trac#28125 (moved)
moved from legacy/trac#28125 (moved)
- Matthew Finkel mentioned in issue #40074 (closed)
mentioned in issue #40074 (closed)
- Alex Catarineu mentioned in issue fenix#34177 (closed)
mentioned in issue fenix#34177 (closed)
- Pier Angelo Vendrame mentioned in issue #30139
mentioned in issue #30139