Bug 906981 - SELinux is preventing /usr/libexec/colord from getattr access on the file /run/systemd/sessions/2.
Summary: SELinux is preventing /usr/libexec/colord from getattr access on the file /ru...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-02 08:49 UTC by Richard Hughes
Modified: 2013-02-11 04:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-11 04:55:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard Hughes 2013-02-02 08:49:09 UTC
Description of problem:
colord now tracks which seat DBus requests come from, so it can deal with multiseat displays in the correct way.

Version-Release number of selected component (if applicable):
selinux-policy-3.11.1-67.fc18.noarch
colord-0.1.28-1.fc18.x86_64

How reproducible:
Always

Steps to Reproduce:
1. sudo setenforce 1
2. colormgr create-device device temp display

Expected results:

Created device:
Object Path:   /org/freedesktop/ColorManager/devices/device_hughsie_1000
Owner:         hughsie
Created:       February  2 2013, 08:34:45 AM
Modified:      February  2 2013, 08:34:45 AM
Type:          display
Enabled:       Yes
Embedded:      No
Seat:          seat0
Scope:         temp
Colourspace:   unknown
Device ID:     device
Metadata:      OwnerCmdline=colormgr create-device device temp display 

Actual results:

Created device:
Object Path:   /org/freedesktop/ColorManager/devices/device_hughsie_1000
Owner:         hughsie
Created:       February  2 2013, 08:34:45 AM
Modified:      February  2 2013, 08:34:45 AM
Type:          display
Enabled:       Yes
Embedded:      No
Scope:         temp
Colourspace:   unknown
Device ID:     device
Metadata:      OwnerCmdline=colormgr create-device device temp display 

Additional info:
When SELinux is on, I get: (colord:10842): Cd-WARNING **: failed to get session [pid 10955]: Unknown error -13

SELinux is preventing /usr/libexec/colord from getattr access on the file /run/systemd/sessions/2.

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

If you believe that colord should be allowed getattr access on the 2 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
Target Context                system_u:object_r:systemd_logind_sessions_t:s0
Target Objects                /run/systemd/sessions/2 [ file ]
Source                        colord
Source Path                   /usr/libexec/colord
Port                          <Unknown>
Host                          hughsie-work.lan
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-67.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     hughsie-work.lan
Platform                      Linux hughsie-work.lan 3.7.2-201.fc18.x86_64 #1
                              SMP Fri Jan 11 22:16:23 UTC 2013 x86_64 x86_64
Alert Count                   4
First Seen                    2013-02-01 17:18:50 GMT
Last Seen                     2013-02-02 08:34:54 GMT
Local ID                      852c46dd-59b2-4c3d-8d17-477c2f23b939

Raw Audit Messages
type=AVC msg=audit(1359794094.571:697): avc:  denied  { getattr } for  pid=20838 comm="colord" path="/run/systemd/sessions/2" dev="tmpfs" ino=164224 scontext=system_u:system_r:colord_t:s0 tcontext=system_u:object_r:systemd_logind_sessions_t:s0 tclass=file


type=SYSCALL msg=audit(1359794094.571:697): arch=x86_64 syscall=fstat success=yes exit=0 a0=e a1=7fff255b8fc0 a2=7fff255b8fc0 a3=238 items=0 ppid=1 pid=20838 auid=4294967295 uid=998 gid=997 euid=998 suid=998 fsuid=998 egid=997 sgid=997 fsgid=997 ses=4294967295 tty=(none) comm=colord exe=2F7573722F6C6962657865632F636F6C6F7264202864656C6574656429 subj=system_u:system_r:colord_t:s0 key=(null)

Hash: colord,colord_t,systemd_logind_sessions_t,file,getattr

audit2allow

#============= colord_t ==============
allow colord_t systemd_logind_sessions_t:file getattr;

audit2allow -R

#============= colord_t ==============
allow colord_t systemd_logind_sessions_t:file getattr;

Comment 1 Miroslav Grepl 2013-02-04 11:00:58 UTC
Fixed in selinux-policy-3.11.1-75.fc18.noarch

Comment 2 Fedora Update System 2013-02-05 09:23:51 UTC
selinux-policy-3.11.1-76.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-76.fc18

Comment 3 Fedora Update System 2013-02-08 02:36:14 UTC
Package selinux-policy-3.11.1-76.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-76.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-2101/selinux-policy-3.11.1-76.fc18
then log in and leave karma (feedback).

Comment 4 Ivan Virgili 2013-02-10 12:57:59 UTC
Package selinux-policy-3.11.1-76.fc18 solved the problem.

Comment 5 Fedora Update System 2013-02-11 04:55:27 UTC
selinux-policy-3.11.1-76.fc18 has been pushed to the Fedora 18 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.