Bug 658820 - SELinux is preventing /usr/sbin/exim "search" access on nagios.
Summary: SELinux is preventing /usr/sbin/exim "search" access on nagios.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:ccf7f6ed211...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-01 12:18 UTC by Russell Odom
Modified: 2010-12-06 19:59 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.7.19-74.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-06 19:59:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Russell Odom 2010-12-01 12:18:03 UTC
Summary:

SELinux is preventing /usr/sbin/exim "search" access on nagios.

Detailed Description:

[exim has a permissive type (exim_t). This access was not denied.]

SELinux denied access requested by exim. It is not expected that this access is
required by exim and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

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

Additional Information:

Source Context                unconfined_u:system_r:exim_t:s0
Target Context                system_u:object_r:nagios_spool_t:s0
Target Objects                nagios [ dir ]
Source                        exim
Source Path                   /usr/sbin/exim
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           exim-4.72-1.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-73.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.34.7-61.fc13.x86_64 #1 SMP Tue Oct 19 04:06:30
                              UTC 2010 x86_64 x86_64
Alert Count                   2
First Seen                    Wed 01 Dec 2010 12:16:23 GMT
Last Seen                     Wed 01 Dec 2010 12:16:23 GMT
Local ID                      cad900b0-df67-4f8a-bc72-b2c112ab13fb
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1291205783.335:87091): avc:  denied  { search } for  pid=31569 comm="exim" name="nagios" dev=dm-1 ino=395916 scontext=unconfined_u:system_r:exim_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1291205783.335:87091): arch=c000003e syscall=2 success=yes exit=128 a0=7f76890d1428 a1=0 a2=1b6 a3=0 items=0 ppid=31568 pid=31569 auid=500 uid=483 gid=467 euid=483 suid=483 fsuid=483 egid=467 sgid=467 fsgid=467 tty=(none) ses=1 comm="exim" exe="/usr/sbin/exim" subj=unconfined_u:system_r:exim_t:s0 key=(null)



Hash String generated from  catchall,exim,exim_t,nagios_spool_t,dir,search
audit2allow suggests:

#============= exim_t ==============
allow exim_t nagios_spool_t:dir search;

Comment 1 Miroslav Grepl 2010-12-01 12:21:36 UTC
Fixed in selinux-policy-3.7.19-74.fc13

Comment 2 Fedora Update System 2010-12-02 08:26:11 UTC
selinux-policy-3.7.19-74.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/selinux-policy-3.7.19-74.fc13

Comment 3 Russell Odom 2010-12-02 10:35:24 UTC
I think this may actually be a Nagios problem. It seems that in its default config it sends mail to & from the "nagios" user, via the admin_email setting in nagios.cfg ("nagios@localhost" by default) - even though I'd set my e-mail in contacts.cfg as per the Fedora quickstart guide in the docs.

Exim is barfing on trying to process the recipient:
2010-12-01 12:16:23 1PNlbj-0008D9-43 <= nagios.co.uk U=nagios P=local S=824
2010-12-01 12:16:23 1PNlbj-0008D9-43 == nagios@localhost R=userforward defer (-1): failed to open /var/spool/nagios/.forward: Permission denied (euid=483 egid=467)

I worked around it by adding an alias for the nagios user in /etc/aliases, and suddenly got a flurry of mails generated by the default localhost.cfg!

However, we should probably not be attempting to deliver to this user by default, as most people will not realise to read this a/c's mail - root would be a better choice. Either admin_email should be changed, or the install should add an alias to /etc/aliases, or /var/spool/nagios/.forward should exist with suitable contents (and be readable by the MTA).

Comment 4 Daniel Walsh 2010-12-02 14:46:16 UTC
Russell, please open a new bug with nagios.

Comment 5 Fedora Update System 2010-12-02 19:16:16 UTC
selinux-policy-3.7.19-74.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: https://admin.fedoraproject.org/updates/selinux-policy-3.7.19-74.fc13

Comment 6 Fedora Update System 2010-12-06 19:58:51 UTC
selinux-policy-3.7.19-74.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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