Your message dated Wed, 06 Jun 2012 16:49:27 +0000
with message-id <[email protected]>
and subject line Bug#670525: fixed in tor 0.2.3.16-alpha-1
has caused the Debian Bug report #670525,
regarding tor: please include AppArmor profile
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
670525: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670525
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: tor
Version: 0.2.3.14-alpha-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: new-profile
X-Debbugs-CC: [email protected]
thanks

Hi weasel,

[Cc'ing tor-dev since some people there, such as the TorBOX folks,
have expressed some interest in confining.]

Please include AppArmor profile in the Tor Debian package.

Since it handles untrusted data, and has been affected by a number of
potential security issues in past years relating to its handling of
those, it seems like an ideal candidate for confining:
https://wiki.debian.org/AppArmor

I have been testing Tor for a few months, on a Debian sid system, with
the attached AppArmor profile. I have been testing with Tor 0.2.2.x
from sid as well with Tor 0.2.3.x from experimental. I have not run
into any single problem with it.

Attached are:

1. apparmor_tor_v1.patch: a patch that adds this AppArmor support to
   Tor;

2. build-tor-sources_apparmor.patch: a patch that updates your
   build-tor-sources script so that the source package with the above
   patch applied builds on every system you care about, and gets the
   best possible AppArmor support out of it:
    - hardy, lucid, Debian up to and including squeeze-backports:
      no dh-apparmor at all => needs to run apparmor_backport,
      resulting package gets no AppArmor support
    - maverick to oneiric:
      dh-apparmor shipped with debhelper => needs to run
      apparmor_backport, resulting package gets AppArmor support
    - precise, Debian Wheezy and sid:
      standalone dh-apparmor package => no need for apparmor_backport,
      resulting package gets AppArmor support

Please consider applying these patches. Unless we're confident 0.2.3.x
will turn into a stable release in time for the Wheezy freeze,
I suggest applying the source package patch to the 0.2.2.x sid
packaging branch as well.

Note that enforcing AppArmor profiles is currently opt-in on Debian:
applying the attached does not change anything for users unless they
enable AppArmor system-wide themselves.

commit 8c6bf77d678b8147c3b7857dc729ae9dbb5a225d
Author: intrigeri <[email protected]>
Date:   Mon Apr 16 10:40:47 2012 +0200

    Add AppArmor profile.

diff --git a/debian/apparmor-profile b/debian/apparmor-profile
new file mode 100644
index 0000000..3b0badd
--- /dev/null
+++ b/debian/apparmor-profile
@@ -0,0 +1,34 @@
+# vim:syntax=apparmor
+#include <tunables/global>
+
+/usr/sbin/tor {
+  #include <abstractions/base>
+  #include <abstractions/nameservice>
+
+  network tcp,
+
+  capability chown,
+  capability dac_override,
+  capability fowner,
+  capability fsetid,
+  capability setgid,
+  capability setuid,
+
+  /proc/sys/kernel/random/uuid r,
+  /sys/devices/system/cpu/ r,
+  /sys/devices/system/cpu/** r,
+
+  /etc/tor/* r,
+  /usr/share/tor/** r,
+
+  owner /var/lib/tor/** rwk,
+  owner /var/log/tor/log* w,
+
+  /{,var/}run/tor/control w,
+  /{,var/}run/tor/tor.pid w,
+  /{,var/}run/tor/control.authcookie w,
+  /{,var/}run/tor/control.authcookie.tmp rw,
+
+  # Site-specific additions and overrides. See local/README for details.
+  #include <local/usr.sbin.tor>
+}
diff --git a/debian/control b/debian/control
index 4acf32a..e6e58ab 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: tor
 Section: net
 Priority: optional
 Maintainer: Peter Palfrader <[email protected]>
-Build-Depends: debhelper (>= 5), libssl-dev, dpatch, zlib1g-dev, libevent-dev (>= 1.1), binutils (>= 2.14.90.0.7), hardening-includes, asciidoc (>= 8.2), docbook-xml, docbook-xsl, xmlto
+Build-Depends: debhelper (>= 5), libssl-dev, dpatch, zlib1g-dev, libevent-dev (>= 1.1), binutils (>= 2.14.90.0.7), hardening-includes, asciidoc (>= 8.2), docbook-xml, docbook-xsl, xmlto, dh-apparmor
 Standards-Version: 3.8.1
 Homepage: https://www.torproject.org/
 Vcs-Git: git://git.torproject.org/debian/tor.git
@@ -13,7 +13,7 @@ Architecture: any
 Depends: ${shlibs:Depends}, adduser, ${misc:Depends}
 Conflicts: libssl0.9.8 (<< 0.9.8g-9)
 Recommends: logrotate, tor-geoipdb, torsocks
-Suggests: mixmaster, xul-ext-torbutton, socat, tor-arm, polipo (>= 1) | privoxy
+Suggests: mixmaster, xul-ext-torbutton, socat, tor-arm, polipo (>= 1) | privoxy, apparmor
 Description: anonymizing overlay network for TCP
  Tor is a connection-based low-latency anonymous communication system which
  addresses many flaws in the original onion routing design.
diff --git a/debian/rules b/debian/rules
index b8cf5c0..53ead19 100755
--- a/debian/rules
+++ b/debian/rules
@@ -151,6 +151,10 @@ install: build
 	install -m 644 contrib/tor-tsocks.conf $(CURDIR)/debian/tor/etc/tor
 	install -m 644 debian/tor-service-defaults-torrc $(CURDIR)/debian/tor/usr/share/tor
 
+	install -m 644 debian/apparmor-profile $(CURDIR)/debian/tor/etc/apparmor.d/usr.sbin.tor
+	if type dh_apparmor >/dev/null 2>&1; \
+	then dh_apparmor --profile-name=usr.sbin.tor -ptor; fi
+
 	dh_link usr/share/man/man8/tor.8 usr/share/man/man5/torrc.5
 
 	rm -f $(CURDIR)/debian/tor/usr/bin/tor-control.py
diff --git a/debian/tor.dirs b/debian/tor.dirs
index 3c28695..f4f6db7 100644
--- a/debian/tor.dirs
+++ b/debian/tor.dirs
@@ -1,3 +1,4 @@
+etc/apparmor.d
 etc/tor
 var/lib/tor
 var/log/tor
--- build-tor-sources.orig	2012-04-23 11:01:01.035395374 +0200
+++ build-tor-sources	2012-04-25 23:13:15.383044988 +0200
@@ -105,6 +105,10 @@
 	fi
 }
 
+apparmor_backport() {
+	sed -i -e '/^Build-Depends/ s/, *dh-apparmor//' debian/control
+}
+
 bp1() {
 	local dir="$1"; shift
 	local sid_debian_version="$1"; shift
@@ -201,11 +205,13 @@
 #################################################
 bp1 $DIR $sid_debian_version lenny
 (cd $DIR; hardening_backport 0)
+(cd $DIR; apparmor_backport)
 bp2 $DIR $ORIGTAR
 
 # SQUEEZE
 #################################################
 bp1 $DIR $sid_debian_version squeeze
+(cd $DIR; apparmor_backport)
 bp2 $DIR $ORIGTAR
 
 # WHEEZY
@@ -225,27 +231,32 @@
 	# hardy's dpkg-parsechangelog cannot deal with dots in the distribution field, remove them.
 	(cd $DIR; dch --force-distribution --distribution "$(dpkg-parsechangelog | grep-dctrl -n -s Distribution '' | tr -d .)" '')
 	(cd $DIR; hardening_backport 0)
+	(cd $DIR; apparmor_backport)
 	bp2 $DIR $ORIGTAR
 fi
 
 # LUCID  (EOL: April 2015)
 #################################################
 bp1 $DIR $sid_debian_version lucid
+(cd $DIR; apparmor_backport)
 bp2 $DIR $ORIGTAR
 
 # MAVERICK  (EOL: April 2012)
 #################################################
 bp1 $DIR $sid_debian_version maverick
+(cd $DIR; apparmor_backport)
 bp2 $DIR $ORIGTAR
 
 # NATTY  (EOL: October 2012)
 #################################################
 bp1 $DIR $sid_debian_version natty
+(cd $DIR; apparmor_backport)
 bp2 $DIR $ORIGTAR
 
 # ONEIRIC  (EOL: April 2013)
 #################################################
 bp1 $DIR $sid_debian_version oneiric
+(cd $DIR; apparmor_backport)
 bp2 $DIR $ORIGTAR
 
 
@@ -256,6 +267,7 @@
 # SQUEEZE-BPO
 #################################################
 bp1 $DIR $sid_debian_version squeeze-bpo
+(cd $DIR; apparmor_backport)
 bp2 $DIR $ORIGTAR
 
 mkdir bpo

--- End Message ---
--- Begin Message ---
Source: tor
Source-Version: 0.2.3.16-alpha-1

We believe that the bug you reported is fixed in the latest version of
tor, which is due to be installed in the Debian FTP archive:

tor-dbg_0.2.3.16-alpha-1_amd64.deb
  to main/t/tor/tor-dbg_0.2.3.16-alpha-1_amd64.deb
tor-geoipdb_0.2.3.16-alpha-1_all.deb
  to main/t/tor/tor-geoipdb_0.2.3.16-alpha-1_all.deb
tor_0.2.3.16-alpha-1.diff.gz
  to main/t/tor/tor_0.2.3.16-alpha-1.diff.gz
tor_0.2.3.16-alpha-1.dsc
  to main/t/tor/tor_0.2.3.16-alpha-1.dsc
tor_0.2.3.16-alpha-1_amd64.deb
  to main/t/tor/tor_0.2.3.16-alpha-1_amd64.deb
tor_0.2.3.16-alpha.orig.tar.gz
  to main/t/tor/tor_0.2.3.16-alpha.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Peter Palfrader <[email protected]> (supplier of updated tor package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed,  6 Jun 2012 09:44:53 UTC
Source: tor
Binary: tor tor-dbg tor-geoipdb
Architecture: source all amd64
Version: 0.2.3.16-alpha-1
Distribution: experimental
Urgency: medium
Maintainer: Peter Palfrader <[email protected]>
Changed-By: Peter Palfrader <[email protected]>
Description: 
 tor        - anonymizing overlay network for TCP
 tor-dbg    - debugging symbols for Tor
 tor-geoipdb - geoIP database for Tor
Checksums-Sha1: 
 87aeefee471000b4b5ee37e836301b0097c97cb7 1700 tor_0.2.3.16-alpha-1.dsc
 487e7c6e48668e121e8ca6b5bbd721899dd4ee46 3135571 tor_0.2.3.16-alpha.orig.tar.gz
 0ad4ed97f516855bdd0bc2304b9c865149039742 31483 tor_0.2.3.16-alpha-1.diff.gz
 87530c8cad0da3193282bf50d1077a2ae9b57fca 1438992 
tor-geoipdb_0.2.3.16-alpha-1_all.deb
 8328f1493e48faf7eac9b580187685f2475d56ec 1144970 tor_0.2.3.16-alpha-1_amd64.deb
 45b665d58e8dc91adbd2e7178b81ea40bd5b3d15 93992 
tor-dbg_0.2.3.16-alpha-1_amd64.deb
Checksums-Sha256: 
 4b63d4249860a5c24bccf6d4fd51f873b5e71edf586ee624ac4d6db13dd832c4 1700 
tor_0.2.3.16-alpha-1.dsc
 853fed0ce5d37a813c0742d07a5da3cd35164a604f59c1a3cb4b8d657c468d46 3135571 
tor_0.2.3.16-alpha.orig.tar.gz
 cdc7f0698c7cf52a4fa985bbdfd3dc9219ec009243800a5a7471283f6f1e71d9 31483 
tor_0.2.3.16-alpha-1.diff.gz
 a83c2e2856839fda1f33e4d866e5280bffe501df0e2951a3448bfb26a0fbc88b 1438992 
tor-geoipdb_0.2.3.16-alpha-1_all.deb
 581437bb3557037b7a330136921e35224223fc60e5bb96ce5b4ed9370216ac8e 1144970 
tor_0.2.3.16-alpha-1_amd64.deb
 929e8f334d79f8543e1d57b5b56cd2f4bf389c5ae69645472f720dfc4c86ec37 93992 
tor-dbg_0.2.3.16-alpha-1_amd64.deb
Closes: 670525
Changes: 
 tor (0.2.3.16-alpha-1) experimental; urgency=medium
 .
   * New upstream version.
     - Work around a bug in OpenSSL that broke renegotiation with TLS
       1.1 and TLS 1.2. Without this workaround, all attempts to speak
       the v2 Tor connection protocol when both sides were using OpenSSL
       1.0.1 would fail. Resolves ticket 6033.
     - and more - please consult upstream changelog.
   * Include apparmor profile.  Thanks to intrigeri (closes: #670525).
Files: 
 f4c10d8133e210d9cb29d729cee98e2b 1700 net optional tor_0.2.3.16-alpha-1.dsc
 3affc6494fc852c728ddcd35e69ba08c 3135571 net optional 
tor_0.2.3.16-alpha.orig.tar.gz
 5671798084ce481ed6fb1d78b1e2e5cd 31483 net optional 
tor_0.2.3.16-alpha-1.diff.gz
 59e9ca42cb2da6cd892cf96444166e8f 1438992 net extra 
tor-geoipdb_0.2.3.16-alpha-1_all.deb
 e32af47609f6c57bb7dec0288404c8b3 1144970 net optional 
tor_0.2.3.16-alpha-1_amd64.deb
 f51ba31feb07516c930361037d6da329 93992 debug extra 
tor-dbg_0.2.3.16-alpha-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJPz4gYAAoJEDTSCgbh3sV3tNEH/iYloIbkvl0o/OoWVg50xS0v
oG4pqq3PveLTIx5VwpShyXOmUWrniO7HN/EoVx3vtzpVCZHasw6XUTwD63/l3bSy
DFhQtl0AEf9NCGlkshS7+9ANy3NxWbqGsacVH8rtEhUuL83SVVBklyGrKLr2txgi
MsRZaO5MfrRlRd9FZR+RQXx18yS/ZA77pE04fI25Xjep10223khGTVqVNVrgwYYF
qKXn4gNUck+k+V2K5oMbQZ/ZiMmi9MWs67H5VclsJEq+AzbusuqOYeFGR9k6UbTO
i3gd/6l9PSTYoizhBRa93w8S2Wmk3srlWvLRPzznKvjK+fOPOkB3bJeNJ8lXeTE=
=hjih
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to