Bug 481387 - selinux prevents "getattr" and "execute"
Summary: selinux prevents "getattr" and "execute"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy
Version: 5.4
Hardware: i686
OS: Linux
low
urgent
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-23 22:37 UTC by Philip Goisman
Modified: 2012-09-19 14:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 07:59:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1242 0 normal SHIPPED_LIVE selinux-policy bug fix update 2009-09-01 08:32:34 UTC

Description Philip Goisman 2009-01-23 22:37:11 UTC
Description of problem:
SELinux is preventing sh (procmail_t) "getattr" to /usr/bin/spamassassin
(spamassassin_exec_t).

SELinux is preventing sh (procmail_t) "execute" to ./spamassassin
(spamassassin_exec_t).

Version-Release number of selected component (if applicable):
selinux-policy-strict-2.4.6-203.el5
selinux-policy-mls-2.4.6-203.el5
selinux-policy-devel-2.4.6-203.el5
selinux-policy-targeted-2.4.6-203.el5
selinux-policy-2.4.6-203.el5

How reproducible:
This started on the recent selinux upgrade which is now preventing
procmail scripts from checking incoming e-mail against spamassassin.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
I wrote the following policy to try to fix this problem:

module procmailauth 1.0;

require {
	type procmail_t;
	type var_log_t;
	type spamassassin_exec_t;
	type spamd_var_lib_t;
	class dir search;
	class dir execute;
	class file read;
	class file ioctl;
	class file execute;
	class file write;
	class file getattr;
	class file append;
}

#============= dovecot_auth_t ==============
allow procmail_t spamassassin_exec_t:file { read ioctl write getattr append };
allow procmail_t spamassassin_exec_t:dir execute;
allow procmail_t spamd_var_lib_t:dir search;

The above didn't fix the problem.  In fact additional sealerts like "ioctl"
started occurring.

So how may this problem be fixed?

Comment 1 Philip Goisman 2009-01-24 15:02:08 UTC
I modified my policy as follows:

module procmailauth 1.0;

require {
	type procmail_t;
	type var_log_t;
	type spamassassin_exec_t;
	type spamd_var_lib_t;
	class dir search;
	class dir execute;
	class dir getattr;
	class dir read;
	class dir ioctl;
	class file read;
	class file ioctl;
	class file execute;
	class file execute_no_trans;
	class file write;
	class file getattr;
	class file append;
}

#============= dovecot_auth_t ==============
allow procmail_t spamassassin_exec_t:file { read ioctl write getattr execute execute_no_tran
s append };
allow procmail_t spamassassin_exec_t:dir { getattr execute };
allow procmail_t spamd_var_lib_t:file { getattr read ioctl};
allow procmail_t spamd_var_lib_t:dir { getattr read search ioctl };
 

This appears to be holding - procmail logs don't complain, procmail results are
achieved, and no sealerts in messages.

I'll let you know if this breaks.

Thanks

Comment 2 Daniel Walsh 2009-02-07 11:59:07 UTC
Fixed in selinux-policy-2.4.6-207.el5

Preview of U4 policy currently available at

http://people.redhat.com/dwalsh/SELinux/RHEL5

Comment 8 Daniel Walsh 2009-04-16 15:06:23 UTC
Fixed in selinux-policy-2.4.6-225.el5

Comment 11 errata-xmlrpc 2009-09-02 07:59:21 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1242.html


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