Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework app armor profiles (#92) #111

Merged
merged 21 commits into from
Jul 29, 2014

Conversation

intrigeri
Copy link
Collaborator

These updated profiles clean up and refactor many parts of the profiles, fix a bunch of bugs, and make it fit for non-Ubuntu distros. Tested on Debian Wheezy only, as torbrowser-launcher is broken with the version of Twisted that's in Debian unstable currently.

…f includes the base, fonts, X, freedesktop.org and user-tmp abstractions.
Going to fix that in upstream AppArmor abstractions.
On a vaguely modern GNU/Linux distribution, PulseAudio is used to play sound on
the desktop. Given the TBB sets $HOME to its own directory, it doesn't find the
current user's existing instance of PulseAudio, and then tries to start its own.

Likely we don't want this to be allowed, in the context of these AppArmor
profiles:

* it's a pain to safely allow Firefox to run its own instance of PulseAudio;
* even if we managed to do it, it's not obvious to me that two concurrent
  isntances of PulseAudio, running as the same user, but now aware of the other,
  would work fine together in any useful way.

This can be revisited at a later point, but requires quite more work.
…f AppArmor yet.

One needs the upcoming AppArmor 2.9 userspace (or some Ubuntu's über-patched
snapshot of its development tree) to have this rule parse at all. And then, to
make it actually useful, one also needs to run a Linux kernel with patches that
have not been submitted to mainline yet.

In practice, with this change applied:

* Ubuntu users will need to un-comment this line, otherwise Firefox
  may disfunction.
* Basically all other users will be happy to see this profile actually loaded,
  and to see their TBB's Firefox be actually confined with AppArmor.

Once AppArmor 2.9 is available to most GNU/Linux users, this commit shall
be reverted.
It's apparently run in an environment (LD_*, I guess) that makes it load shared
libraries from the Tor directory too.
@micahflee
Copy link
Collaborator

This is amazing, @intrigeri thank you so much. Reviewing now.

@micahflee micahflee merged commit 66e44a7 into torproject:master Jul 29, 2014
intrigeri pushed a commit to intrigeri/torbrowser-launcher that referenced this pull request Jul 11, 2015
commit 6552a2e
Author: intrigeri <intrigeri@boum.org>
Date:   Wed Jul 23 18:48:40 2014 +0000

Submitted as torproject#111

These updated profiles clean up and refactor many parts of the profiles,
fix a bunch of bugs, and make it fit for non-Ubuntu distros. Tested on
Debian Wheezy only, as torbrowser-launcher is broken with the version of
Twisted that's in Debian unstable currently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants