Bug 1347942 - SELinux is preventing (ostnamed) from 'mounton' accesses on the directory /boot.
Summary: SELinux is preventing (ostnamed) from 'mounton' accesses on the directory /boot.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 24
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:1702da6e68227b57d6fe08a7722...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-18 22:14 UTC by Biji
Modified: 2016-08-24 17:50 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-20 12:12:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Biji 2016-06-18 22:14:45 UTC
Description of problem:
flatpak?
SELinux is preventing (ostnamed) from 'mounton' accesses on the directory /boot.

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

If you want to fix the label. 
/boot default label should be boot_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /boot

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

If you want to allow (ostnamed) to have mounton access on the boot directory
Then you need to change the label on /boot
Do
# semanage fcontext -a -t FILE_TYPE '/boot'
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, cephfs_t, cgroup_t, cifs_t, container_image_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, 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 '/boot'


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

If you believe that (ostnamed) should be allowed mounton access on the boot 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 '(ostnamed)' --raw | audit2allow -M my-ostnamed
# semodule -X 300 -i my-ostnamed.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                unconfined_u:object_r:unlabeled_t:s0
Target Objects                /boot [ dir ]
Source                        (ostnamed)
Source Path                   (ostnamed)
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           filesystem-3.2-37.fc24.x86_64
Policy RPM                    selinux-policy-3.13.1-190.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.5.7-300.fc24.x86_64 #1 SMP Wed
                              Jun 8 18:12:45 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-06-13 23:28:22 WIB
Last Seen                     2016-06-13 23:28:22 WIB
Local ID                      afea760c-ff5c-4a99-9a5a-f31afedde43e

Raw Audit Messages
type=AVC msg=audit(1465835302.678:277): avc:  denied  { mounton } for  pid=6554 comm="(ostnamed)" path="/boot" dev="dm-0" ino=261 scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:unlabeled_t:s0 tclass=dir permissive=0


Hash: (ostnamed),init_t,unlabeled_t,dir,mounton

Version-Release number of selected component:
selinux-policy-3.13.1-190.fc24.noarch

Additional info:
reporter:       libreport-2.7.1
hashmarkername: setroubleshoot
kernel:         4.5.7-300.fc24.x86_64
reproducible:   Not sure how to reproduce the problem
type:           libreport

Potential duplicate: bug 1342143

Comment 1 Lukas Vrabec 2016-06-20 12:12:42 UTC
Hi, 

Please run:
# restorecon -Rv /

Thank you.

Comment 2 Lyude 2016-08-24 17:49:17 UTC
Description of problem:
This comes up randomly on all of my Fedora systems, even after running restorecon

Version-Release number of selected component:
selinux-policy-3.13.1-191.12.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.6.7-300.fc24.x86_64
type:           libreport

Comment 3 Lyude 2016-08-24 17:50:43 UTC
Whoops, ignore me. Didn't realize selinuxtroubleshoot would try commenting on closed bugs…


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