Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1778813

Summary: AVC report during pcp test suite run
Product: Red Hat Enterprise Linux 8 Reporter: Jan Kurik <jkurik>
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED ERRATA QA Contact: Jan Kurik <jkurik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.2CC: agerstmayr, jkurik, mgoodwin, nathans, patrickm
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcp-5.0.2 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 15:40:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Kurik 2019-12-02 14:49:29 UTC
Description of problem:
There was an AVC report observed when running pcp-5.0.1 test suite on RHEL-8.2.0-20191128.n.0 compose.

Version-Release number of selected component (if applicable):
Compose: RHEL-8.2.0-20191128.n.0
PCP: pcp-5.0.1-1.el8
SELinux: selinux-policy-3.14.3-29.el8

How reproducible:
Always

Steps to Reproduce:
1. Install RHEL-8.2.0-20191128.n.0 compose
2. Install pcp-5.0.1-1.el8
3. Run the pcp test suite as './check -g local'

Actual results:
AVC report generated:
type=AVC msg=audit(12/02/2019 05:28:02.517:855) : avc:  denied  { fsetid } for  pid=55897 comm=cp capability=fsetid  scontext=system_u:system_r:pcp_pmie_t:s0 tcontext=system_u:system_r:pcp_pmie_t:s0 tclass=capability permissive=0

Expected results:
No AVC report is generated.

Additional info:
output of audit2allow:

#============= pcp_pmie_t ==============
allow pcp_pmie_t self:capability fsetid;

Comment 1 Nathan Scott 2019-12-02 20:24:58 UTC
This has been fixed upstream, will arrive via pcp-5.0.2 next week which we plan to pull into 8.2 before snap3...

commit 48dc8134a40491b574c1f527acc68dbf147315f9
Author: Nathan Scott <nathans>
Date:   Wed Nov 20 11:39:19 2019 +1100

    selinux: add fsetid to pmie start script policy as done for pmlogger
    
    Resolves Red Hat BZ #1748946.

Comment 2 Jan Kurik 2019-12-05 12:47:08 UTC
There is one more AVC report generated by a test case 759 of the pcp-testsuite (Unbound PMDA).

The AVC report:
type=AVC msg=audit(1575549458.221:76804): avc:  denied  { execute } for  pid=12859 comm="python3" name="unbound-control" dev="vda1" ino=7050199 scontext=system_u:system_r:pcp_pmcd_t:s0tcontext=system_u:object_r:named_exec_t:s0 tclass=file permissive=0

audit2allow output:
#============= pcp_pmcd_t ==============
allow pcp_pmcd_t named_exec_t:file execute;

Comment 3 Nathan Scott 2019-12-06 05:03:55 UTC
commit 1a31804079cd60af48f08217c468fb4055f239a7
Author: Nathan Scott <nathans>
Date:   Fri Dec 6 16:02:48 2019 +1100

    selinux: add selinux policy for unbound PMDA metrics needs
    
    Resolves Red Hat BZ #1778813

Comment 5 Jan Kurik 2020-01-13 15:19:39 UTC
The issue is fixed in the latest pcp-selinux-5.0.2-2 build.

Comment 7 errata-xmlrpc 2020-04-28 15:40:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1628