Bug 993541

Summary: SELinux is preventing /usr/bin/perl from using the 'execmem' accesses on a process.
Product: [Fedora] Fedora Reporter: Robert Muil <robertmuil>
Component: muninAssignee: d. johnson <drjohnson1>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, drjohnson1, dwalsh, ingvar, jvanek, kwizart, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:90e45505d9f98eec17de9fb90bfb822ec96a696930c7be02ecd424e1d8616703
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-16 15:10:14 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 Robert Muil 2013-08-06 07:06:28 UTC
Description of problem:
Installed munin and tried to access the webserver.
I think it would be convenient to have SELinux rules to allow munin by default, it is not an unusual package to install on a system. At least good instructions on allowing the process.
SELinux is preventing /usr/bin/perl from using the 'execmem' accesses on a process.

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

If you believe that perl should be allowed execmem access on processes labeled munin_t 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 munin-update /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:munin_t:s0-s0:c0.c1023
Target Context                system_u:system_r:munin_t:s0-s0:c0.c1023
Target Objects                 [ process ]
Source                        munin-update
Source Path                   /usr/bin/perl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           perl-5.16.3-265.fc19.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-69.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.4-300.fc19.i686 #1 SMP Tue
                              Jul 30 12:03:53 UTC 2013 i686 i686
Alert Count                   1
First Seen                    2013-08-06 09:00:03 CEST
Last Seen                     2013-08-06 09:00:03 CEST
Local ID                      7176ff29-74e6-4a86-84b4-093fbd96538e

Raw Audit Messages
type=AVC msg=audit(1375772403.642:769): avc:  denied  { execmem } for  pid=19676 comm="munin-update" scontext=system_u:system_r:munin_t:s0-s0:c0.c1023 tcontext=system_u:system_r:munin_t:s0-s0:c0.c1023 tclass=process


type=SYSCALL msg=audit(1375772403.642:769): arch=i386 syscall=mmap2 success=no exit=EACCES a0=455eb000 a1=21000 a2=7 a3=812 items=0 ppid=19675 pid=19676 auid=991 uid=991 gid=988 euid=991 suid=991 fsuid=991 egid=988 sgid=988 fsgid=988 ses=16 tty=(none) comm=munin-update exe=/usr/bin/perl subj=system_u:system_r:munin_t:s0-s0:c0.c1023 key=(null)

Hash: munin-update,munin_t,munin_t,process,execmem

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.4-300.fc19.i686
type:           libreport

Potential duplicate: bug 913294

Comment 1 Daniel Walsh 2013-08-07 18:25:41 UTC
Why does munin need execmem?

This means it can write and execute the same memory, which is considered somewhat dangerous.

Comment 2 d. johnson 2013-08-07 20:44:41 UTC
Reporter, Can you show which plugins you are running?

This is unusual for it to require execmem.  Are all your graphs working, or is there one plugin's graphs that are failing?

Comment 3 Nicolas Chauvet (kwizart) 2013-10-14 18:22:57 UTC
Description of problem:
munin

Additional info:
reporter:       libreport-2.1.7
hashmarkername: setroubleshoot
kernel:         3.11.3-201.fc19.x86_64
type:           libreport

Comment 4 Nicolas Chauvet (kwizart) 2013-10-14 18:56:39 UTC
reproduced on x86_64

$ rpm -qa munin\*
munin-2.0.17-6.fc19.noarch
munin-common-2.0.17-6.fc19.noarch
munin-node-2.0.17-6.fc19.noarch

This seems to be triggered by munin-update every 5 min (so by the cron job).

Comment 5 d. johnson 2013-10-14 20:15:23 UTC
It would be very handy to know which plugin is causing this. Are you able to narrow down the list a bit?  Which plugins do you have enabled?

Comment 6 Nicolas Chauvet (kwizart) 2013-11-16 15:10:14 UTC
I've removed the nvidia driver and the error stopped,
So this might be a dup of rhbz#1018083

*** This bug has been marked as a duplicate of bug 1018083 ***