[tor-bugs] #27609 [Applications/Tor Browser]: TBA: Evaluate Tor Onion Proxy Library

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Apr 5 16:15:05 UTC 2019


#27609: TBA: Evaluate Tor Onion Proxy Library
-------------------------------------------------+-------------------------
 Reporter:  sysrqb                               |          Owner:  tbb-
                                                 |  team
     Type:  defect                               |         Status:
                                                 |  needs_revision
 Priority:  Very High                            |      Milestone:
Component:  Applications/Tor Browser             |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tbb-mobile, TBA-a3, tbb-8.5-must-    |  Actual Points:
  alpha, TorBrowserTeam201904                    |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
                                                 |  Sponsor8
-------------------------------------------------+-------------------------

Comment (by sisbell):

 I did a deep dive into the library loading for tor.

  1. After going through older builds and then our newer ones, the browser
 APK has never extracted the tor binaries. It does extract for the
 firefox/mozilla native libraries.
  1. ''Orbot extracts libraries'': I tried using tor-android-service with a
 build of Orbot app and the tor library extracts correctly. So this looks
 like something specific to the firefox build. It is a little strange that
 the libraries in Orbot show up as arm rather than armv7 (as shown in
 Native Libs Monitor)
  1. ''Not a toolchain issue'': I also built Orbot/tor-android-service with
 the same toolchain as tbb and the libraries still extract so it doesn't
 appear to be a toolchain related issue.

 Comparing versions tor-android-binary library

  1. 0.3.4.9 - we can see that the tor.so is in the tor-browser apk and it
 registers as an arm library within the apk.
  1. 0.3.5.8 - tor.so isn't picked up at all as a native library, even
 within the tor-browser apk (I verified with Native Libs Monitor).
  1. When I try to launch the latest version of tor, I get "no such
 directory or file". When I check the app space on the device tor is
 correctly located on the device. So this error doesn't make much sense. I
 managed to reproduce this behavior with a sample app by having APK A
 dependent on aar B. B had /lib/armeabi-v7/tor.so in the aar. I then built
 APK A and also reincluded jniLibs/armeabli-v7/tor.so in APK A. So there
 are two versions in the build chain. With this build I was able to
 reproduce the "no such directory or file" error. However, I was unable to
 find any double inclusion within the firefox build.
  1. I took my local/latest version of the tor-browser APK that fails as
 defined in (3) and replaced version 0.3.5.8 of tor.so with version
 0.3.4.9. I directly modified the APK so there is no other change. The app
 started up correctly.

 '''Summary:'''
 We will need to fall back to the older version of tor for our build. In
 regards to the latest version of tor-android-binary, it works correctly
 outside of firefox. The only thing that looks strange is that it registers
 as arm rather than armv7 so that would be worth a look in the future.

 I've upgraded TOPL and tor-android-service to use the latest version of
 tor-android so I will create a patch to move to an older version in the
 firefox build. The APIs are slightly different between versions so this
 will touch some of the code.

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


More information about the tor-bugs mailing list