Bug 893759 - SELinux is preventing /usr/bin/perl from 'getattr' accesses on the file /var/lib/munin/datafile.storable.
Summary: SELinux is preventing /usr/bin/perl from 'getattr' accesses on the file /var/...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:092d9d0e327cb468a270a3569b9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-09 21:10 UTC by Till Maas
Modified: 2013-02-12 05:08 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-02-12 05:08:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Till Maas 2013-01-09 21:10:06 UTC
Description of problem:
It happened after I tried to use munin-cgi
SELinux is preventing /usr/bin/perl from 'getattr' accesses on the file /var/lib/munin/datafile.storable.

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

If sie denken, dass perl standardmässig erlaubt sein sollte, getattr Zugriff auf datafile.storable file zu erhalten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
# grep munin-cgi-graph /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:httpd_sys_script_t:s0
Target Context                system_u:object_r:munin_var_lib_t:s0
Target Objects                /var/lib/munin/datafile.storable [ file ]
Source                        munin-cgi-graph
Source Path                   /usr/bin/perl
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           perl-5.14.3-218.fc17.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-166.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.6.11-1.fc17.x86_64 #1 SMP Mon
                              Dec 17 22:16:35 UTC 2012 x86_64 x86_64
Alert Count                   191
First Seen                    2013-01-08 12:40:32 CET
Last Seen                     2013-01-09 12:45:02 CET
Local ID                      4862bd73-b924-41b2-8c7d-f0248e660c2b

Raw Audit Messages
type=AVC msg=audit(1357731902.289:7758): avc:  denied  { getattr } for  pid=10712 comm="munin-cgi-html" path="/var/lib/munin/datafile.storable" dev="dm-1" ino=676549 scontext=system_u:system_r:httpd_sys_script_t:s0 tcontext=system_u:object_r:munin_var_lib_t:s0 tclass=file


type=SYSCALL msg=audit(1357731902.289:7758): arch=x86_64 syscall=stat success=yes exit=0 a0=1b18b90 a1=1759138 a2=1759138 a3=0 items=0 ppid=4716 pid=10712 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm=munin-cgi-html exe=/usr/bin/perl subj=system_u:system_r:httpd_sys_script_t:s0 key=(null)

Hash: munin-cgi-graph,httpd_sys_script_t,munin_var_lib_t,file,getattr

audit2allow

#============= httpd_sys_script_t ==============
allow httpd_sys_script_t munin_var_lib_t:file getattr;

audit2allow -R

#============= httpd_sys_script_t ==============
allow httpd_sys_script_t munin_var_lib_t:file getattr;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.6.11-1.fc17.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-01-14 10:53:11 UTC
I found a bug. Added a fix.

commit 8f6c5cc2bf10358a051672dedf2113847d1886d2
Author: Miroslav Grepl <mgrepl>
Date:   Mon Jan 14 11:41:13 2013 +0100

    Add additional labeling for munin cgi scripts

Comment 2 Fedora Update System 2013-02-04 22:04:02 UTC
selinux-policy-3.10.0-167.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-167.fc17

Comment 3 Fedora Update System 2013-02-05 16:59:53 UTC
Package selinux-policy-3.10.0-167.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-167.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1971/selinux-policy-3.10.0-167.fc17
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-02-12 05:08:20 UTC
selinux-policy-3.10.0-167.fc17 has been pushed to the Fedora 17 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.