Bug 951778

Summary: SELinux is preventing /usr/bin/perl from 'getattr' accesses on the file /usr/lib64/nagios/plugins/utils.pm.
Product: [Fedora] Fedora Reporter: Raman Gupta <rocketraman>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:54051c834f2ab350a7a42da3aba3e6f0ed074afc00dbc159c139b3058935b5b2
Fixed In Version: selinux-policy-3.10.0-170.fc17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-24 03:28:04 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 Raman Gupta 2013-04-13 05:02:45 UTC
Description of problem:
Updated to Fedora 17.
SELinux is preventing /usr/bin/perl from 'getattr' accesses on the file /usr/lib64/nagios/plugins/utils.pm.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that perl should be allowed getattr access on the utils.pm file 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 check_linux_rai /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:nagios_checkdisk_plugin_t:s0
Target Context                system_u:object_r:bin_t:s0
Target Objects                /usr/lib64/nagios/plugins/utils.pm [ file ]
Source                        check_linux_rai
Source Path                   /usr/bin/perl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           perl-5.14.4-224.fc17.x86_64
Target RPM Packages           nagios-plugins-perl-1.4.16-5.fc17.x86_64
Policy RPM                    selinux-policy-3.10.0-167.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.8.4-102.fc17.x86_64 #1 SMP Sun
                              Mar 24 13:09:09 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-04-13 00:55:11 EDT
Last Seen                     2013-04-13 01:00:11 EDT
Local ID                      f5d77d17-de80-4058-a6dd-6b76a3ca537c

Raw Audit Messages
type=AVC msg=audit(1365829211.177:216): avc:  denied  { getattr } for  pid=27146 comm="check_linux_rai" path="/usr/lib64/nagios/plugins/utils.pm" dev="dm-0" ino=924980 scontext=system_u:system_r:nagios_checkdisk_plugin_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file


type=SYSCALL msg=audit(1365829211.177:216): arch=x86_64 syscall=stat success=no exit=EACCES a0=1172050 a1=7fff58ff4970 a2=7fff58ff4970 a3=28 items=0 ppid=27145 pid=27146 auid=4294967295 uid=993 gid=990 euid=993 suid=993 fsuid=993 egid=990 sgid=990 fsgid=990 ses=4294967295 tty=(none) comm=check_linux_rai exe=/usr/bin/perl subj=system_u:system_r:nagios_checkdisk_plugin_t:s0 key=(null)

Hash: check_linux_rai,nagios_checkdisk_plugin_t,bin_t,file,getattr

audit2allow

#============= nagios_checkdisk_plugin_t ==============
allow nagios_checkdisk_plugin_t bin_t:file getattr;

audit2allow -R

#============= nagios_checkdisk_plugin_t ==============
allow nagios_checkdisk_plugin_t bin_t:file getattr;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.4-102.fc17.x86_64
type:           libreport

Potential duplicate: bug 827179

Comment 1 Miroslav Grepl 2013-04-15 06:13:22 UTC
*** Bug 951780 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Grepl 2013-04-15 06:13:29 UTC
*** Bug 951779 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2013-04-15 06:17:39 UTC
Fixed in selinux-policy-3.10.0-170.fc17

Comment 4 Raman Gupta 2013-05-30 22:04:57 UTC
Description of problem:
Run the Nagios check_nrpe plugin, which in turn runs the check_linux_raid plugin from a remote Nagios machine.

Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.13-100.fc17.x86_64
type:           libreport

Comment 5 Raman Gupta 2013-05-30 22:09:21 UTC
The reporter insists on adding comments to this bug instead of creating new ones. This bug is for "getattr", but I am also getting alerts for "open" and "ioctl" on the same file and for the same process.

I had these problems in the past as well, and they were fixed -- but seems they are back!

Comment 6 Miroslav Grepl 2013-06-04 11:42:15 UTC
It is going to be fixed in the next update which is coming this week.

Comment 7 Fedora Update System 2013-06-07 07:00:06 UTC
selinux-policy-3.10.0-170.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-170.fc17

Comment 8 Fedora Update System 2013-06-07 23:27:05 UTC
Package selinux-policy-3.10.0-170.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-170.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-10302/selinux-policy-3.10.0-170.fc17
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2013-06-24 03:28:04 UTC
selinux-policy-3.10.0-170.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.