[tbb-bugs] #33931 [Applications/Tor Browser]: obfs4 bridges are used instead of meek if meek is selected in Tor Browser for Android alpha

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Apr 23 22:13:56 UTC 2020


#33931: obfs4 bridges are used instead of meek if meek is selected in Tor Browser
for Android alpha
-------------------------------------------------+-------------------------
 Reporter:  gk                                   |          Owner:  tbb-
                                                 |  team
     Type:  defect                               |         Status:  new
 Priority:  High                                 |      Milestone:
Component:  Applications/Tor Browser             |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tbb-mobile, tbb-parity, tbb-         |  Actual Points:
  regression, TorBrowserTeam202004               |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by sysrqb):

 I think I found the bug:
 `service/src/main/java/org/torproject/android/service/CustomTorInstaller.java`
 {{{
     public InputStream openBridgesStream() throws IOException {
         String userDefinedBridgeList = Prefs.getBridgesList();
         byte bridgeType = (byte) (userDefinedBridgeList.length() > 5 ? 1 :
 0);
         ByteArrayInputStream bridgeTypeStream = new
 ByteArrayInputStream(new byte[]{bridgeType});
         InputStream bridgeStream = (bridgeType == 1) ? new
 ByteArrayInputStream((userDefinedBridgeList + "\r\n").getBytes())
                 :
 context.getResources().getAssets().open("common/bridges.txt");
         return new SequenceInputStream(bridgeTypeStream, bridgeStream);
 }}}
 `universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java`
 {{{
     TorConfigBuilder addBridgesFromResources() throws IOException {
         if(settings.hasBridges()) {
             InputStream bridgesStream =
 context.getInstaller().openBridgesStream();
             int formatType = bridgesStream.read();
             if (formatType == 0) {
                 addBridges(bridgesStream);
             } else {
                 addCustomBridges(bridgesStream);
             }
         }
         return this;
     }

     /**
      * Add bridges from bridges.txt file.
      */
     private void addBridges(InputStream input) {
         if (input == null) {
             return;
         }
         List<Bridge> bridges = readBridgesFromStream(input);
         for (Bridge b : bridges) {
             bridge(b.type, b.config);
         }
     }
 }}}

 When we combine this with the fix for #30767, we have a recipe for adding
 all default bridges *and* configuring a pluggable transport for
 `meek_lite,obfs3,obfs4`. We never filter the list of bridge for the
 selected type. As a result, tor chooses one of the configured bridges
 which is (probabilistically) an `obfs4` bridge.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33931#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tbb-bugs mailing list