Whonix AppArmor Profiles Development Discussion

https://github.com/Whonix/whonixcheck/commit/c93a264d47e67eeace9fc657ff6e52ef492ac5ff
https://github.com/Whonix/whonixcheck/commit/971260573446e73d288424df06a39e076d590724
https://github.com/Whonix/whonixcheck/commit/e49e3157b2a2aa17c293b441a405034eb43dcfab

https://github.com/Whonix/whonixcheck/commit/983a0ede85fff4d43789362aa57118c523317bea

fix tor-controlport-filter AppArmor profile
https://phabricator.whonix.org/T587

Any changes from

required in apparmor-profile-torbrowser/home.tor-browser.firefox at master ยท Kicksecure/apparmor-profile-torbrowser ยท GitHub?

Anything we should apply to GitHub - Kicksecure/apparmor-profile-torbrowser: AppArmor profile for The Tor Browser Bundle (TBB) - https://www.whonix.org/wiki/AppArmor - for better security (hardening). as well?

1 Like

Post here as a record

https://github.com/Whonix/anon-gw-anonymizer-config/pull/7

1 Like

Following the last post from @iry and the issue regarding /etc/torrc.d, an update to apparmor-profile-whonixcheck, including /usr/local/etc/apparmor.d just in case.

Note.
After cloning my repository from github, I fetched and merged https://github.com/Whonix/apparmor-profile-whonixcheck, which is out of date. So I copied the installed profile in the package folder and then made the changes, hence the two commits.

2 Likes

apparmor-profile-whonixcheck does no longer exist. We integrated it into whonixcheck. (Please merge Whonix master please.)

That explains.

The same change in whonixcheck.

After installing the profile, whonixcheck does not complain after running anon-connection-wizard.

2 Likes

Merged. :slight_smile:

Are you sure the following is required?

/etc/ r,
/etc/torrc.d/ r,
/usr/local/etc/torrc.d/ r,

I speculate the following alone would do?

/etc/torrc.d/* rw,
/usr/local/etc/torrc.d/* rw,

Wondering because we had /etc/tor/** r, without /etc/ r, and it always worked.

1 Like

By experience, I do prefer to add ,r to the folder we are allowing to read in before giving the required permissions to the files. I have been stuck too many times because of this missing line, and I would recommend to apply that rule as a standard.

2 Likes

Hi @troubadour!

I am not an expert so please correct me if I am wrong.

My understand is that AppArmor is all about giving the minimal permissions to an application as it needs? If my understanding is correct, then having /etc/ r, may be too permissive?

2 Likes

/etc/ r, seems to be essential sometimes. :slight_smile:

1 Like

Yes. I was a little quick in my reply. Actually we do not need the line /etc/ r,. I will amend.

3 Likes

Done.

1 Like

Merged. :slight_smile: