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.
Prior to this update, an SELinux rule for Open vSwitch (OVS) was missing. As a consequence, during boot time, while running SELinux in enforcing mode, the ovs-ctl script was not allowed to run the hostname and ip commands. The missing policy rule has been added, and OVS is now able to configure itself properly during boot time.
Description of problem:
SELinux AVC denial messages are asserting at certain points during automated regression test runs against openvswitch FDB 2.6.1.2 with RHEL 7.3 GA. No such messages are observed when running the same automated tests against openvswitch FDP 2.5.0.22 and RHEL 7.3 GA.
Snippet from log containing AVC denial message:
type=AVC msg=audit(1481891854.635:110): avc: denied { getattr } for pid=17949 comm="ovs-ctl" path="/usr/bin/hostname" dev="dm-0" ino=25939 scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:object_r:hostname_exec_t:s0 tclass=file
This appears to be the same issue tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1360465 which is against Fedora 23. I'm logging this against RHEL 7.3 since I did not find an existing BZ for RHEL.
Version-Release number of selected component (if applicable):
RHEL 7.3 GA
kernel: 3.10.0-514.el7.x86_64
OVS: openvswitch-2.6.1-2.git20161206.el7fdb.x86_64
How reproducible:
100%
How reproducible:
Always
Steps to Reproduce:
1. Make sure SELinux is enabled
2. Enable openvswitch service
3. Boot
Actual results:
During boot time, the SELinux will block ovs-ctl to run 'hostname' and the AVC message referenced above will assert in /var/log/audit/audit.log.
BZ1360465 states that doing a force-reload-kmod will trigger the other two AVCs referenced in that BZ. I executed "/usr/share/openvswitch/scripts/ovs-ctl force-reload-kmod" but did not see the resulting other two AVC messages.
Expected results:
No AVC denials should assert.
Additional info:
Could you switch the openvswitch_t domain to permissive mode before re-running the scenario and collect all SELinux denials?
# semanage permissive -a openvswitch_t
... re-run your scenario ...
# ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -ts today
Comment 4Giuseppe Scrivano
2017-02-23 10:35:53 UTC
*** Bug 1420636 has been marked as a duplicate of this bug. ***
Comment 5Giuseppe Scrivano
2017-02-23 10:50:53 UTC
I can verify this bug, relevant test case already exist, but I need your cooperation, because our test case does not trigger SELinux denials which contain tcontext=system_u:system_r:initrc_t:s0. Our test case is able to trigger SELinux denials related to the hostname utility.
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-2017:1861
Description of problem: SELinux AVC denial messages are asserting at certain points during automated regression test runs against openvswitch FDB 2.6.1.2 with RHEL 7.3 GA. No such messages are observed when running the same automated tests against openvswitch FDP 2.5.0.22 and RHEL 7.3 GA. Snippet from log containing AVC denial message: type=AVC msg=audit(1481891854.635:110): avc: denied { getattr } for pid=17949 comm="ovs-ctl" path="/usr/bin/hostname" dev="dm-0" ino=25939 scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:object_r:hostname_exec_t:s0 tclass=file This appears to be the same issue tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1360465 which is against Fedora 23. I'm logging this against RHEL 7.3 since I did not find an existing BZ for RHEL. Version-Release number of selected component (if applicable): RHEL 7.3 GA kernel: 3.10.0-514.el7.x86_64 OVS: openvswitch-2.6.1-2.git20161206.el7fdb.x86_64 How reproducible: 100% How reproducible: Always Steps to Reproduce: 1. Make sure SELinux is enabled 2. Enable openvswitch service 3. Boot Actual results: During boot time, the SELinux will block ovs-ctl to run 'hostname' and the AVC message referenced above will assert in /var/log/audit/audit.log. BZ1360465 states that doing a force-reload-kmod will trigger the other two AVCs referenced in that BZ. I executed "/usr/share/openvswitch/scripts/ovs-ctl force-reload-kmod" but did not see the resulting other two AVC messages. Expected results: No AVC denials should assert. Additional info: