Bug 1574907 - SELinux is preventing plymouthd from 'map' accesses on the file /etc/ld.so.cache.
Summary: SELinux is preventing plymouthd from 'map' accesses on the file /etc/ld.so.ca...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:5e5fc3147f7b24b8fa83345a588...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-04 10:09 UTC by bill.zannoni
Modified: 2018-05-22 10:54 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-22 10:54:16 UTC
Type: ---


Attachments (Terms of Use)

Description bill.zannoni 2018-05-04 10:09:16 UTC
Description of problem:
Every time I boot into Fedora 27 (running as a VirtualBox VM), freshly updated from 26, This issue comes out and is reported by abrt alert.
SELinux is preventing plymouthd from 'map' accesses on the file /etc/ld.so.cache.

*****  Plugin restorecon (94.8 confidence) suggests   ************************

If you want to fix the label. 
/etc/ld.so.cache default label should be ld_so_cache_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /etc/ld.so.cache

*****  Plugin catchall_labels (5.21 confidence) suggests   *******************

If you want to allow plymouthd to have map access on the ld.so.cache file
Then you need to change the label on /etc/ld.so.cache
Do
# semanage fcontext -a -t FILE_TYPE '/etc/ld.so.cache'
where FILE_TYPE is one of the following: file_context_t, fonts_cache_t, fonts_t, ld_so_cache_t, ld_so_t, lib_t, locale_t, plymouthd_exec_t, prelink_exec_t, sssd_public_t, textrel_shlib_t.
Then execute:
restorecon -v '/etc/ld.so.cache'


*****  Plugin catchall (1.44 confidence) suggests   **************************

If you believe that plymouthd should be allowed map access on the ld.so.cache 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 'plymouthd' --raw | audit2allow -M my-plymouthd
# semodule -X 300 -i my-plymouthd.pp

Additional Information:
Source Context                system_u:system_r:plymouthd_t:s0
Target Context                system_u:object_r:etc_t:s0
Target Objects                /etc/ld.so.cache [ file ]
Source                        plymouthd
Source Path                   plymouthd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           glibc-2.26-27.fc27.x86_64 glibc-2.26-27.fc27.i686
Policy RPM                    selinux-policy-3.13.1-283.32.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.16.5-200.fc27.x86_64 #1 SMP Fri
                              Apr 27 19:05:44 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-05-04 11:16:27 CEST
Last Seen                     2018-05-04 11:16:27 CEST
Local ID                      8fc69c00-9ea2-421f-96ab-ecdef503e1bd

Raw Audit Messages
type=AVC msg=audit(1525425387.356:401): avc:  denied  { map } for  pid=4752 comm="plymouthd" path="/etc/ld.so.cache" dev="dm-0" ino=917525 scontext=system_u:system_r:plymouthd_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file permissive=0


Hash: plymouthd,plymouthd_t,etc_t,file,map

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

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.16.5-200.fc27.x86_64
type:           libreport

Potential duplicate: bug 1482359

Comment 1 Lukas Vrabec 2018-05-22 10:54:16 UTC
*****  Plugin restorecon (94.8 confidence) suggests   ************************

If you want to fix the label. 
/etc/ld.so.cache default label should be ld_so_cache_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /etc/ld.so.cache


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