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.
Bug 2050140 - unexpected selinux changes during installation to image
Summary: unexpected selinux changes during installation to image
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: anaconda
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Anaconda Maintenance Team
QA Contact: Release Test Team
Sagar Dubewar
URL:
Whiteboard:
Depends On:
Blocks: 2026666
TreeView+ depends on / blocked
 
Reported: 2022-02-03 10:51 UTC by Zdenek Veleba
Modified: 2024-01-09 11:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
.Unexpected SELinux policies on systems where Anaconda is running as an application When Anaconda is running as an application on an already installed system (for example to perform another installation to an image file using the `–image` anaconda option), the system is not prohibited to modify the SELinux types and attributes during installation. As a consequence, certain elements of SELinux policy might change on the system where Anaconda is running. To work around this problem, do not run Anaconda on the production system. Instead, run Anaconda in a temporary virtual machine to keep the SELinux policy unchanged on a production system. Running anaconda as part of the system installation process such as installing from `boot.iso` or `dvd.iso` is not affected by this issue.
Clone Of:
Environment:
Last Closed: 2022-04-22 15:36:26 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-110940 0 None None None 2022-02-03 10:57:53 UTC

Description Zdenek Veleba 2022-02-03 10:51:12 UTC
Description of problem:
Some selinux types and attributes were changed during the installation to image.

Version-Release number of selected component (if applicable):
RHEL-8.6.0-20220201.1
anaconda-33.16.6.5-1.el8

How reproducible:
Always

Steps to Reproduce:
1. seinfo --all > seinfo_all_before.out
2. Create disk image `fallocate -l 9G /root/disk.img`
2. Start installation `anaconda --image=/root/disk.img --repo=<url>`
3. Perform minimal installation
3. seinfo --all > seinfo_all_after.out

Actual results:
Full seinfo diff, before and after installation to image:
diff seinfo_all_before.out seinfo_all_after.out 
7c7
<   Types:              4946    Attributes:          252
---
>   Types:              4943    Attributes:          254
10,12c10,12
<   Allow:            110798    Neverallow:            0
<   Auditallow:          163    Dontaudit:         10258
<   Type_trans:       243938    Type_change:          87
---
>   Allow:            110675    Neverallow:            0
>   Auditallow:          161    Dontaudit:         10310
>   Type_trans:       241546    Type_change:          87
2547c2547
< Types: 4946
---
> Types: 4943
3772,3773d3771
<    flatpak_helper_exec_t
<    flatpak_helper_t
6142a6141
>    sandbox_t
6631,6632d6629
<    swtpm_exec_t
<    swtpm_t
7495c7492
< Type Attributes: 252
---
> Type Attributes: 254
7656a7654
>    sandbox_domain
7658a7657
>    sandbox_typeattr_1

Expected results:
No changes on the "host" system.

Additional info:
It seems that the differences depend on what environment you have and what you are installing to the image.

Comment 6 Jiri Konecny 2022-04-01 10:39:51 UTC
Hi Vlada, could you please take a look on this if it is SELinux or us?

Comment 7 Vladimír Slávik 2022-04-12 17:29:17 UTC
I did not find anything that would explicitly change such things, so I think this effect is indirect and likely not our bug.

In my limited understanding, a system's policy can consist of many files installed by many packages, and this command's output only dumps the sum of all the types from all the files. With that hypothesis, the differences in seinfo output according to installed packages make sense. And changes to the output on host instead of target feel like something is leaking while installing things. It might be useful to see if the same changes occur to installation environment.

Better ask somebody who knows what they are doing...


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