Bug 1311532 - SELinux is preventing /usr/lib/systemd/systemd from 'mounton' accesses on the directory /etc.
SELinux is preventing /usr/lib/systemd/systemd from 'mounton' accesses on the...
Status: CLOSED DUPLICATE of bug 1317927
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
medium Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
: 1312637 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2016-02-24 07:22 EST by Jakub Filak
Modified: 2016-11-30 19:50 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-03-16 11:01:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jakub Filak 2016-02-24 07:22:11 EST
Description of problem:
I stopped abrt-ccpp.service so systemd-coredump was used in core_pattern and I ran will_segfault.
SELinux is preventing /usr/lib/systemd/systemd from 'mounton' accesses on the directory /etc.

*****  Plugin catchall_labels (83.8 confidence) suggests   *******************

If you want to allow systemd to have mounton access on the etc directory
Then you need to change the label on /etc
# semanage fcontext -a -t FILE_TYPE '/etc'
where FILE_TYPE is one of the following: admin_home_t, anon_inodefs_t, audit_spool_t, auditd_log_t, autofs_t, automount_tmp_t, bacula_store_t, binfmt_misc_fs_t, boot_t, capifs_t, cgroup_t, cifs_t, debugfs_t, default_t, device_t, devpts_t, dnssec_t, dosfs_t, ecryptfs_t, efivarfs_t, fusefs_t, home_root_t, hugetlbfs_t, ifconfig_var_run_t, init_var_run_t, initrc_tmp_t, iso9660_t, kdbusfs_t, mail_spool_t, mnt_t, mqueue_spool_t, named_conf_t, news_spool_t, nfs_t, nfsd_fs_t, openshift_tmp_t, openshift_var_lib_t, oracleasmfs_t, proc_t, proc_xen_t, pstore_t, public_content_rw_t, public_content_t, ramfs_t, random_seed_t, removable_t, root_t, rpc_pipefs_t, security_t, spufs_t, src_t, svirt_sandbox_file_t, sysctl_fs_t, sysctl_t, sysfs_t, sysv_t, tmp_t, tmpfs_t, unlabeled_t, usbfs_t, user_home_dir_t, user_home_t, user_tmp_t, usr_t, var_lib_nfs_t, var_lib_t, var_lock_t, var_log_t, var_run_t, var_t, virt_image_t, virt_var_lib_t, vmblock_t, vxfs_t, xend_var_lib_t, xend_var_run_t, xenfs_t, xenstored_var_lib_t. 
Then execute: 
restorecon -v '/etc'

*****  Plugin catchall (17.1 confidence) suggests   **************************

If you believe that systemd should be allowed mounton access on the etc directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep (coredump) /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:etc_t:s0
Target Objects                /etc [ dir ]
Source                        (coredump)
Source Path                   /usr/lib/systemd/systemd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-229-2.fc24.x86_64
Target RPM Packages           filesystem-3.2-37.fc24.x86_64
Policy RPM                    selinux-policy-3.13.1-171.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.5.0-0.rc4.git3.1.fc24.x86_64 #1
                              SMP Fri Feb 19 19:38:12 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-02-24 13:05:59 CET
Last Seen                     2016-02-24 13:05:59 CET
Local ID                      b5ac9add-757d-41a2-a5ca-9066f05637f6

Raw Audit Messages
type=AVC msg=audit(1456315559.379:6642): avc:  denied  { mounton } for  pid=11035 comm="(coredump)" path="/etc" dev="dm-3" ino=262657 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=dir permissive=1

type=SYSCALL msg=audit(1456315559.379:6642): arch=x86_64 syscall=mount success=yes exit=0 a0=5624a143eb10 a1=5624a143eb10 a2=0 a3=5000 items=0 ppid=1 pid=11035 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=(coredump) exe=/usr/lib/systemd/systemd subj=system_u:system_r:init_t:s0 key=(null)

Hash: (coredump),init_t,etc_t,dir,mounton

Version-Release number of selected component:

Additional info:
reporter:       libreport-
hashmarkername: setroubleshoot
kernel:         4.5.0-0.rc4.git3.1.fc24.x86_64
type:           libreport
Comment 1 Lukas Vrabec 2016-03-16 10:59:52 EDT
*** Bug 1312637 has been marked as a duplicate of this bug. ***
Comment 2 Lukas Vrabec 2016-03-16 11:01:29 EDT

*** This bug has been marked as a duplicate of bug 1317927 ***

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