Bug 919014 - SELinux is preventing /usr/bin/find from 'read' accesses on the directory /.
Summary: SELinux is preventing /usr/bin/find from 'read' accesses on the directory /.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:23e14c81fade253e6c69ffc6900...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-07 12:07 UTC by James Cape
Modified: 2013-03-14 03:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-14 03:00:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description James Cape 2013-03-07 12:07:27 UTC
Description of problem:
SELinux is preventing /usr/bin/find from 'read' accesses on the directory /.

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

If you want to allow find to have read access on the  directory
Then you need to change the label on /
Do
# semanage fcontext -a -t FILE_TYPE '/'
where FILE_TYPE is one of the following: rpm_var_lib_t, device_t, locale_t, sssd_public_t, etc_t, systemd_logind_var_run_t, systemd_passwd_var_run_t, abrt_t, base_ro_file_type, lib_t, man_t, prelink_log_t, root_t, usr_t, prelink_var_lib_t, device_t, etc_t, textrel_shlib_t, sysfs_t, cgroup_t, bin_t, init_t, lib_t, prelink_cron_system_t, var_lib_t, samba_etc_t, net_conf_t, var_run_t, sysctl_crypto_t, systemd_unit_file_type, rpm_var_cache_t, etc_t, proc_t, init_var_run_t, cert_t, var_lib_t, nscd_var_run_t, var_lib_t, net_conf_t, sysctl_kernel_t, cert_t. 
Then execute: 
restorecon -v '/'


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

If you believe that find should be allowed read access on the  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:
# grep find /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:prelink_cron_system_t:s0-s0:c0.c
                              1023
Target Context                system_u:object_r:mnt_t:s0
Target Objects                / [ dir ]
Source                        find
Source Path                   /usr/bin/find
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           findutils-4.5.10-5.fc18.x86_64
Target RPM Packages           filesystem-3.1-2.fc18.x86_64
Policy RPM                    selinux-policy-3.11.1-82.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.8.1-201.fc18.x86_64 #1 SMP Thu
                              Feb 28 19:23:08 UTC 2013 x86_64 x86_64
Alert Count                   9
First Seen                    2013-03-05 03:30:07 EST
Last Seen                     2013-03-07 03:14:04 EST
Local ID                      fc39b8a7-d527-47e5-b469-53e9ae8f046f

Raw Audit Messages
type=AVC msg=audit(1362644044.569:1401): avc:  denied  { read } for  pid=27716 comm="find" name="/" dev="dm-1" ino=2 scontext=system_u:system_r:prelink_cron_system_t:s0-s0:c0.c1023 tcontext=system_u:object_r:mnt_t:s0 tclass=dir


type=SYSCALL msg=audit(1362644044.569:1401): arch=x86_64 syscall=open success=no exit=EACCES a0=425fa7 a1=0 a2=0 a3=10 items=0 ppid=27708 pid=27716 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=70 tty=(none) comm=find exe=/usr/bin/find subj=system_u:system_r:prelink_cron_system_t:s0-s0:c0.c1023 key=(null)

Hash: find,prelink_cron_system_t,mnt_t,dir,read

audit2allow

#============= prelink_cron_system_t ==============
allow prelink_cron_system_t mnt_t:dir read;

audit2allow -R

#============= prelink_cron_system_t ==============
allow prelink_cron_system_t mnt_t:dir read;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.1-201.fc18.x86_64
type:           libreport

Potential duplicate: bug 703437

Comment 1 Daniel Walsh 2013-03-07 14:46:32 UTC
02e6e5eb370020972b03a07ef2c58fe9373d191f fixes this in Rawhide.

Comment 2 Miroslav Grepl 2013-03-11 15:29:01 UTC
Back ported.

Comment 3 Fedora Update System 2013-03-12 13:55:37 UTC
selinux-policy-3.11.1-85.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/FEDORA-2013-3605/selinux-policy-3.11.1-85.fc18

Comment 4 Fedora Update System 2013-03-12 23:35:35 UTC
Package selinux-policy-3.11.1-85.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-85.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-3605/selinux-policy-3.11.1-85.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-03-14 03:00:47 UTC
selinux-policy-3.11.1-85.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


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