Bug 840610 - SELinux is preventing /usr/sbin/tmpwatch from 'search' accesses on the directory kdecache-root.
Summary: SELinux is preventing /usr/sbin/tmpwatch from 'search' accesses on the direct...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:755a50653dab12ce25c8418129a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-16 17:08 UTC by rnakamoto
Modified: 2012-08-20 07:33 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-21 22:52:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description rnakamoto 2012-07-16 17:08:29 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.4-5.fc17.x86_64
time:           Mon 16 Jul 2012 10:08:07 AM PDT

description:
:SELinux is preventing /usr/sbin/tmpwatch from 'search' accesses on the directory kdecache-root.
:
:*****  Plugin catchall_labels (83.8 confidence) suggests  ********************
:
:If you want to allow tmpwatch to have search access on the kdecache-root directory
:Then you need to change the label on kdecache-root
:Do
:# semanage fcontext -a -t FILE_TYPE 'kdecache-root'
:where FILE_TYPE is one of the following: tmp_t, var_t, amavis_spool_t, user_home_dir_t, textrel_shlib_t, filesystem_type, device_t, locale_t, etc_t, file_t, proc_t, man_t, rpm_script_tmp_t, tmp_t, usr_t, var_t, winbind_var_run_t, security_t, etc_t, cert_t, default_t, tmpfile, rpm_log_t, var_t, var_log_t, cfengine_var_lib_t, var_run_t, sssd_public_t, abrt_var_run_t, var_run_t, sandbox_file_t, abrt_var_run_t, likewise_var_lib_t, sysctl_crypto_t, kismet_log_t, rpm_var_cache_t, krb5_conf_t, var_spool_t, httpd_cache_t, var_log_t, var_lib_t, user_home_type, cfengine_var_lib_t, setrans_var_run_t, file_type, httpd_sys_rw_content_t, var_lib_t, var_run_t, device_t, print_spool_t, samba_var_t, sysctl_t, etc_t, abrt_t, bin_t, samba_etc_t, proc_t, home_root_t, avahi_var_run_t, lib_t, mnt_t, sysfs_t, nscd_var_run_t, nslcd_var_run_t, tmpreaper_t, root_t, smbd_var_run_t, sssd_var_lib_t, tmp_t, usr_t, var_t, net_conf_t, cpu_online_t, krb5_host_rcache_t, var_t, var_t, var_run_t, var_run_t, nscd_var_run_t, pcscd_var_run_t. 
:Then execute: 
:restorecon -v 'kdecache-root'
:
:
:*****  Plugin catchall (17.1 confidence) suggests  ***************************
:
:If you believe that tmpwatch should be allowed search access on the kdecache-root 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 tmpwatch /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:tmpreaper_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:unlabeled_t:s0
:Target Objects                kdecache-root [ dir ]
:Source                        tmpwatch
:Source Path                   /usr/sbin/tmpwatch
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           tmpwatch-2.10.3-2.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-134.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.4-5.fc17.x86_64 #1 SMP Thu Jul 5
:                              20:20:59 UTC 2012 x86_64 x86_64
:Alert Count                   3
:First Seen                    Sat 14 Jul 2012 11:09:05 AM PDT
:Last Seen                     Sat 14 Jul 2012 11:09:05 AM PDT
:Local ID                      31eda6bf-d84a-47eb-a3c7-34c9da8cc8a4
:
:Raw Audit Messages
:type=AVC msg=audit(1342289345.563:66): avc:  denied  { search } for  pid=2780 comm="tmpwatch" name="kdecache-root" dev="dm-1" ino=262167 scontext=system_u:system_r:tmpreaper_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1342289345.563:66): arch=x86_64 syscall=chdir success=no exit=EACCES a0=88b01b a1=7fffc63612d0 a2=7fffc63612d0 a3=17 items=0 ppid=2767 pid=2780 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=2 comm=tmpwatch exe=/usr/sbin/tmpwatch subj=system_u:system_r:tmpreaper_t:s0-s0:c0.c1023 key=(null)
:
:Hash: tmpwatch,tmpreaper_t,unlabeled_t,dir,search
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 Miroslav Grepl 2012-07-16 17:35:30 UTC
Fixed in selinux-policy-3.10.0-140.fc17.noarch

Comment 2 Fedora Update System 2012-07-18 13:05:39 UTC
selinux-policy-3.10.0-140.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-140.fc17

Comment 3 Fedora Update System 2012-07-19 09:12:30 UTC
Package selinux-policy-3.10.0-140.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.10.0-140.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-10840/selinux-policy-3.10.0-140.fc17
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-07-21 22:52:41 UTC
selinux-policy-3.10.0-140.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 ZetaFunction 2012-08-10 11:23:18 UTC
Additional Information:
Source Context                system_u:system_r:tmpreaper_t:s0-s0:c0.c1023
Target Context                system_u:object_r:unlabeled_t:s0
Target Objects                kdecache-root [ dir ]
Source                        tmpwatch
Source Path                   /usr/sbin/tmpwatch
Port                          <Unknown>
Host                          brjansk-pc
Source RPM Packages           tmpwatch-2.10.3-2.fc17.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-142.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     brjansk-pc
Platform                      Linux brjansk-pc 3.5.0-2.fc17.x86_64 #1 SMP Mon
                              Jul 30 14:48:59 UTC 2012 x86_64 x86_64
Alert Count                   3
First Seen                    2012-08-10 14:30:15 MSK
Last Seen                     2012-08-10 14:30:15 MSK
Local ID                      ddcbe6ff-4bf0-48f0-9710-8bb5d7790f10

Raw Audit Messages
type=AVC msg=audit(1344594615.81:78): avc:  denied  { search } for  pid=2328 comm="tmpwatch" name="kdecache-root" dev="sda1" ino=262454 scontext=system_u:system_r:tmpreaper_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir

Comment 6 Daniel Walsh 2012-08-13 19:42:13 UTC
Miroslav lets just allow this.

rm -rf /tmp/kdecache-root

Comment 7 Miroslav Grepl 2012-08-20 07:33:23 UTC
Fixed in selinux-policy-3.10.0-146.fc17.noarch


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