Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 2122197

Summary: AVC denials noticed for gunicorn process after upgrading the Satellite 6.11 OS from RHEL 7 to RHEL 8 using leapp
Product: Red Hat Satellite Reporter: Odilon Sousa <osousa>
Component: SELinuxAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: high Docs Contact:
Priority: high    
Version: 6.11.0CC: ahumbe, brant.evans, ehelms, lzap, parmstro, pmendezh, zhunting
Target Milestone: 6.11.3Keywords: Triaged, Upgrades
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: pulpcore-selinux-1.3.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2111570 Environment:
Last Closed: 2022-09-28 16:28:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 Lukas Pramuk 2022-09-13 12:08:21 UTC
VERIFIED.

@Satellite 6.11.3 Snap1
pulpcore-selinux-1.3.2-1.el8pc.x86_64

by the following manual reproducer:

1) LEAPP upgrade Satellite 6.11.3 using internal repos
# sed -i 's/_RHEL7/_RHEL8/g' /etc/yum.repos.d/satellite.repo
# leapp upgrade --reboot --enablerepo Sat6-CI_Red_Hat_Satellite_6_11_Composes_Satellite_6_11_RHEL8 --enablerepo Sat6-CI_Satellite_6_11_Composes_Satellite_Maintenance_6_11_RHEL8

2) Perform LEAPP post-upgrade tasks namely switch back to enforcing selinux
# setenforce 1

3) Restart pulpcore-api service
# satellite-maintain service restart --only pulpcore-api

4) Check new avc denials for "gunicorn"
# grep avc /var/log/audit/audit.log | tail -2

REPRO:
type=AVC msg=audit(1663069326.287:210): avc:  denied  { read } for  pid=9290 comm="gunicorn" scontext=system_u:system_r:pulpcore_server_t:s0 tcontext=system_u:system_r:pulpcore_t:s0 tclass=key permissive=1
type=AVC msg=audit(1663069326.287:211): avc:  denied  { view } for  pid=9290 comm="gunicorn" scontext=system_u:system_r:pulpcore_server_t:s0 tcontext=system_u:system_r:pulpcore_t:s0 tclass=key permissive=1

vs.

FIX:
<empty>

>>> there are no "gunicorn" selinux denials every service restart

Note:
there are still some "gunicorn" selinux denials in the log but these were produced during LEAPP upgrade process, after LEAPP upgrade finishes things settle down

Yet there are these denials as services *during* LEAPP upgrade are temporarily starting unconfined (-> pulpcore_t)
type=AVC msg=audit(1663068460.808:210): avc:  denied  { read } for  pid=9710 comm="pulpcore-worker" scontext=system_u:system_r:pulpcore_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=key permissive=1
type=AVC msg=audit(1663068460.809:211): avc:  denied  { view } for  pid=9710 comm="pulpcore-worker" scontext=system_u:system_r:pulpcore_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=key permissive=1

Comment 7 errata-xmlrpc 2022-09-28 16:28:48 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 (Satellite 6.11.3 Async 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/RHBA-2022:6743