Bug 619316

Summary: SELinux is preventing /usr/bin/perl "write" access on /var/lib/munin/plugin-state.
Product: [Fedora] Fedora Reporter: Peter Klöppel <redhat-bugs>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:521d33be13cb7e54a05173070d2ec7fc170bb512f854d562e04c73d9b5944c35
Fixed In Version: selinux-policy-3.7.19-44.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-10 21:42:18 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 Peter Klöppel 2010-07-29 09:27:31 UTC
Summary:

SELinux is preventing /usr/bin/perl "write" access on
/var/lib/munin/plugin-state.

Detailed Description:

[diskstats has a permissive type (munin_disk_plugin_t). This access was not
denied.]

SELinux denied access requested by diskstats. It is not expected that this
access is required by diskstats 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:munin_disk_plugin_t:s0
Target Context                system_u:object_r:munin_var_lib_t:s0
Target Objects                /var/lib/munin/plugin-state [ dir ]
Source                        diskstats
Source Path                   /usr/bin/perl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           perl-5.10.1-112.fc13
Target RPM Packages           munin-node-1.4.4-1.fc13
Policy RPM                    selinux-policy-3.7.19-15.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.4-95.fc13.i686 #1 SMP Thu May 13
                              05:55:24 UTC 2010 i686 i686
Alert Count                   3
First Seen                    Wed 26 May 2010 09:05:13 PM CEST
Last Seen                     Wed 26 May 2010 09:05:13 PM CEST
Local ID                      03e88c71-10de-4bec-a70a-2165736e2188
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1274900713.627:21696): avc:  denied  { write } for  pid=11963 comm="diskstats" name="plugin-state" dev=sda2 ino=142285 scontext=unconfined_u:system_r:munin_disk_plugin_t:s0 tcontext=system_u:object_r:munin_var_lib_t:s0 tclass=dir

node=(removed) type=AVC msg=audit(1274900713.627:21696): avc:  denied  { add_name } for  pid=11963 comm="diskstats" name="diskstats-172.20.47.98" scontext=unconfined_u:system_r:munin_disk_plugin_t:s0 tcontext=system_u:object_r:munin_var_lib_t:s0 tclass=dir

node=(removed) type=AVC msg=audit(1274900713.627:21696): avc:  denied  { create } for  pid=11963 comm="diskstats" name="diskstats-172.20.47.98" scontext=unconfined_u:system_r:munin_disk_plugin_t:s0 tcontext=unconfined_u:object_r:munin_var_lib_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1274900713.627:21696): arch=40000003 syscall=5 success=yes exit=4 a0=9d583f0 a1=8241 a2=1b6 a3=0 items=0 ppid=11617 pid=11963 auid=500 uid=490 gid=478 euid=490 suid=490 fsuid=490 egid=478 sgid=478 fsgid=478 tty=(none) ses=1 comm="diskstats" exe="/usr/bin/perl" subj=unconfined_u:system_r:munin_disk_plugin_t:s0 key=(null)



Hash String generated from  catchall,diskstats,munin_disk_plugin_t,munin_var_lib_t,dir,write
audit2allow suggests:

#============= munin_disk_plugin_t ==============
#!!!! The source type 'munin_disk_plugin_t' can write to a 'dir' of the following type:
# munin_disk_plugin_tmp_t
#!!!! The source type 'munin_disk_plugin_t' can write to a 'dir' of the following types:
# munin_disk_plugin_tmp_t, tmp_t

allow munin_disk_plugin_t munin_var_lib_t:dir { write add_name };
allow munin_disk_plugin_t munin_var_lib_t:file create;

Comment 1 Daniel Walsh 2010-07-29 13:30:55 UTC
Looks like we need 
manage_files_pattern(munin_disk_plugin_t, munin_var_lib_t, munin_var_lib_t)

Comment 2 Miroslav Grepl 2010-08-02 12:49:12 UTC
Fixed in selinux-policy-3.7.19-42.fc13.

Comment 3 Fedora Update System 2010-08-06 13:42:15 UTC
selinux-policy-3.7.19-44.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-44.fc13

Comment 4 Fedora Update System 2010-08-06 21:01:26 UTC
selinux-policy-3.7.19-44.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: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-44.fc13

Comment 5 Fedora Update System 2010-08-10 21:40:42 UTC
selinux-policy-3.7.19-44.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.