Bug 717617

Summary: SELinux is preventing /usr/sbin/sendmail.sendmail from 'read' accesses on the directory /var/spool/cron.
Product: [Fedora] Fedora Reporter: Jay Turner <jturner>
Component: cronieAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 14CC: dominick.grift, dwalsh, mgrepl, mmaslano, pertusus, random, srevivo, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:cc3aff34dafcf83fbf0b5baa48939e94fb7daae84065764367a5dd34e114e01a
Fixed In Version: cronie-1.4.8-2.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-31 03:47:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jay Turner 2011-06-29 12:04:40 UTC
SELinux is preventing /usr/sbin/sendmail.sendmail from 'read' accesses on the directory /var/spool/cron.

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

If you want to ignore sendmail.sendmail 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 /usr/sbin/sendmail.sendmail /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

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

If you believe that sendmail.sendmail 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 sendmail /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:system_mail_t:s0-s0:c0.c1023
Target Context                system_u:object_r:cron_spool_t:s0
Target Objects                /var/spool/cron [ dir ]
Source                        sendmail
Source Path                   /usr/sbin/sendmail.sendmail
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           sendmail-8.14.4-10.fc14
Target RPM Packages           cronie-1.4.8-1.fc14
Policy RPM                    selinux-policy-3.9.7-42.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.35.13-92.fc14.x86_64 #1 SMP Sat May 21
                              17:26:25 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Wed 29 Jun 2011 08:01:02 AM EDT
Last Seen                     Wed 29 Jun 2011 08:01:02 AM EDT
Local ID                      9ee3bea3-6f32-47fb-b156-48fb24c1b91f

Raw Audit Messages
type=AVC msg=audit(1309348862.64:33394): avc:  denied  { read } for  pid=3784 comm="sendmail" path="/var/spool/cron" dev=dm-1 ino=1574516 scontext=system_u:system_r:system_mail_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cron_spool_t:s0 tclass=dir


type=AVC msg=audit(1309348862.64:33394): avc:  denied  { read } for  pid=3784 comm="sendmail" path="/etc/cron.d" dev=dm-1 ino=925110 scontext=system_u:system_r:system_mail_t:s0-s0:c0.c1023 tcontext=system_u:object_r:system_cron_spool_t:s0 tclass=dir


type=SYSCALL msg=audit(1309348862.64:33394): arch=x86_64 syscall=execve success=yes exit=0 a0=7fffd31d6b40 a1=7fffd31d3920 a2=7fffd31f7248 a3=7fffd31d3690 items=0 ppid=3762 pid=3784 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=51 sgid=51 fsgid=51 tty=(none) ses=2 comm=sendmail exe=/usr/sbin/sendmail.sendmail subj=system_u:system_r:system_mail_t:s0-s0:c0.c1023 key=(null)

Hash: sendmail,system_mail_t,cron_spool_t,dir,read

audit2allow

#============= system_mail_t ==============
allow system_mail_t cron_spool_t:dir read;
allow system_mail_t system_cron_spool_t:dir read;

audit2allow -R

#============= system_mail_t ==============
allow system_mail_t cron_spool_t:dir read;
allow system_mail_t system_cron_spool_t:dir read;

Comment 1 Daniel Walsh 2011-06-29 13:02:53 UTC
Looks like cronie is leaking.

https://bugzilla.redhat.com/show_bug.cgi?id=717505

Comment 2 Tomas Mraz 2011-06-29 13:39:47 UTC
Fixed in cronie-1.4.8-2.fc14

Comment 3 Fedora Update System 2011-06-29 13:41:14 UTC
cronie-1.4.8-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/cronie-1.4.8-2.fc14

Comment 4 Tomas Mraz 2011-06-29 13:43:05 UTC
*** Bug 717644 has been marked as a duplicate of this bug. ***

Comment 5 Fedora Update System 2011-06-29 22:03:48 UTC
Package cronie-1.4.8-2.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing cronie-1.4.8-2.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/cronie-1.4.8-2.fc14
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-07-31 03:47:37 UTC
cronie-1.4.8-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.