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.
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 missing SELinux rule allowing the execution of rndc.
Version-Release number of selected component (if applicable):
pcp-4.3.2-6.el7.x86_64
selinux-policy-3.13.1-258.el7.noarch
pcp-selinux-4.3.2-6.el7.x86_64
pcp-pmda-named-4.3.2-6.el7.x86_64
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;
</stdout>
Expected results:
Output of "audit2allow -a" should be empty
Additional info:
Hmm, strange - the policy patch definitely has these changes...
$ grep ndc_exec_t *
selinux-policy.patch:+ allow [pcp_pmcd_t] [ndc_exec_t] : [file] { execute };
selinux-policy.patch:+ type ndc_exec_t;
selinux-policy.patch:+allow pcp_pmcd_t ndc_exec_t:file execute;
Bit of a mystery - is the AVC exactly the same as before Jan? Thanks.
You are right Nathan, it is a different AVC. I am sorry for the confusion.
The AVC it is throwing now is:
# 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
# audit2allow -a
#============= pcp_pmcd_t ==============
allow pcp_pmcd_t ndc_exec_t:file execute_no_trans;
When I apply this ^^^ selinux rule, the test is then passing.
Should I open a new bug for this ?
> Should I open a new bug for this ?
Yes please Jan. Since its relatively low priority and readily worked around, let's aim for 7.10 for that one, unless there's some other need for a 7.9 rebuild.
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 (Low: pcp security, 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/RHSA-2020:3869