Bug 1373082 - SELinux is preventing /usr/libexec/colord from read access on the file /etc/udev/hwdb.bin.
Summary: SELinux is preventing /usr/libexec/colord from read access on the file /etc/u...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
: 1381579 1398030 1460480 (view as bug list)
Depends On:
Blocks: 1420851
TreeView+ depends on / blocked
 
Reported: 2016-09-05 06:28 UTC by Radek Bíba
Modified: 2020-02-14 17:55 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 15:15:11 UTC
Target Upstream Version:


Attachments (Terms of Use)
List of today's denials (6.92 KB, text/plain)
2016-09-05 07:56 UTC, Radek Bíba
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1861 normal SHIPPED_LIVE selinux-policy bug fix update 2017-08-01 17:50:24 UTC

Description Radek Bíba 2016-09-05 06:28:03 UTC
*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that colord should be allowed read access on the hwdb.bin 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:
# ausearch -c 'colord' --raw | audit2allow -M my-colord
# semodule -i my-colord.pp

Additional Information:
Source Context                system_u:system_r:colord_t:s0
Target Context                system_u:object_r:systemd_hwdb_etc_t:s0
Target Objects                /etc/udev/hwdb.bin [ file ]
Source                        colord
Source Path                   /usr/libexec/colord
Port                          <Unknown>
Host                          REDACTED
Source RPM Packages           colord-1.2.7-2.el7.x86_64
Target RPM Packages           systemd-219-27.el7.x86_64
Policy RPM                    selinux-policy-3.13.1-96.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     REDACTED
Platform                      Linux REDACTED
                              3.10.0-500.el7.x86_64 #1 SMP Tue Aug 30 18:58:04
                              EDT 2016 x86_64 x86_64
Alert Count                   4
First Seen                    2016-08-26 07:59:58 CEST
Last Seen                     2016-09-05 08:20:09 CEST
Local ID                      8d9de012-147d-4642-bf87-c860b47eff24

Raw Audit Messages
type=AVC msg=audit(1473056409.994:170): avc:  denied  { read } for  pid=1704 comm="colord" name="hwdb.bin" dev="sda3" ino=3408740 scontext=system_u:system_r:colord_t:s0 tcontext=system_u:object_r:systemd_hwdb_etc_t:s0 tclass=file


type=SYSCALL msg=audit(1473056409.994:170): arch=x86_64 syscall=open success=no exit=EACCES a0=7f430c0e02fb a1=80000 a2=1b6 a3=24 items=0 ppid=1 pid=1704 auid=4294967295 uid=996 gid=994 euid=996 suid=996 fsuid=996 egid=994 sgid=994 fsgid=994 tty=(none) ses=4294967295 comm=colord exe=/usr/libexec/colord subj=system_u:system_r:colord_t:s0 key=(null)

Hash: colord,colord_t,systemd_hwdb_etc_t,file,read

Comment 1 Milos Malik 2016-09-05 06:58:55 UTC
Could you switch the colord_t domain to permissive and collect all SELinux denials causes by colord?

# semanage permissive -a colord_t

For switching the colord_t domain back to enforcing, please use following command:

# semanage permissive -d colord_t

Comment 2 Radek Bíba 2016-09-05 07:10:34 UTC
Sure, I've executed the recommended command. There apparently are no other denials, though, because this is the only one announced by SELinux troubleshooter.

I might add that the denial appeared in sealert right after I logged in to Gnome. I didn't do anything in the color management screen in Gnome settings, and if I do open the screen and click around, no new (permitted or not) denial is logged. Is there anything else I could do to help scope this issue?

Comment 3 Milos Malik 2016-09-05 07:48:45 UTC
Following command should find all today's SELinux denials:

# ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -ts today

Comment 4 Radek Bíba 2016-09-05 07:56:07 UTC
Created attachment 1197808 [details]
List of today's denials

OK, here they are.

Those involving aaargh-0.7.1-py2.7.egg probably won't appear anymore and aren't bugs. sealert recommended restoring the context of that directory, and I did that.

Comment 7 Alexander Todorov 2016-10-18 07:41:16 UTC
*** Bug 1381579 has been marked as a duplicate of this bug. ***

Comment 9 Lukas Vrabec 2016-11-24 11:21:18 UTC
*** Bug 1398030 has been marked as a duplicate of this bug. ***

Comment 13 Lukas Vrabec 2017-06-12 11:46:10 UTC
*** Bug 1460480 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2017-08-01 15:15:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1861


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