Bug 844097 - SELinux is preventing /usr/bin/tor from 'search' accesses on the directory kernel.
SELinux is preventing /usr/bin/tor from 'search' accesses on the directory ke...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
17
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:95e1335bf181f0c6403ff573c4d...
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-28 17:27 EDT by Ron Gonzalez
Modified: 2013-01-06 22:59 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-20 10:17:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ron Gonzalez 2012-07-28 17:27:49 EDT
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
:
:
Comment 1 Miroslav Grepl 2012-07-30 05:11:30 EDT
Fixed in selinux-policy-3.10.0-143.fc17.noarch
Comment 2 Fedora Update System 2012-08-08 07:22:27 EDT
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
Comment 3 Fedora Update System 2012-08-09 19:05:34 EDT
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).
Comment 4 Fedora Update System 2012-08-10 18:35:38 EDT
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.
Comment 5 Jeff Raber 2012-12-05 22:23:57 EST
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)
Comment 6 Jeff Raber 2012-12-05 22:32:47 EST
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)
Comment 7 Miroslav Grepl 2012-12-06 04:52:31 EST
Added.

commit c00f31fb8f9d5656c3aec17cad1542e7663de8e1
Author: Miroslav Grepl <mgrepl@redhat.com>
Date:   Thu Dec 6 10:49:54 2012 +0100

    Allow tor to read /proc/sys/kernel/random/uuid
Comment 8 Fedora Update System 2012-12-17 13:40:52 EST
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
Comment 9 Fedora Update System 2012-12-17 21:36:18 EST
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).
Comment 10 Fedora Update System 2012-12-20 10:17:04 EST
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.
Comment 11 Fedora Update System 2013-01-06 22:59:44 EST
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.

Note You need to log in before you can comment on or make changes to this bug.