15:01:13 #startmeeting Tor Browser Weekly Meeting 2022-03-29 15:01:13 Meeting started Tue Mar 29 15:01:13 2022 UTC. The chair is richard. Information about MeetBot at http://wiki.debian.org/MeetBot. 15:01:13 Useful Commands: #action #agreed #help #info #idea #link #topic. 15:01:16 Hi! 15:01:53 update that pad! ( https://pad.riseup.net/p/tor-tbb-keep ) 15:02:01 clear out those kanbans 15:02:08 gogogo 15:03:15 can we clear old discussions? They're getting long :) 15:04:33 o/ 15:05:01 PieroV: good idea 15:05:14 yeaah for sure 15:06:46 done, I've left only one point that was not marked as solved 15:09:01 * sysrqb sneaks in without any context 15:09:38 o/ 15:10:10 o/ 15:10:50 ok lots of discussion points today 15:11:00 let's get started while they finish getting edited 15:11:05 pierov! 15:11:13 hey! 15:11:23 I noticed that Tor Browser contains a list of applied updates 15:11:42 As I wrote, don't we usually consider this disk leak/information about when a user started using Tor Browser? 15:11:56 It's true that one can also delete their installation and extract it again 15:12:24 where is that list saved? 15:12:35 Near the updates, in general preferences 15:12:39 There's a button to do so 15:12:45 let me send you a screenshot 15:13:26 I'm wondering if the timestamp of some files could be used to know when the user started using Tor Browser, even if we remove that log 15:14:05 (but maybe this is something we can fix too) 15:14:28 https://share.riseup.net/#RVGZlX3qnT04dYwKzX_hmA 15:15:46 boklm: my thought as well 15:15:48 ah, i see. interesting. 15:16:04 updating timestamps may be bad for backup systems, but hey, one can exclude it, and anyway TBB is not that heavy 15:16:34 but this makes it hella easy for forensics people so we should probably fix it :) 15:16:54 removing all updates from that log except the last one sounds like a good idea 15:17:01 +1 15:17:13 (or maybe even the last one) 15:17:27 yeah, and remove the button as well 15:17:36 my current thought is: yes, this may be a problem that we should fix because it leaks information about user behavior, but I wonder whether this is still a valid threat in the Tor Browser threat model, in general 15:18:18 i suppose one could argue if you need amnesiac behaviour one should use TAILS not tor-browser on $(dekstop_os) 15:18:19 Seems like one could maybe make start-tor-browser run a recursive `touch` on the TBB directory, including the profile? Which would reset the datetime metadata in the filesystem. 15:18:43 Jeremy_Rand_Talos wow that's cute 15:19:20 that would increase startup time - which is something we wanted to reduce in the tor-launcher bootstrapping case 15:19:26 but yep, that's an option 15:19:44 what about running the touch while starting TBB? 15:20:00 sysrqb, yes, though I wonder whether there are enough files that the additional time actually is noticeable. 15:20:17 yeah seems like something you could do in the background, or even within tor-browser itself so it works on all platforms 15:20:17 PieroV: that could work 15:20:29 Agree with PieroV, that seems reasonably safe 15:20:45 +1 for the all platforms thing, though 15:20:49 but that's a separate issue to this discussion I think 15:20:49 Jeremy_Rand_Talos_: i don't know, for sure. but i imagine on older spinning disks and cheaper usb drives (etc.), it could be noticable 15:21:05 (but also this will fingerprint exaclty the last time the user ran Tor Browser, which itself could be incriminating) 15:21:11 or in start-tor-browser after exiting the firefox process, setting always the same time to avoid leaking when it was run 15:21:20 and touch with the release date? 15:21:21 boklm: +1 precisely 15:21:33 PieroV: that's a nice idea 15:21:38 maybe after having applied the update itself? (and without caring of ctime?) 15:21:39 richard, I *think* `touch` allows you to choose what datetime it sets. 15:21:50 yes, it does 15:21:52 (it does) 15:22:01 it can even set the atime if you want to 15:22:17 but, i don't know about support on Windows 15:22:21 because...Windows 15:22:33 ok, let's create a Tor Browser ticket for this whole discussion re Tor Browser file timestamps 15:22:45 sounds good to me 15:22:46 in the mentime, we should *also* fix this update history issue 15:22:52 in a separate issue 15:23:10 we also need to check if firefox uses file timestamps for some things 15:23:24 yes that too 15:23:35 and check if it's storing last run time in some prefs 15:24:01 (FWIW, my StemNS Windows service work currently leaks Tor Browser usage datetimes to disk, and I consider that a big enough bug that there's a scary warning about it in the docs and it's my highest priority bug to fix in that code) 15:24:50 ok, aguestuser how are things in android :) 15:24:51 So if by some chance Tor considers such bugs to be not bugs, I'd kinda like to know :) 15:25:12 Jeremy_Rand_Talos: I'd classify as a bug vOv 15:25:20 app.update.lastUpdateTime.addon-background-update-timer for example looks like a pref that stores when addons were last updated 15:25:23 richard, thanks, agree 15:25:39 richard: nothing new to report on the build other than what is in #tor-dev, but the build is failing in rather baffling ways 15:25:48 fwiw, seems Browser/TorBrowser/UpdateInfo/updates.xml is contains the full history 15:26:18 wanted to use the opportunity of the meeting to see if anyone had fresh perspectives? 15:27:02 browser.laterrun.bookkeeping.profileCreationTime might also leak when the user started using tor browser 15:27:05 upshot is: android-component step fails b/c geckoview .aar doesn't have tor-patches, but geckoview .aar was built off of git tree containing said patches 15:27:23 (whoops. holding on next topic until we're done with current one!) 15:27:25 * sysrqb will need help with getting copy of backlog in #tor-dev 15:27:51 carry on agustuser :) 15:28:00 that's all. stuck. 15:28:21 happy PieroV is running a build. not sure whether mucking with linkers is at all in same territory 15:28:32 would also like to find some "distiguishers" 15:28:42 to tell apart an .aar that has the patches from one that doesn't 15:28:46 so are we to understand that geckoview is being built without our patches? 15:28:53 eg it's just a vanilla geckoview? 15:29:03 well, that's what this build failure normally means 15:29:20 when android-components cant find `torSecurityLevel` and `spoofEnglish` and `origin` 15:29:27 in 100% of cases i've seen that build error 15:29:41 it's been b/c android-compomnents is trying to build on top of vanilla (moz) geckoview 15:30:19 so i am assuming that this geckoview .aar doesn't have the patches but baffled as to why (b/c its name contains the commit hash of the HEAD of a tree that has the patches) 15:30:45 sysrqb had some nice ideas for how to inspect the actual .aar to see if the patches are present (by inspecting classes.jar from unzipped .aar) 15:30:57 right that makes sense 15:31:04 but i was unable to use this technique to find the presence of missing strings in .aars that we know *do* have the patches 15:31:09 (build artifacts from past builds) 15:31:49 so also don't really have a "baseline" to compare the broken .aar against to assess accuracy of assessment that it is weirdly missing patches we expect it to have 15:32:12 in addition to not having working hypotheses as to why it would be missing patches given built off git tree that has them... 15:32:25 it could also be that the patch are there, but due to other changes the linking doesn't work anymore 15:32:29 in addition to not having working hypotheses as to why it would be missing patches given built off git tree that has them... 15:32:37 boklm: yes... so this is where i'd welcome perspectives! 15:32:46 seems like some change to the linker (made last week) might explain this? 15:32:59 but i don't have a firm enough grasp on those changes and how they interact with the build to assess! 15:33:24 it could be some changes to the linker, or some changes inside geckoview or inside android-components 15:33:55 what sorts of changes inside geckoview or android-components? 15:33:56 about the linker, we rolled back to using NDK's for the build that aguestuser produced 15:33:59 sounds like there's no way around a multi-dimensional bisection... 15:34:01 how would one go looking for them? 15:34:34 richard: a multi-dimensional bisection across a 3-major-version-diff in 3 different projects? 15:34:41 :D 15:34:47 sounds like hell! 15:35:02 aguestuser: just so you know, when i unzip classes.jar into another directory, then grep for "torSecurity", i get this: 15:35:05 $ grep -rn torSecurity 15:35:08 Binary file org/mozilla/geckoview/GeckoRuntimeSettings$Builder.class matches 15:35:09 we should look for an equivalent of nm in Java 15:35:52 err, for .aars, rather than Java. I found that `javap -private` may help 15:36:00 sysrqb: ooh! assuming that grep is of a past-release .aar? 15:36:06 yes 15:36:15 lovely. okay. so baseline established. 15:36:16 i believe for 96 15:36:44 aguestuser: maybe you can check in the log the command line used for the linking, and compare it with an older build to see if anything changed there 15:36:44 ah, yes, it's in the filename (lol): geckoview-beta-omni-96.0.20220602090101.aar 15:37:26 okay. some leads! 15:37:42 fwiw also back in the day java classes have been trivial to 'decompile' ifyou're curious about what source was used to build a thing 15:37:59 vOv 15:38:05 true, but in this case we have JNI in the middle 15:38:30 yeah, there's an `apktool` command that we've used for decompiling the apk/aar in the past 15:38:42 occasionally useful 15:38:47 oh right, if we're confused about which geckoview was usd ot buil 15:38:59 sysrqb: android studio has a very nice built-in UI for apktool 15:39:00 decompiling the top fenix layer probably not that informative 15:39:27 alright, shall we move on to your UI test qs? 15:39:33 sure! 15:39:50 as noted. not urgent (until alpha release done) 15:39:52 but, in any case, it seems like aguestuser can confirm whether the geckoview he build contains tor browser patches and then go from there 15:40:03 sysrqb: yes! will do right after meeting 15:40:15 (good luck!) 15:42:38 grr.. sysrqb i just attempted to repro your search on geckoview-beta-omni-96.0.20141228000000.aar and got no results? 15:42:43 can folo later! 15:42:58 okay 15:43:00 question about tests is regarding NoScript 15:43:02 boklm, sysrqb: do you have any insight as to why the allowed_addons.json step is where it is? 15:43:06 aguestuser: what do you mean by "putting this file under version control"? putting it in fenix.git instead of tor-browser-build.git? 15:43:14 boklm: sorry, yes 15:43:30 in a manner that would be transparent to gradle tasks that build the apks for isntrumentation tests 15:43:57 the problem currently is that the gradle task that builds the apks for the UI tests does not perform this step (which we perform in tor-browser-build) 15:44:06 i believe it's in tor-browser-build because we wanted to make updating it as part of the release process, instead of tied to the fenix patches 15:44:07 and thus all instrumentation test apks lack noscript addon 15:44:32 which means it is impossible to generate an instrumented test apk that has noscript using only gradle 15:44:40 but i doubt there is a requirement for that, and it can be moved into fenix, if that's a better place for it 15:44:45 (which is the natural place in an android-studio dev flow to do it) 15:45:07 sysrqb: that's sort of what i guessed 15:45:19 (re: ease of updating as part of release cycle) 15:45:53 but downside of that trade-off is you can't test expected state of the app without some contortions that would be nice to avoid 15:46:35 sounds like you have at least the beginnings of a plan 15:46:41 it sounds like this goes back to the general question of how much we should support building tor browser outside of tor-browser-build 15:47:10 so if i'm hearing right, the cost of trying to adjust this flow (to put allowed_addons in fenix.git instead of injecting into apk) would be generating a process for updating the allowed_addons as part of release cycle in commits to fenix.git that is acceptable to team? 15:47:36 sysrqb: yes, but i think of it as more than just building... it's like can you run the tests at all 15:47:58 you could in theory write a new test runner script 15:47:59 aguestuser: can you create a process for generating allowed_addons.json contanin gjust no-script for dev-builds in fenix? 15:48:10 but tor-browser-build can inject the file into the instrumented apks, yes? 15:48:22 sysrqb: that's what i was about to type 15:48:29 (and keep the existing process for the whole addons file?) 15:48:34 so yes, if we wanted to run instrumented tests from (for example) a make script 15:48:52 you could adjust how the instrumented tests are run, and interecept the intrumetned apk and inject some files 15:49:02 which we'd then read and put into the `assets` dir at runtime 15:49:08 but this seems massively convoluted to me 15:49:29 when teh `assets` dir is something that is sitting there in the source code directory 15:49:42 and we can literally put under version control for the project it's supposed to be for 15:49:56 sysrqb, I do think that building outside of tor-browser-build should be supported as much as feasible, given that tor-browser-build does not run at all on some systems (e.g. non-x86) and also does not cross-compile to many systems 15:49:57 (rather than having another project inject it into the directory we could have just put it in?) 15:50:20 sure, in some ways this current design is technical debt 15:50:24 also: it means you *cannot* use the push-button functionality in android studio to run tests 15:50:27 which is a bit of a bummer 15:50:29 aguestuser: so it seems to me like you're the primary stakeholder here, I'd say if it's a good idea for testing the ngo for it vOv 15:50:38 i just want to recommend that battles are chosen wisely 15:50:39 also: chewing lots of time 15:51:01 if this is making testing painful, then it may be worth solving this problem 15:51:02 i'm hearing that there are no non-obvious technical reasons why we did it that way 15:51:06 it's process things 15:51:09 mmhm 15:51:19 so if i want to do something else i should propose a process shift? 15:51:33 (which in any case i don't need to do right now since it's far from the most urgent thing!) 15:51:49 for context: why i'm interested in investing in tests is to avoid things like the download bug surprising us 15:52:07 aguestuser: that works for me 15:52:29 (+1) 15:52:30 for my end it just seems like the change to releases is just where the 'updat allowed addons' script lives and is run 15:52:34 ok 15:52:35 donuts 15:52:36 real quick 15:52:37 (tests are always a good investment imho, maybe a boring one :)) 15:52:39 hello 15:52:43 (but also (offline/later): i'm i'm wrong about the "this is a process thing" assumption -- feel free to correct me!) 15:52:44 PieroV: +1 15:52:45 real quick 15:52:54 I'd like to get the wheels moving on bundling https://tb-manual.torproject.org/ in TB 11.5 15:53:05 ticket is tor-browser#11698 15:53:17 but there is more background in tor-browser#31539 15:53:26 tl;dr it exists as markdown in lektor atm 15:53:35 we can turn that into static html 15:53:49 my question is: can we do some custom CSS for it in TB so it looks more native? 15:54:01 donuts: most likely 15:54:13 it'll just be the content we bundle obvs, not the full page (i.e. without the header and footer etc.) anyway 15:54:30 sounds like we'd need to add a tor-browser-manual project to tor-browser-build and package it up w/ firefox 15:54:44 and point tor-browser manual links/help to the local cached copy? 15:54:51 yeah! 15:55:03 sorry you were probably not asking me 15:55:09 :) 15:55:09 :) 15:55:15 yeahs in the chat 15:55:18 \o/ 15:55:29 so i don't know what the current state of things here is 15:55:48 I can do some real lite design exploration but we can also talk about this more next week after you've managed to reread the tickets 15:55:50 Links are hardcoded with the full URL, but we could add a function to generate them 15:56:08 so we need some process for building/integrating the final html 15:56:34 could be as easy as you host a zip with the html in it somewhere which we pull in during build 15:57:05 and either a wrapper in an about: page, or something to allow that files 15:57:07 we can probably find some markdown -> html tool we can use during the build 15:57:07 or adding an actual git repo with a build script that outputs said zip 15:57:19 boklm: +1 15:57:38 pandoc might work - if you don't need lektor-specific metadata 15:57:39 so we've got like 2 months until 11.5 15:57:40 boklm: I think that we could use the same one used for the website, but with a different config 15:57:55 but installing lektor might be easier 15:58:51 ah yes, it seems there a lektor debian package 15:58:54 you could rewrite the 'layout' template that has the sidebar etc 15:59:24 boklm: seems like the build integration stuffs would be on you, and PieroV the actual browser changes? (and donuts+emmapeel on design changes?) 15:59:37 alright anyway we can come back to it next time 15:59:38 okay 15:59:43 ok 15:59:43 sounds good to me 15:59:46 thanks all! 15:59:47 (we have S96 meeting now) 15:59:56 yesss 16:00:06 real quick, 11.0.10 is scheduled for this week so I'll need a builer but i'll ping y'all in #tor-dev later 16:00:09 byebebyebye 16:00:13 #endmeeeting 16:00:16 * boklm can be a builder 16:00:16 thanks all, bye! 16:00:17 #endmeating 16:00:19 #endmeeting