libreport version: 2.0.10 executable: /usr/bin/python2.7 hashmarkername: setroubleshoot kernel: 3.4.5-2.fc17.x86_64 time: Sat 28 Jul 2012 05:27:16 PM EDT description: :SELinux is preventing /usr/bin/tor from 'search' accesses on the directory kernel. : :***** Plugin catchall (100. confidence) suggests *************************** : :If you believe that tor should be allowed search access on the kernel directory by default. :Then you should report this as a bug. :You can generate a local policy module to allow this access. :Do :allow this access for now by executing: :# grep tor /var/log/audit/audit.log | audit2allow -M mypol :# semodule -i mypol.pp : :Additional Information: :Source Context system_u:system_r:tor_t:s0 :Target Context system_u:object_r:sysctl_kernel_t:s0 :Target Objects kernel [ dir ] :Source tor :Source Path /usr/bin/tor :Port <Unknown> :Host (removed) :Source RPM Packages tor-core-0.2.2.35-1702.fc17.x86_64 :Target RPM Packages :Policy RPM selinux-policy-3.10.0-134.fc17.noarch :Selinux Enabled True :Policy Type targeted :Enforcing Mode Permissive :Host Name (removed) :Platform Linux (removed) 3.4.5-2.fc17.x86_64 #1 SMP Mon : Jul 16 20:52:08 UTC 2012 x86_64 x86_64 :Alert Count 1 :First Seen Sun 22 Jul 2012 03:39:03 AM EDT :Last Seen Sun 22 Jul 2012 03:39:03 AM EDT :Local ID 41383af7-32a8-422d-b07e-409ff417df29 : :Raw Audit Messages :type=AVC msg=audit(1342942743.893:3086): avc: denied { search } for pid=998 comm="tor" name="kernel" dev="proc" ino=10044 scontext=system_u:system_r:tor_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=dir : : :type=AVC msg=audit(1342942743.893:3086): avc: denied { read } for pid=998 comm="tor" name="uuid" dev="proc" ino=3365732 scontext=system_u:system_r:tor_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=file : : :type=AVC msg=audit(1342942743.893:3086): avc: denied { open } for pid=998 comm="tor" name="uuid" dev="proc" ino=3365732 scontext=system_u:system_r:tor_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=file : : :type=SYSCALL msg=audit(1342942743.893:3086): arch=x86_64 syscall=open success=yes exit=ENOEXEC a0=318ce384e4 a1=80000 a2=0 a3=0 items=0 ppid=1 pid=998 auid=4294967295 uid=991 gid=988 euid=991 suid=991 fsuid=991 egid=988 sgid=988 fsgid=988 tty=(none) ses=4294967295 comm=tor exe=/usr/bin/tor subj=system_u:system_r:tor_t:s0 key=(null) : :Hash: tor,tor_t,sysctl_kernel_t,dir,search : :audit2allowunable to open /sys/fs/selinux/policy: Permission denied : : :audit2allow -Runable to open /sys/fs/selinux/policy: Permission denied : :
Fixed in selinux-policy-3.10.0-143.fc17.noarch
selinux-policy-3.10.0-145.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-145.fc17
Package selinux-policy-3.10.0-145.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-145.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-11591/selinux-policy-3.10.0-145.fc17 then log in and leave karma (feedback).
selinux-policy-3.10.0-145.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
Miroslav, I am seeing this AVC on a fully updated F17 with selinux-policy-3.10.0-161.fc17 The avc seems to be triggered each time I start the tor service ('systemctl start tor.service'). tor seems to be working just fine without the access. Raw Audit Messages type=AVC msg=audit(1354690388.483:1949): avc: denied { search } for pid=12289 comm="tor" name="kernel" dev="proc" ino=8104 scontext=system_u:system_r:tor_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=dir type=SYSCALL msg=audit(1354690388.483:1949): arch=x86_64 syscall=open success=no exit=EACCES a0=3f418384e4 a1=80000 a2=0 a3=ff items=0 ppid=1 pid=12289 auid=4294967295 uid=991 gid=984 euid=991 suid=991 fsuid=991 egid=984 sgid=984 fsgid=984 tty=(none) ses=4294967295 comm=tor exe=/usr/bin/tor subj=system_u:system_r:tor_t:s0 key=(null)
To gather some additional data, I stopped the tor service ('systemctl stop tor.service'), put SELinux into permissive mode ('setenforce 0'), then started the tor service ('systemctl start tor.service'). The following avcs were logged: Raw Audit Messages type=AVC msg=audit(1354764654.287:2525): avc: denied { search } for pid=2089 comm="tor" name="kernel" dev="proc" ino=8104 scontext=system_u:system_r:tor_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=dir type=AVC msg=audit(1354764654.287:2525): avc: denied { read } for pid=2089 comm="tor" name="uuid" dev="proc" ino=10497653 scontext=system_u:system_r:tor_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=file type=AVC msg=audit(1354764654.287:2525): avc: denied { open } for pid=2089 comm="tor" path="/proc/sys/kernel/random/uuid" dev="proc" ino=10497653 scontext=system_u:system_r:tor_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=file type=SYSCALL msg=audit(1354764654.287:2525): arch=x86_64 syscall=open success=yes exit=EPROTOTYPE a0=3f418384e4 a1=80000 a2=0 a3=fd items=0 ppid=1 pid=2089 auid=4294967295 uid=991 gid=984 euid=991 suid=991 fsuid=991 egid=984 sgid=984 fsgid=984 tty=(none) ses=4294967295 comm=tor exe=/usr/bin/tor subj=system_u:system_r:tor_t:s0 key=(null)
Added. commit c00f31fb8f9d5656c3aec17cad1542e7663de8e1 Author: Miroslav Grepl <mgrepl> Date: Thu Dec 6 10:49:54 2012 +0100 Allow tor to read /proc/sys/kernel/random/uuid
selinux-policy-3.10.0-165.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-165.fc17
Package selinux-policy-3.10.0-165.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-165.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-20544/selinux-policy-3.10.0-165.fc17 then log in and leave karma (feedback).
selinux-policy-3.10.0-166.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.