Bug 481387 - selinux prevents "getattr" and "execute"
selinux prevents "getattr" and "execute"
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.4
i686 Linux
low Severity urgent
: rc
: ---
Assigned To: Daniel Walsh
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-23 17:37 EST by Philip Goisman
Modified: 2012-09-19 10:29 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 03:59:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Philip Goisman 2009-01-23 17:37:11 EST
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 10:02:08 EST
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 06:59:07 EST
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 11:06:23 EDT
Fixed in selinux-policy-2.4.6-225.el5
Comment 11 errata-xmlrpc 2009-09-02 03:59:21 EDT
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.