Bug 1484161

Summary: SELinux is preventing gsd-color from 'map' accesses on the file /etc/udev/hwdb.bin.
Product: [Fedora] Fedora Reporter: Joachim Frieben <jfrieben>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dominick.grift, dwalsh, lsm5, lvrabec, mgrepl, plautrba, ryan.lue, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:5164d2b95472988cba67390b74d8e85029684496438ff44f0935754535f09adf;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-30 22:36:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joachim Frieben 2017-08-22 22:24:45 UTC
Description of problem:
SELinux is preventing gsd-color from 'map' accesses on the file /etc/udev/hwdb.bin.

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

If you believe that gsd-color should be allowed map 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 'gsd-color' --raw | audit2allow -M my-gsdcolor
# semodule -X 300 -i my-gsdcolor.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:systemd_hwdb_etc_t:s0
Target Objects                /etc/udev/hwdb.bin [ file ]
Source                        gsd-color
Source Path                   gsd-color
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           systemd-udev-234-5.fc27.x86_64
Policy RPM                    selinux-policy-3.13.1-272.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.13.0-0.rc6.git0.1.fc27.x86_64 #1
                              SMP Tue Aug 22 10:46:58 UTC 2017 x86_64 x86_64
Alert Count                   2
First Seen                    2017-08-22 14:42:24 CEST
Last Seen                     2017-08-22 14:42:24 CEST
Local ID                      56614261-d3d4-4121-af0b-3b2109877271

Raw Audit Messages
type=AVC msg=audit(1503405744.79:238): avc:  denied  { map } for  pid=1504 comm="gsd-color" path="/etc/udev/hwdb.bin" dev="dm-1" ino=401042 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_hwdb_etc_t:s0 tclass=file permissive=0


Hash: gsd-color,xdm_t,systemd_hwdb_etc_t,file,map

Version-Release number of selected component:
selinux-policy-3.13.1-272.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.8-300.fc26.x86_64
type:           libreport

Comment 1 ryan.lue 2017-10-13 16:54:02 UTC
I ran into a very similar problem, but rather than 

> SELinux is preventing gsd-color from 'map' accesses on the file /etc/udev/hwdb.bin.

I'm getting

> SELinux is preventing gsd-color from setattr access on the directory cache.

Full log copied below:

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

If you believe that gsd-color should be allowed setattr access on the cache directory 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 'gsd-color' --raw | audit2allow -M my-gsdcolor
# semodule -X 300 -i my-gsdcolor.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:lib_t:s0
Target Objects                cache [ dir ]
Source                        gsd-color
Source Path                   gsd-color
Port                          <Unknown>
Host                          sardanapalus.local
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-259.fc26.noarch selinux-
                              policy-3.13.1-260.10.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     sardanapalus.local
Platform                      Linux sardanapalus.local 4.11.8-300.fc26.x86_64 #1
                              SMP Thu Jun 29 20:09:48 UTC 2017 x86_64 x86_64
Alert Count                   14
First Seen                    2017-10-14 00:44:51 CST
Last Seen                     2017-10-14 00:47:55 CST
Local ID                      3ee53eea-8ec5-425b-8889-1dd000de7e7a

Raw Audit Messages
type=AVC msg=audit(1507913275.118:310): avc:  denied  { setattr } for  pid=1559 comm="gsd-xsettings" name="cache" dev="dm-1" ino=266548 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=dir permissive=0


Hash: gsd-color,xdm_t,lib_t,dir,setattr

Comment 2 Ben Cotton 2018-11-27 14:35:13 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Ben Cotton 2018-11-30 22:36:52 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.