Dear Maintainer,
*** Reporter, please consider answering these questions, where appropriate ***
* What led up to the situation?
During normal TorBrowser browsing and updating, the TorBrowser installs itself under a folder named
/home/*/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser/Browser/firefox.real
rather than
/home/*/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/firefox.real
So, torbrowser is thereafter not contained by apparmor restrictions and seems to work normally, i.e. you do not notice that you have reduced security.
* What exactly did you do (or not do) that was effective (or
ineffective)?
To get a working browser contained by apparmor, I changed the paths in the apparmor files for 0.3.6 thusly (being backward compatible for an *older* TorBrowser version that might still be installed):
$ diff -u torbrowser.Browser.firefox /etc/apparmor.d/torbrowser.Browser.firefox
--- torbrowser.Browser.firefox 2024-06-30 14:26:09.000000000 +0200
+++ /etc/apparmor.d/torbrowser.Browser.firefox 2024-06-30 13:53:05.311187709 +0200
@@ -1,7 +1,7 @@
#include <tunables/global>
#include <tunables/torbrowser>
-@{torbrowser_firefox_executable} = /home/*/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/firefox.real
+@{torbrowser_firefox_executable} = /home/*/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser*/Browser/firefox.real
profile torbrowser_firefox @{torbrowser_firefox_executable} {
#include <abstractions/audio>
$ diff -u torbrowser.Tor.tor /etc/apparmor.d/torbrowser.Tor.tor
--- torbrowser.Tor.tor 2024-06-30 14:26:09.000000000 +0200
+++ /etc/apparmor.d/torbrowser.Tor.tor 2024-06-30 14:12:04.088334553 +0200
@@ -1,7 +1,7 @@
#include <tunables/global>
#include <tunables/torbrowser>
-@{torbrowser_tor_executable} = /home/*/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/TorBrowser/Tor/tor
+@{torbrowser_tor_executable} = /home/*/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser*/Browser/TorBrowser/Tor/tor
profile torbrowser_tor @{torbrowser_tor_executable} {
#include <abstractions/base>
$ diff -u tunables/torbrowser /etc/apparmor.d/tunables/torbrowser
--- tunables/torbrowser 2022-12-14 03:19:17.000000000 +0100
+++ /etc/apparmor.d/tunables/torbrowser 2024-06-30 13:57:19.943311428 +0200
@@ -1,2 +1,2 @@
-@{torbrowser_installation_dir}=@{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*
+@{torbrowser_installation_dir}=@{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser*
@{torbrowser_home_dir}=@{torbrowser_installation_dir}/Browser
* What was the outcome of this action?
I've noticed that version 0.3.7 in sid has updated these paths to be *only* compatible with the new paths.
The other changes to 0.3.7's version of torbrowser.Browser.firefox might be necessary; I haven't investigated that, but with the new paths above torbrowser and its tor process is under apparmor's enforce mode and I can browse some simple web pages.
* What outcome did you expect instead?
N/A
*** End of the template - remove these template lines ***