Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1518549 - SELinux is preventing systemd-logind from 'map' accesses on the file /etc/ld.so.cache.
Summary: SELinux is preventing systemd-logind from 'map' accesses on the file /etc/ld....
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:0a805654999c50906097580ed5a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-29 07:54 UTC by Danie de Jager
Modified: 2018-05-05 19:10 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-11 14:17:34 UTC


Attachments (Terms of Use)

Description Danie de Jager 2017-11-29 07:54:45 UTC
Description of problem:
SELinux is preventing systemd-logind 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 systemd-logind 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_t, ld_so_cache_t, ld_so_t, lib_t, locale_t, prelink_exec_t, sssd_public_t, systemd_logind_exec_t, systemd_passwd_agent_exec_t, systemd_systemctl_exec_t, textrel_shlib_t.
Then execute:
restorecon -v '/etc/ld.so.cache'


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

If you believe that systemd-logind 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 'systemd-logind' --raw | audit2allow -M my-systemdlogind
# semodule -X 300 -i my-systemdlogind.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                system_u:object_r:etc_t:s0
Target Objects                /etc/ld.so.cache [ file ]
Source                        systemd-logind
Source Path                   systemd-logind
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           glibc-2.26-16.fc27.x86_64
Policy RPM                    selinux-policy-3.13.1-283.17.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.13.15-300.fc27.x86_64 #1 SMP Tue
                              Nov 21 21:10:22 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-11-29 09:48:33 SAST
Last Seen                     2017-11-29 09:48:33 SAST
Local ID                      cc2a94c6-cf19-4f39-857c-509822755efd

Raw Audit Messages
type=AVC msg=audit(1511941713.364:195): avc:  denied  { map } for  pid=818 comm="systemd-logind" path="/etc/ld.so.cache" dev="dm-0" ino=269262 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file permissive=0


Hash: systemd-logind,systemd_logind_t,etc_t,file,map

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

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

Comment 1 Lukas Vrabec 2017-12-11 14:17:34 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

Comment 2 bill.zannoni 2018-05-04 10:07:27 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.

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

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

Comment 3 bill.zannoni 2018-05-05 19:10:19 UTC
Description of problem:
I upgraded Fedora from 26 to 27. It's running in a VirtualBox VM.

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

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


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