Bug 1687321 - Missing SELinux policies for Octavia Active/Standby
Summary: Missing SELinux policies for Octavia Active/Standby
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-selinux
Version: 13.0 (Queens)
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: z6
: 13.0 (Queens)
Assignee: Nir Magnezi
QA Contact: nlevinki
URL:
Whiteboard:
Depends On:
Blocks: 1671022 1676467 1698576
TreeView+ depends on / blocked
 
Reported: 2019-03-11 09:17 UTC by Nir Magnezi
Modified: 2019-10-22 09:16 UTC (History)
5 users (show)

Fixed In Version: openstack-selinux-0.8.18-1.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-30 17:23:45 UTC
Target Upstream Version:
Embargoed:
nmagnezi: needinfo-


Attachments (Terms of Use)
audit.log (140.42 KB, text/plain)
2019-03-11 09:17 UTC, Nir Magnezi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1671022 0 high CLOSED Fix IPv6 in Active/Standby topology 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2019:0926 0 None None None 2019-04-30 17:23:55 UTC

Description Nir Magnezi 2019-03-11 09:17:09 UTC
Created attachment 1542817 [details]
audit.log

Description of problem:
=======================
Reported initially at bug 1671022 comment 21.
The fix[1] fix bug 1671022 included a change of Octavia behavior, which should also be reflected in respective SELinux policies.

Prior to the fix, a Python agent named Amphora agent managed the VIP interface both on a standalone (single amphora) and active/standby (two amphorae).

This created an issue where addresses would fail to create due to
a duplicate address detection.
To mitigate that,  in a case[2] of active/standby topology Keepalived will bring up the VIP interface instead of the Amphora agent. 


[1] https://review.openstack.org/#/c/632763/
[2] https://review.openstack.org/#/c/632763/4/octavia/amphorae/backends/agent/api_server/plug.py@134

Version-Release number of selected component (if applicable):
=============================================================
OSP13
openstack-selinux-0.8.17-2.el7ost.noarch

How reproducible:
=================
Always


Steps to Reproduce:
===================
As captured from bug 1671022 comment 21: 
1. Create a Highly available Octavia load balancer with IPv6 VIP.
2. Trigger failover via: openstack loadbalancer failover <lb_Id>


Actual results:
===============
One of the Amphorae instances marked with Status: ERROR

Expected results:
=================
Both Amphorae instances status should be: ALLOCATED

Additional info:
================
Tested with RHEL7.6


audit2allow:
#============= keepalived_t ==============

#!!!! WARNING: 'bin_t' is a base type.
allow keepalived_t bin_t:file entrypoint;


 audit2why
type=AVC msg=audit(1552241787.746:60): avc:  denied  { entrypoint } for  pid=3530 comm="(kill)" path="/usr/bin/kill" dev="vda1" ino=43348 scontext=system_u:system_r:keepalived_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1

	Was caused by:
		Missing type enforcement (TE) allow rule.

		You can use audit2allow to generate a loadable module to allow this access.

Comment 2 Nir Magnezi 2019-03-11 11:38:45 UTC
PR merged.

Comment 3 Nir Magnezi 2019-03-27 15:11:46 UTC
Hey Julie,

When is the next promotion of openstack-selinux?
We wish to have this fix in an OSP13 RPM so we can test against it.

Thanks,
Nir

Comment 4 Julie Pichon 2019-03-28 09:50:39 UTC
Thanks for the ping. I will do a build in the next couple of days.

Comment 11 errata-xmlrpc 2019-04-30 17:23:45 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, 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-2019:0926


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