Bug 604885

Summary: SELinux is preventing /usr/sbin/sendmail.sendmail access to a leaked /var/spool/fcron/fcr-yw0ZTm (deleted) file descriptor.
Product: [Fedora] Fedora Reporter: William Hill <wlh2008>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: dwalsh, mgrepl, wlh2008
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:6798f035bcc7c4939e63ae79381c04dbb93934673d0cda76163151b08e1808f0
Fixed In Version: selinux-policy-3.7.19-33.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-06 17:08:49 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 William Hill 2010-06-16 22:36:02 UTC
Summary:

SELinux is preventing /usr/sbin/sendmail.sendmail access to a leaked
/var/spool/fcron/fcr-yw0ZTm (deleted) file descriptor.

Detailed Description:

[sendmail has a permissive type (system_mail_t). This access was not denied.]

SELinux denied access requested by the sendmail command. It looks like this is
either a leaked descriptor or sendmail output was redirected to a file it is not
allowed to access. Leaks usually can be ignored since SELinux is just closing
the leak and reporting the error. The application does not use the descriptor,
so it will run properly. If this is a redirection, you will not get output in
the /var/spool/fcron/fcr-yw0ZTm (deleted). You should generate a bugzilla on
selinux-policy, and it will get routed to the appropriate package. You can
safely ignore this avc.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385)

Additional Information:

Source Context                system_u:system_r:system_mail_t:SystemLow-
                              SystemHigh
Target Context                system_u:object_r:cron_spool_t:SystemLow
Target Objects                /var/spool/fcron/fcr-yw0ZTm (deleted) [ file ]
Source                        sendmail
Source Path                   /usr/sbin/sendmail.sendmail
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           sendmail-8.14.4-4.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-23.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.33.5-124.fc13.i686.PAE #1 SMP Fri Jun 11
                              09:42:24 UTC 2010 i686 i686
Alert Count                   149
First Seen                    Tue 15 Jun 2010 09:24:07 AM EDT
Last Seen                     Wed 16 Jun 2010 06:30:03 PM EDT
Local ID                      5d603062-3425-424e-9bb9-4804dc32ee14
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1276727403.489:139): avc:  denied  { write } for  pid=12990 comm="sendmail" path=2F7661722F73706F6F6C2F6663726F6E2F6663722D7977305A546D202864656C6574656429 dev=sda7 ino=729091 scontext=system_u:system_r:system_mail_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cron_spool_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1276727403.489:139): arch=40000003 syscall=11 success=yes exit=0 a0=8a5e3f0 a1=bfa7c5dc a2=8a5ff48 a3=4 items=0 ppid=1574 pid=12990 auid=4294967295 uid=48 gid=486 euid=48 suid=48 fsuid=48 egid=483 sgid=483 fsgid=483 tty=(none) ses=4294967295 comm="sendmail" exe="/usr/sbin/sendmail.sendmail" subj=system_u:system_r:system_mail_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  leaks,sendmail,system_mail_t,cron_spool_t,file,write
audit2allow suggests:

#============= system_mail_t ==============
allow system_mail_t cron_spool_t:file write;

Comment 1 Daniel Walsh 2010-06-18 14:49:11 UTC
Miroslav add

	cron_rw_inherited_spool_files(system_mail_t)


########################################
## <summary>
##	Read and write inherited spool files.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
#
interface(`cron_rw_inherited_spool_files',`
	gen_require(`
		type cron_spool_t;
	')

	allow $1 cron_spool_t:file rw_inherited_file_perms;
')

Comment 2 Miroslav Grepl 2010-06-21 08:30:37 UTC
Fixed in selinux-policy-3.7.19-31.fc13.

Comment 3 Fedora Update System 2010-06-30 19:54:30 UTC
selinux-policy-3.7.19-33.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-33.fc13

Comment 4 Fedora Update System 2010-07-01 18:48:22 UTC
selinux-policy-3.7.19-33.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-33.fc13

Comment 5 Fedora Update System 2010-07-06 17:06:47 UTC
selinux-policy-3.7.19-33.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.