Bug 1256128

Summary: SELinux is preventing /usr/libexec/pcp/bin/pmwebd from 'read' accesses on the file meminfo.
Product: [Fedora] Fedora Reporter: Kazuo Moriwaka <kmoriwak>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:97e978c48a39305188939aaef7fbeba6457f3312e28bf041ee11d43642d7a9f1
Fixed In Version: 3.13.1-128.13.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-16 21:20:30 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 Kazuo Moriwaka 2015-08-24 03:00:13 UTC
Description of problem:
SELinux is preventing /usr/libexec/pcp/bin/pmwebd from 'read' accesses on the file meminfo.

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

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

Additional Information:
Source Context                system_u:system_r:pcp_pmwebd_t:s0
Target Context                system_u:object_r:proc_t:s0
Target Objects                meminfo [ file ]
Source                        pmwebd
Source Path                   /usr/libexec/pcp/bin/pmwebd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           pcp-webapi-3.10.4-1.fc22.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-128.8.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.1.3-200.fc22.x86_64 #1 SMP Wed
                              Jul 22 19:51:58 UTC 2015 x86_64 x86_64
Alert Count                   2
First Seen                    2015-08-11 11:20:49 JST
Last Seen                     2015-08-11 12:27:06 JST
Local ID                      8a5f1016-900a-4a3f-b1c0-57ad9843bb10

Raw Audit Messages
type=AVC msg=audit(1439263626.940:2906): avc:  denied  { read } for  pid=21347 comm="pmwebd" name="meminfo" dev="proc" ino=4026531988 scontext=system_u:system_r:pcp_pmwebd_t:s0 tcontext=system_u:object_r:proc_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1439263626.940:2906): arch=x86_64 syscall=open success=no exit=EACCES a0=7f025846b955 a1=80000 a2=1b6 a3=ffffffffffdc5940 items=0 ppid=1 pid=21347 auid=4294967295 uid=985 gid=974 euid=985 suid=985 fsuid=985 egid=974 sgid=974 fsgid=974 tty=(none) ses=4294967295 comm=pmwebd exe=/usr/libexec/pcp/bin/pmwebd subj=system_u:system_r:pcp_pmwebd_t:s0 key=(null)

Hash: pmwebd,pcp_pmwebd_t,proc_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-128.8.fc22.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.1.4-200.fc22.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2015-08-27 13:18:17 UTC
commit 5340b97224a30740d6415b4bdd61bdb5867cd060
Author: Lukas Vrabec <lvrabec>
Date:   Thu Aug 27 15:17:42 2015 +0200

    Allow pmweb daemon to read system state. BZ(#1256128)

Comment 2 Fedora Update System 2015-09-14 10:00:09 UTC
selinux-policy-3.13.1-128.13.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15798

Comment 3 Fedora Update System 2015-09-15 05:55:43 UTC
selinux-policy-3.13.1-128.13.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update selinux-policy'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15798

Comment 4 Fedora Update System 2015-09-16 21:20:17 UTC
selinux-policy-3.13.1-128.13.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.