I agree with weasel that Tor should not have all privs obfsproxy needs: else we're slowly defeating the whole idea of per-program confinement. It looks like either the Tor profile should start obfsproxy in an unconfined manner, or (better) the obfsproxy package should ship with its own AppArmor profile.
proper: by the way, it was almost pure chance that I was just pointed to this bug report. If weasel prefers such issues being reported here instead of on the Debian BTS, fine with me, but then you might want to point me at / Cc: me AppArmor-related issues.
proper: by the way, it was almost pure chance that I was just pointed to this bug report. If weasel prefers such issues being reported here instead of on the Debian BTS
The Debian BTS is the canonical and preferred means to report bugs against the debian packages. Not everybody realizes that.
I don't think Tor should have these privileges. Putting the obfsproxy profiles
into tor just seems like a bad idea that won't scale.
Ok.
I suspect the better way would be to allow starting obfsproxy in an unconfined
manner, if that's possible.
It's possible. In that case, look for.
/{,var/}run/tor/control.authcookie.tmp rw, # Site-specific additions and overrides. See local/README for details. #include <local/system_tor>
Needs just one more line in between.
/{,var/}run/tor/control.authcookie.tmp rw, /usr/bin/obfsproxy Ux, # Site-specific additions and overrides. See local/README for details. #include <local/system_tor>
I agree with weasel that Tor should not have all privs obfsproxy needs: else we're slowly defeating the whole idea of per-program confinement.
Agreed.
It looks like either the Tor profile should start obfsproxy in an unconfined manner,
Ok. The change above should do it.
or (better) the obfsproxy package should ship with its own AppArmor profile.
I might create one, but please don't wait for me. If someone else has a smaller todo list and is faster, I am happy about that.
proper: by the way, it was almost pure chance that I was just pointed to this bug report. If weasel prefers such issues being reported here instead of on the Debian BTS, fine with me, but then you might want to point me at / Cc: me AppArmor-related issues.
The Debian BTS is the canonical and preferred means to report bugs against the debian packages. Not everybody realizes that.
Well, I created one @ trac.torproject.org as well since #5791 (moved) isn't Debian specific. So I am unsure how both projects could benefit best from such discussions and proposed changes.
Reported as Debian bug 739279, with a patch attached. Note that in general, "Ux" is wrong, as it prevents using the dedicated profile for the executed application, even if it's available. Hence the use of PUx in my patch.
BTW, this ticket seems to be a duplicate of #6996 (closed).
When I restart tor, I got this message in the log:
Failed to terminate process with PID '8165' ('Permission denied').
Could be the new signal mediation that landed into Ubuntu 14.04.
If that's the case: this AppArmor feature is not available in Debian yet, as the relevant kernel patches have not been upstream yet, so adding the needed lines to the AppArmor profile will prevent it from parsing on Debian. So, I think Ubuntu should add this line as a custom patch for the time being... or finish pushing their stuff upstream.