Bug 709644

Summary: SELinux is preventing /usr/libexec/colord from 'getattr' accesses on the filesystem /mnt/sharepoint.
Product: [Fedora] Fedora Reporter: Nikita Bige <bignikita>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:0f801a6dfb86776c2468099e6b252ce0994b7024a43ae7dbc0ee00160f01a044
Fixed In Version: selinux-policy-3.9.16-30.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-24 03:54:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Nikita Bige 2011-06-01 09:21:22 UTC
SELinux is preventing /usr/libexec/colord from 'getattr' accesses on the filesystem /mnt/sharepoint.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that colord should be allowed getattr access on the sharepoint filesystem 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 colord /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:colord_t:s0-s0:c0.c1023
Target Context                system_u:object_r:cifs_t:s0
Target Objects                /mnt/sharepoint [ filesystem ]
Source                        colord
Source Path                   /usr/libexec/colord
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           colord-0.1.7-1.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-24.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.6-27.fc15.x86_64
                              #1 SMP Sun May 15 17:23:28 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Wed 01 Jun 2011 01:04:53 PM MSD
Last Seen                     Wed 01 Jun 2011 01:04:53 PM MSD
Local ID                      09acea86-13be-4b60-b9a9-854457e1d61b

Raw Audit Messages
type=AVC msg=audit(1306919093.279:21): avc:  denied  { getattr } for  pid=1439 comm="colord" name="/" dev=cifs ino=1407374883553285 scontext=system_u:system_r:colord_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cifs_t:s0 tclass=filesystem


type=SYSCALL msg=audit(1306919093.279:21): arch=x86_64 syscall=statfs success=yes exit=0 a0=10e90f0 a1=7fff34957210 a2=0 a3=1 items=0 ppid=1 pid=1439 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=colord exe=/usr/libexec/colord subj=system_u:system_r:colord_t:s0-s0:c0.c1023 key=(null)

Hash: colord,colord_t,cifs_t,filesystem,getattr

audit2allow

#============= colord_t ==============
allow colord_t cifs_t:filesystem getattr;

audit2allow -R

#============= colord_t ==============
allow colord_t cifs_t:filesystem getattr;

Comment 1 Dominick Grift 2011-06-01 09:52:45 UTC
mgrepl: how have you decided to deal with this, and when are you going to commit that solution? The solution i have commited to master branch requires that you set colord_use_nfs/cifs boolean as i am of the opinion that fs_getattr_all_fs is a bit too coarse.

Comment 2 Miroslav Grepl 2011-06-01 10:51:22 UTC
Well, I don't think we need colord_use_* booleans. I don't see any reason why colord should manage files on NFS/CIFS.

Comment 3 Dominick Grift 2011-06-01 10:56:15 UTC
I agree that there is no compelling reason but seems colord list /media and in some cases probably even reads it, which it appears people often mount cifs/nfs to, plus i guess people could mount cifs and nfs on /var/lib/colord although it does not make sense.

Anyways whatever you decide to do , can you please commit that solution?

Comment 4 Daniel Walsh 2011-06-01 14:14:19 UTC
Just add dontaudits for noxattr file systems.

Comment 5 Miroslav Grepl 2011-06-02 14:28:36 UTC
Fixed in selinux-policy-3.9.16-27.fc15

Comment 6 Fedora Update System 2011-06-10 10:49:52 UTC
selinux-policy-3.9.16-29.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-29.fc15

Comment 7 Fedora Update System 2011-06-11 04:29:11 UTC
Package selinux-policy-3.9.16-29.fc15:
* should fix your issue,
* was pushed to the Fedora 15 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.9.16-29.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-29.fc15
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2011-06-21 17:31:00 UTC
Package selinux-policy-3.9.16-30.fc15:
* should fix your issue,
* was pushed to the Fedora 15 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.9.16-30.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-30.fc15
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2011-06-24 03:52:39 UTC
selinux-policy-3.9.16-30.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Nikita Bige 2011-06-24 09:18:15 UTC
I can't reproduce this bug any more. I think it is fixed. 
Thank you