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 1821122 - A missing selinux rule is preventing pcp-pmda-named from executing /usr/sbin/rndc
Summary: A missing selinux rule is preventing pcp-pmda-named from executing /usr/sbin/...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcp
Version: 7.8
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Nathan Scott
QA Contact: Jan Kurik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-06 05:50 UTC by Jan Kurik
Modified: 2020-04-30 00:01 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-30 00:01:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Kurik 2020-04-06 05:50:20 UTC
Description of problem:
pcp-pmda-named uses /usr/sbin/rndc to get data from named.
Unfortunately when pcp-pmda-named executes /usr/sbin/rndc the execution fails due to a missing SELinux rule allowing the execution of rndc.


Version-Release number of selected component (if applicable):
pcp-4.3.2-8.el7
selinux-policy-3.13.1-266.el7
pcp-selinux-4.3.2-8.el7
pcp-pmda-named-4.3.2-8.el7


How reproducible:
Always

Steps to Reproduce:
1. Install pcp with pcp-pmda-named
2. Install bind, bind-chroot, caching-nameserver, bind-utils packages
3. Configure bind as a caching nameserver
4. Start PCP as well as bind
5. Use i.e. "dig @127.0.0.1" to query DNS

Actual results:
Output of "audit2allow -a" shows:
<stdout>
#============= pcp_pmcd_t ==============
allow pcp_pmcd_t ndc_exec_t:file execute_no_trans;
</stdout>

# grep 'type=AVC ' /var/log/audit/audit.log | head -n 1
type=AVC msg=audit(1586150510.119:1454): avc:  denied  { execute_no_trans } for  pid=30473 comm="perl" path="/usr/sbin/rndc" dev="vda1" ino=7449669 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:ndc_exec_t:s0 tclass=file permissive=0


Expected results:
Output of "audit2allow -a" should be empty.
No AVC records in "/var/log/audit/audit.log".

Additional info:
This is a follow-up of BZ1749870.

Comment 1 Nathan Scott 2020-04-07 00:16:44 UTC
Resolved upstream via:

commit 57d763755cd081802d7074cb11af41c51173b98c
Author: Nathan Scott <nathans>
Date:   Tue Apr 7 10:15:41 2020 +1000

    selinux: additional policy needs for named PMDA in el7
    
    Resolves Red Hat BZ #1821122.

Comment 2 Nathan Scott 2020-04-30 00:01:48 UTC
As there is no RHEL 7.10 planned, marking this as WONTFIX.  RHEL 8.3 required different changes so I think we've done everything we can here for now.


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