Bug 717766

Summary: SELinux is preventing /bin/bash from 'read' accesses on the directory /var/spool/cron.
Product: [Fedora] Fedora Reporter: Gene Snider <genes1122>
Component: cronieAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dominick.grift, dwalsh, mgrepl, mmaslano, pertusus, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:c61fa33201e34c2b79dba8655fc1541de37745883152b1e608e098fd487c2b72
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-29 23:57:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gene Snider 2011-06-29 19:52:12 UTC
SELinux is preventing /bin/bash from 'read' accesses on the directory /var/spool/cron.

*****  Plugin leaks (50.5 confidence) suggests  ******************************

If you want to ignore bash trying to read access the cron directory, because you believe it should not need this access.
Then you should report this as a bug.  
You can generate a local policy module to dontaudit this access.
Do
# grep /bin/bash /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

*****  Plugin catchall (50.5 confidence) suggests  ***************************

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

Additional Information:
Source Context                system_u:system_r:sysstat_t:s0-s0:c0.c1023
Target Context                system_u:object_r:cron_spool_t:s0
Target Objects                /var/spool/cron [ dir ]
Source                        sa1
Source Path                   /bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.2.10-4.fc15
Target RPM Packages           cronie-1.4.8-1.fc15
Policy RPM                    selinux-policy-3.9.16-30.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.8-34.fc15.x86_64 #1 SMP Fri
                              Jun 24 03:45:35 UTC 2011 x86_64 x86_64
Alert Count                   3
First Seen                    Wed 29 Jun 2011 12:02:04 PM PDT
Last Seen                     Wed 29 Jun 2011 12:50:01 PM PDT
Local ID                      41f143f1-7769-45cd-9f15-338e566d7d7e

Raw Audit Messages
type=AVC msg=audit(1309377001.676:56): avc:  denied  { read } for  pid=3655 comm="sa1" path="/var/spool/cron" dev=dm-3 ino=31 scontext=system_u:system_r:sysstat_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cron_spool_t:s0 tclass=dir


type=AVC msg=audit(1309377001.676:56): avc:  denied  { read } for  pid=3655 comm="sa1" path="/etc/cron.d" dev=dm-0 ino=42053 scontext=system_u:system_r:sysstat_t:s0-s0:c0.c1023 tcontext=system_u:object_r:system_cron_spool_t:s0 tclass=dir


type=AVC msg=audit(1309377001.676:56): avc:  denied  { read } for  pid=3655 comm="sa1" path="/etc/crontab" dev=dm-0 ino=44383 scontext=system_u:system_r:sysstat_t:s0-s0:c0.c1023 tcontext=system_u:object_r:system_cron_spool_t:s0 tclass=file


type=SYSCALL msg=audit(1309377001.676:56): arch=x86_64 syscall=execve success=yes exit=0 a0=1e6b610 a1=1e6b8b0 a2=1e6a840 a3=7fff6017de20 items=0 ppid=3653 pid=3655 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm=sa1 exe=/bin/bash subj=system_u:system_r:sysstat_t:s0-s0:c0.c1023 key=(null)

Hash: sa1,sysstat_t,cron_spool_t,dir,read

audit2allow

#============= sysstat_t ==============
allow sysstat_t cron_spool_t:dir read;
allow sysstat_t system_cron_spool_t:dir read;
allow sysstat_t system_cron_spool_t:file read;

audit2allow -R

#============= sysstat_t ==============
allow sysstat_t cron_spool_t:dir read;
allow sysstat_t system_cron_spool_t:dir read;
allow sysstat_t system_cron_spool_t:file read;

Comment 1 Daniel Walsh 2011-06-29 23:57:24 UTC

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