Bug 1405479
| Summary: | SELinux blocks OVS to run 'hostname' | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Rick Alongi <ralongi> | |
| Component: | selinux-policy | Assignee: | Lukas Vrabec <lvrabec> | |
| Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> | |
| Severity: | high | Docs Contact: | Mirek Jahoda <mjahoda> | |
| Priority: | high | |||
| Version: | 7.3 | CC: | anli, atragler, fleitner, gscrivan, lvrabec, mbarrett, mgrepl, mifiedle, mjahoda, mmalik, plautrba, pprakash, pvrabec, ralongi, rkhan, salmy, ssekidde, vlaad | |
| Target Milestone: | rc | Keywords: | ZStream | |
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | selinux-policy-3.13.1-127.el7 | Doc Type: | Bug Fix | |
| Doc Text: |
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.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1430750 1430751 (view as bug list) | Environment: | ||
| Last Closed: | 2017-08-01 15:20:12 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1430750, 1430751 | |||
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 *** Bug 1420636 has been marked as a duplicate of this bug. *** More information on this issue: https://bugzilla.redhat.com/show_bug.cgi?id=1420636 It is currently blocking OpenShift when openvswitch 2.5 or 2.6 is used. # rpm -qa selinux-policy\* selinux-policy-targeted-3.13.1-124.el7.noarch selinux-policy-minimum-3.13.1-124.el7.noarch selinux-policy-mls-3.13.1-124.el7.noarch selinux-policy-3.13.1-124.el7.noarch selinux-policy-devel-3.13.1-124.el7.noarch # sesearch -s openvswitch_t -t initrc_t -c file -A -C # sesearch -s openvswitch_t -t initrc_t -c file -D -C # sesearch -s openvswitch_t -t initrc_t -c dir -A -C # sesearch -s openvswitch_t -t initrc_t -c dir -D -C # Access to initrc_t files and directories is neither allowed nor dontaudit-ed. 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. Steve, OpenShift 3.5 is supported on RHEL 7.2 and higher. We will drop RHEL 7.2 support when RHEL 7.4 comes out in August. Thanks, Mike 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: