Bug 755157 - SELinux is preventing /usr/libexec/colord from read, write access on the file libv4l-root:usb-0000:00:1a.0-1.4:046d:092c:Camera.
Summary: SELinux is preventing /usr/libexec/colord from read, write access on the file...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:e7ec6231a0111870e8f4275e09b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-19 06:53 UTC by Robert Hancock
Modified: 2012-03-21 18:53 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.10.0-104.fc17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-21 18:53:36 UTC
Type: ---


Attachments (Terms of Use)

Description Robert Hancock 2011-11-19 06:53:55 UTC
libreport version: 2.0.6
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.1.1-2.fc16.x86_64
reason:         SELinux is preventing /usr/libexec/colord from read, write access on the file libv4l-root:usb-0000:00:1a.0-1.4:046d:092c:Camera.
time:           Sat Nov 19 00:53:45 2011

description:
:SELinux is preventing /usr/libexec/colord from read, write access on the file libv4l-root:usb-0000:00:1a.0-1.4:046d:092c:Camera.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that colord should be allowed read write access on the libv4l-root:usb-0000:00:1a.0-1.4:046d:092c:Camera 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:initrc_state_t:s0
:Target Objects                libv4l-root:usb-0000:00:1a.0-1.4:046d:092c:Camera
:                              [ 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-44.fc15
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 2.6.40.6-0.fc15.x86_64 #1 SMP Tue
:                              Oct 4 00:39:50 UTC 2011 x86_64 x86_64
:Alert Count                   27
:First Seen                    Thu 04 Aug 2011 01:32:35 PM CST
:Last Seen                     Wed 09 Nov 2011 11:59:44 PM CST
:Local ID                      3bdbdd96-2d10-490e-95d5-e7299ef67c8e
:
:Raw Audit Messages
:type=AVC msg=audit(1320904784.676:20): avc:  denied  { read write } for  pid=1409 comm="colord" name="libv4l-root:usb-0000:00:1a.0-1.4:046d:092c:Camera" dev=tmpfs ino=16272 scontext=system_u:system_r:colord_t:s0-s0:c0.c1023 tcontext=system_u:object_r:initrc_state_t:s0 tclass=file
:
:
:type=AVC msg=audit(1320904784.676:20): avc:  denied  { open } for  pid=1409 comm="colord" name="libv4l-root:usb-0000:00:1a.0-1.4:046d:092c:Camera" dev=tmpfs ino=16272 scontext=system_u:system_r:colord_t:s0-s0:c0.c1023 tcontext=system_u:object_r:initrc_state_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1320904784.676:20): arch=x86_64 syscall=open success=yes exit=ENODEV a0=7fffb8b419e0 a1=a0002 a2=180 a3=0 items=0 ppid=1 pid=1409 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,initrc_state_t,file,read,write
:
:audit2allow
:
:#============= colord_t ==============
:#!!!! The source type 'colord_t' can write to a 'file' of the following types:
:# colord_tmpfs_t, colord_var_lib_t, colord_tmp_t, user_tmpfs_t
:
:allow colord_t initrc_state_t:file { read write open };
:
:audit2allow -R
:
:#============= colord_t ==============
:#!!!! The source type 'colord_t' can write to a 'file' of the following types:
:# colord_tmpfs_t, colord_var_lib_t, colord_tmp_t, user_tmpfs_t
:
:allow colord_t initrc_state_t:file { read write open };
:

Comment 1 Miroslav Grepl 2011-11-21 11:33:11 UTC
Is there a daemon running as initrc?

ps -eZ |grep initrc

Comment 2 Robert Hancock 2011-11-22 00:47:53 UTC
It looks like the motion daemon (from RPMFusion) is running as initrc:

system_u:system_r:initrc_t:s0    1292 ?        03:25:29 motion

It would be accessing the camera device the denial error referenced. Maybe it is responsible somehow? Motion is started by a SysV init script, I don't see anything special in there to set its SELinux context.

Comment 3 Miroslav Grepl 2011-11-23 13:28:24 UTC
Looks like we will need to add motion policy.

Comment 4 Miroslav Grepl 2012-03-15 14:21:47 UTC
I added a policy for motion to fedora17

Comment 5 Fedora Update System 2012-03-19 17:54:45 UTC
selinux-policy-3.10.0-103.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-103.fc17

Comment 6 Fedora Update System 2012-03-20 06:07:49 UTC
Package selinux-policy-3.10.0-104.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-104.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-4248/selinux-policy-3.10.0-104.fc17
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-03-21 18:53:36 UTC
selinux-policy-3.10.0-104.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.