Bug 1398147 - SELinux is preventing pmcd from 'getattr' accesses on the file /var/lib/pcp/pmns/root.
Summary: SELinux is preventing pmcd from 'getattr' accesses on the file /var/lib/pcp/p...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pcp
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nathan Scott
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:7aeb0840038642ee7e485417b85...
: 1398144 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-24 08:16 UTC by Kazuo Moriwaka
Modified: 2019-04-29 09:18 UTC (History)
16 users (show)

Fixed In Version: pcp-3.11.8-1.fc25 pcp-3.11.9-1.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-11 04:51:49 UTC
Type: ---


Attachments (Terms of Use)

Description Kazuo Moriwaka 2016-11-24 08:16:54 UTC
Description of problem:
SELinux is preventing pmcd from 'getattr' accesses on the file /var/lib/pcp/pmns/root.

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

If you believe that pmcd should be allowed getattr access on the root 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:
# ausearch -c 'pmcd' --raw | audit2allow -M my-pmcd
# semodule -X 300 -i my-pmcd.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                unconfined_u:object_r:pcp_var_lib_t:s0
Target Objects                /var/lib/pcp/pmns/root [ file ]
Source                        pmcd
Source Path                   pmcd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-224.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.8.8-300.fc25.x86_64 #1 SMP Tue
                              Nov 15 18:10:06 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-11-24 16:17:10 JST
Last Seen                     2016-11-24 16:17:10 JST
Local ID                      ecd2bb6a-42bb-4dae-9be5-d4e6d043a197

Raw Audit Messages
type=AVC msg=audit(1479971830.548:176): avc:  denied  { getattr } for  pid=1185 comm="pmcd" path="/var/lib/pcp/pmns/root" dev="dm-2" ino=141152949 scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:pcp_var_lib_t:s0 tclass=file permissive=0


Hash: pmcd,init_t,pcp_var_lib_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-224.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.8.8-300.fc25.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2016-11-25 12:54:05 UTC
How are pcp daemons started? pmcd daemon runds under init_t which is wrong.

Comment 2 Lukas Vrabec 2016-11-25 12:54:27 UTC
*** Bug 1398144 has been marked as a duplicate of this bug. ***

Comment 5 JM 2017-02-08 16:44:10 UTC
Same problem here with Fedora 25 and pcp-3.11.7-1.fc25.x86_64

I get several SELinux messages when the pmcd starts via pmcd.service for example:

SELinux is preventing pmcd from open access on the file /var/tmp/pcp.xDnpSdsBs/pcp.env.path.
SELinux is preventing pmcd from getattr access on the file /var/log/pcp/pmcd/pmcd.log.
SELinux is preventing pmcd from getattr access on the file /var/log/pcp/pmcd/xfs.log.
SELinux is preventing pmcd from read access on the directory /var/log/pcp/pmcd.
SELinux is preventing pmcd from read access on the directory /var/lib/pcp/pmdas.

Comment 6 Fedora Update System 2017-02-18 15:37:21 UTC
pcp-3.11.8-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-201a3e0969

Comment 7 Fedora Update System 2017-02-18 15:38:40 UTC
pcp-3.11.8-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6b8f1de90c

Comment 8 Fedora Update System 2017-02-20 00:49:25 UTC
pcp-3.11.8-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-201a3e0969

Comment 9 Fedora Update System 2017-02-20 05:21:54 UTC
pcp-3.11.8-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6b8f1de90c

Comment 10 Fedora Update System 2017-02-26 01:37:00 UTC
pcp-3.11.8-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2017-02-27 18:25:49 UTC
pcp-3.11.8-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3b25af744f

Comment 12 Fedora Update System 2017-03-01 02:51:13 UTC
pcp-3.11.8-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-3b25af744f

Comment 13 Fedora Update System 2017-04-02 05:18:53 UTC
pcp-3.11.9-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c6c3616693

Comment 14 Fedora Update System 2017-04-03 02:24:17 UTC
pcp-3.11.9-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c6c3616693

Comment 15 Fedora Update System 2017-04-11 04:51:49 UTC
pcp-3.11.9-1.fc24 has been pushed to the Fedora 24 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.