Bug 2196642 - Fix selinux-policy update behavior under rpm-ostree with user-installed policy modules
Summary: Fix selinux-policy update behavior under rpm-ostree with user-installed polic...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: ostree
Version: 9.1
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: RHCOS SST
QA Contact: RHCOS SST QE
URL:
Whiteboard:
Depends On: 2049189 2057497
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-09 17:15 UTC by Micah Abbott
Modified: 2023-08-14 08:27 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2057497
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-156808 0 None None None 2023-05-09 17:16:56 UTC

Description Micah Abbott 2023-05-09 17:15:27 UTC
Cloned BZ#2057497 to explore the feasibility of backporting the fix for that problem to RHEL 9.1.

We had a RHEL for Edge customer hit this problem after doing a SELinux policy modification on RHEL 9.0 and then running into problems after upgrading to RHEL 9.1.

See https://redhat-internal.slack.com/archives/C01UHN61GSD/p1683290313616689
See https://access.redhat.com/support/cases/#/case/03503744

The upstream issue that tracks this (or part of this) is https://github.com/coreos/rpm-ostree/issues/27.

A workaround for this is currently included in Red Hat CoreOS via a systemd unit that runs `semodule -B` early in the boot process:

https://github.com/openshift/os/blob/master/overlay.d/05rhcos/usr/lib/systemd/system/rhcos-selinux-policy-upgrade.service
https://github.com/openshift/os/blob/master/overlay.d/05rhcos/usr/libexec/rhcos-rebuild-selinux-policy

Comment 1 Colin Walters 2023-05-09 18:03:52 UTC
This is fixed since ostreedev/ostree#2569 in ostree v2022.3, which is shipped in 9.1 already.

But note that the fix needs to be in the version we're upgrading *from*.  We could try to ship this back to 9.0.z but it's a nontrivial patch.

Comment 3 Timothée Ravier 2023-05-10 08:53:29 UTC
This also depends on fixes in libsemanage and policy coreutils that I've verified have landed in 9.0 already:
- https://bugzilla.redhat.com/show_bug.cgi?id=2049191 in 9.0
- https://bugzilla.redhat.com/show_bug.cgi?id=2049193 in 9.0
- https://bugzilla.redhat.com/show_bug.cgi?id=2104935 in 9.1 backported to 9.0 with https://bugzilla.redhat.com/show_bug.cgi?id=2129140

Comment 4 Timothée Ravier 2023-05-10 08:56:26 UTC
Link for upstream ostree PR: https://github.com/ostreedev/ostree/pull/2569


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