Bug 705419 - SELinux is preventing /usr/libexec/colord from 'read' accesses on the chr_file 013.
Summary: SELinux is preventing /usr/libexec/colord from 'read' accesses on the chr_fil...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:f58ec443d27...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-17 15:53 UTC by M. A. MacLain
Modified: 2011-09-27 20:10 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.9.16-26.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-03 05:29:53 UTC


Attachments (Terms of Use)

Description M. A. MacLain 2011-05-17 15:53:01 UTC
SELinux is preventing /usr/libexec/colord from 'read' accesses on the chr_file 013.

*****  Plugin device (91.4 confidence) suggests  *****************************

If you want to allow colord to have read access on the 013 chr_file
Then you need to change the label on 013 to a type of a similar device.
Do
# semanage fcontext -a -t SIMILAR_TYPE '013'
# restorecon -v '013'

*****  Plugin catchall (9.59 confidence) suggests  ***************************

If you believe that colord should be allowed read access on the 013 chr_file 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:device_t:s0
Target Objects                013 [ chr_file ]
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-23.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.5-24.fc15.x86_64 #1 SMP Fri May 6
                              08:00:28 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Mon 09 May 2011 06:22:45 PM EDT
Last Seen                     Mon 09 May 2011 06:22:45 PM EDT
Local ID                      d74d0f72-c414-457a-a027-238f5b6ad37e

Raw Audit Messages
type=AVC msg=audit(1304979765.999:22): avc:  denied  { read } for  pid=1131 comm="colord" name="013" dev=devtmpfs ino=19690 scontext=system_u:system_r:colord_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file


type=AVC msg=audit(1304979765.999:22): avc:  denied  { open } for  pid=1131 comm="colord" name="013" dev=devtmpfs ino=19690 scontext=system_u:system_r:colord_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1304979765.999:22): arch=x86_64 syscall=open success=yes exit=EEXIST a0=7ffff3459d60 a1=0 a2=7ffff3459d74 a3=0 items=0 ppid=1 pid=1131 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,device_t,chr_file,read

audit2allow

#============= colord_t ==============
allow colord_t device_t:chr_file { read open };

audit2allow -R

#============= colord_t ==============
allow colord_t device_t:chr_file { read open };

Comment 1 Miroslav Grepl 2011-05-18 05:42:28 UTC
Are you able to reproduce it?

This will a race condition between the kernel creating the device, colord reading
it and udev fixing the label.

Comment 2 Daniel Walsh 2011-05-18 05:58:12 UTC
We might have to add a big dontaudit for these, as I think they are succeeding on the second try.

dontaudit domain device_t:chr_file { read open };

Comment 3 Miroslav Grepl 2011-05-18 11:16:10 UTC
Yes.

Comment 4 Daniel Walsh 2011-05-23 15:54:21 UTC
Lets just add,

dontaudit colord_t device_t ...

Comment 5 Miroslav Grepl 2011-05-24 05:54:26 UTC
Fixed in selinux-policy-3.9.16-25.fc15

Comment 6 Fedora Update System 2011-05-27 16:55:55 UTC
selinux-policy-3.9.16-26.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-26.fc15

Comment 7 Fedora Update System 2011-05-28 23:57:58 UTC
Package selinux-policy-3.9.16-26.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-26.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-26.fc15
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2011-06-03 05:29:10 UTC
selinux-policy-3.9.16-26.fc15 has been pushed to the Fedora 15 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.