Bug 916712

Summary: SELinux is preventing /usr/bin/bash from 'read' accesses on the file file-nr.
Product: [Fedora] Fedora Reporter: Jeff Buhrt <buhrt>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:b1134f03b9f5caafa5590831399a5c460f2e8db7860dbaaf6aea02032a7f2544
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-14 03:02:54 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 Jeff Buhrt 2013-02-28 18:14:09 UTC
Description of problem:
Munin selinux read policy wrong for /etc/munin/plugins/open_files

occurs at the same time as:
https://bugzilla.redhat.com/show_bug.cgi?id=916686
SELinux is preventing /usr/bin/bash from 'read' accesses on the file file-nr.

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

If you believe that bash should be allowed read access on the file-nr 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 open_files /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:system_munin_plugin_t:s0
Target Context                system_u:object_r:sysctl_fs_t:s0
Target Objects                file-nr [ file ]
Source                        open_files
Source Path                   /usr/bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.2.42-3.fc18.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-81.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.7.9-201.fc18.i686.PAE #1 SMP Mon
                              Feb 18 21:21:43 UTC 2013 i686 i686
Alert Count                   5
First Seen                    2013-02-28 11:19:55 EST
Last Seen                     2013-02-28 11:38:46 EST
Local ID                      e95041de-a80f-4aff-b5e7-6321545df7c8

Raw Audit Messages
type=AVC msg=audit(1362069526.806:2562): avc:  denied  { read } for  pid=30965 comm="open_files" name="file-nr" dev="proc" ino=38932 scontext=system_u:system_r:system_munin_plugin_t:s0 tcontext=system_u:object_r:sysctl_fs_t:s0 tclass=file


type=AVC msg=audit(1362069526.806:2562): avc:  denied  { open } for  pid=30965 comm="open_files" path="/proc/sys/fs/file-nr" dev="proc" ino=38932 scontext=system_u:system_r:system_munin_plugin_t:s0 tcontext=system_u:object_r:sysctl_fs_t:s0 tclass=file


type=SYSCALL msg=audit(1362069526.806:2562): arch=i386 syscall=open success=yes exit=ESRCH a0=9117140 a1=8000 a2=0 a3=911add0 items=0 ppid=30964 pid=30965 auid=4294967295 uid=99 gid=99 euid=99 suid=99 fsuid=99 egid=99 sgid=99 fsgid=99 ses=4294967295 tty=(none) comm=open_files exe=/usr/bin/bash subj=system_u:system_r:system_munin_plugin_t:s0 key=(null)

Hash: open_files,system_munin_plugin_t,sysctl_fs_t,file,read

audit2allow

#============= system_munin_plugin_t ==============
allow system_munin_plugin_t sysctl_fs_t:file { read open };

audit2allow -R

#============= system_munin_plugin_t ==============
allow system_munin_plugin_t sysctl_fs_t:file { read open };


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.9-201.fc18.i686.PAE
type:           libreport

Comment 1 Miroslav Grepl 2013-03-04 09:15:19 UTC
*** Bug 916686 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Grepl 2013-03-04 09:23:13 UTC
Fixed in selinux-policy-3.11.1-82.fc18

Comment 3 Fedora Update System 2013-03-04 12:11:45 UTC
selinux-policy-3.11.1-83.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-83.fc18

Comment 4 Fedora Update System 2013-03-04 22:34:27 UTC
Package selinux-policy-3.11.1-83.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-83.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-3398/selinux-policy-3.11.1-83.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-03-08 16:11:55 UTC
selinux-policy-3.11.1-84.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-84.fc18

Comment 6 Fedora Update System 2013-03-14 03:02:56 UTC
selinux-policy-3.11.1-85.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.