Bug 2188144 - Custom SELinux policy for virt_launcher still present on CNV with DisableCustomSELinuxPolicy feature gate enabled
Summary: Custom SELinux policy for virt_launcher still present on CNV with DisableCust...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 4.13.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.13.1
Assignee: Jed Lejosne
QA Contact: Akriti Gupta
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-19 21:05 UTC by Denys Shchedrivyi
Modified: 2023-08-16 14:11 UTC (History)
4 users (show)

Fixed In Version: hco-bundle-registry-container-v4.13.1.rhel9-79
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-16 14:09:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 9639 0 None Merged SELinux policy: ensure it never gets installed if the feature gate is set 2023-04-25 13:13:34 UTC
Github kubevirt kubevirt pull 9655 0 None Merged [release-0.59] SELinux policy: ensure it never gets installed if the feature gate is set 2023-05-31 10:06:57 UTC
Red Hat Issue Tracker CNV-28245 0 None None None 2023-04-19 21:07:13 UTC
Red Hat Product Errata RHSA-2023:4664 0 None None None 2023-08-16 14:11:49 UTC

Description Denys Shchedrivyi 2023-04-19 21:05:32 UTC
Description of problem:
 On a fresh installed cluster I have feature gate added to kubevirt:

> $ oc describe kubevirt -n openshift-cnv | grep DisableCustomSELinuxPolicy
>        DisableCustomSELinuxPolicy

but custom policy still present on nodes:

> $ sh-5.1# semodule -l | grep virt_launcher
> virt_launcher


Version-Release number of selected component (if applicable):
4.13

How reproducible:
100%

Steps to Reproduce:
1. Install CNV
2. Check feature gate added by default
3. check custom selinux policy

Actual results:
 custom selinux policy for virt_launcher exists

Expected results:
 no custom selinux policy for virt_launcher

Additional info:

Comment 1 sgott 2023-04-20 13:39:09 UTC
I'm estimating the severity of this to be medium because there's no danger of loss of data or functionality from a user perspective. The policy is just not being used. We suspect the issue is introduced by HCO's handling of feature gates, thus we're re-assigning this to the Installation component. Please feel free to move this if that's not correct.

Comment 2 Jed Lejosne 2023-04-20 18:11:33 UTC
This was wrongly assumed (by me) as being an HCO issue.
This is actually a KubeVirt bug. A fix has been PRed (linked to issue).

Comment 4 Akriti Gupta 2023-05-31 10:58:10 UTC
Verified on  v4.13.1.rhel9-79
feature gate is added by default to Kubevirt
[akriti@fedora ~]$  oc describe kubevirt -n openshift-cnv | grep DisableCustomSELinuxPolicy
        DisableCustomSELinuxPolicy

no custom selinux policy for virt_launcher on nodes

sh-4.4# chroot /host
sh-5.1# semodule -l | grep virt_launcher
sh-5.1#

Comment 14 errata-xmlrpc 2023-08-16 14:09:57 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 (Important: OpenShift Virtualization 4.13.3 Images security and bug fix 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-2023:4664


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