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 1897719 - SELinux issue in netcheck PMDA
Summary: SELinux issue in netcheck PMDA
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcp
Version: 8.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.4
Assignee: Nathan Scott
QA Contact: Jan Kurik
URL:
Whiteboard:
: 1790450 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-13 21:49 UTC by Jan Kurik
Modified: 2021-09-17 12:44 UTC (History)
6 users (show)

Fixed In Version: pcp-5.2.5-1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:19:49 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)

Description Jan Kurik 2020-11-13 21:49:03 UTC
Description of problem:
During installation of netcheck PMDA, SELinux reports an AVC issue.

Version-Release number of selected component (if applicable):
* selinux-policy-3.14.3-56.el8
* pcp-selinux-5.2.2-1.el8
* pcp-5.2.2-1.el8
* pcp-pmda-netcheck-5.2.2-1.el8

How reproducible:
Always

Steps to Reproduce:
1. Install RPMs pcp-zeroconf & pcp-pmda-netcheck
# yum install -y pcp-zeroconf pcp-pmda-netcheck
2. Install the netcheck PMDA
# cd /var/lib/pcp/pmdas/netcheck && ./Install
3. Check SELinux reports
# ausearch -m AVC

Actual results:
The ausearch reports:

type=AVC msg=audit(1605303952.202:692): avc:  denied  { create } for  pid=18420 comm="ping" scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:system_r:pcp_pmcd_t:s0 tclass=rawip_socket permissive=0

The audit2allow reports:

#============= pcp_pmcd_t ==============
allow pcp_pmcd_t self:rawip_socket create;


Expected results:
No SELinux issues are reported.

Comment 1 Nathan Scott 2020-11-16 05:58:54 UTC
Resolved upstream via the following commit which will be in next rebase update (pcp-5.2.3) in a few weeks.

commit c9e06e9155431002dc80ec2b4bc7d04a68ca4d14
Author: Nathan Scott <nathans>
Date:   Mon Nov 16 15:55:45 2020 +1100

    selinux: use matching autoconf guard for rawip_socket class
    
    Resolves Red Hat BZ #1897719

Comment 2 Jan Kurik 2020-12-18 14:59:07 UTC
The selinux issue is still affecting netcheck PMDA.

Comment 3 Jan Kurik 2020-12-18 15:02:17 UTC
*** Bug 1790450 has been marked as a duplicate of this bug. ***

Comment 4 Marko Myllynen 2020-12-18 17:52:32 UTC
There was a typo on configure{,.ac} which became relevant after the commit mentioned in comment 1 but even after fixing it and adjusting the SELinux rules this doesn't work on latest RHEL 8.3. However, this works as expected on latest Fedora. I'm suspecting this might be some underlying RHEL 8 kernel/SELinux issue (partial backport or such) but not really sure what's going on here.

The related upstream commits were:

https://github.com/performancecopilot/pcp/commit/581cfbdeaac02d47931a62bfcbc6e4d061395066
https://github.com/performancecopilot/pcp/commit/0dc6175cc1b131afffd858068f5efc82813a11ac

Comment 5 Nathan Scott 2021-01-14 23:20:35 UTC
Marko's final fix (above) will be pulled in via pcp-5.2.4 - if that doesn't resolve this, we're definitely looking at an underlying issue as Marko mentions (in which case we'll likely defer this one to 8.5 due to higher priority work items).

Comment 10 errata-xmlrpc 2021-05-18 15:19:49 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 (pcp bug fix and enhancement update), 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-2021:1754


Note You need to log in before you can comment on or make changes to this bug.