Bug 2122197 - AVC denials noticed for gunicorn process after upgrading the Satellite 6.11 OS from RHEL 7 to RHEL 8 using leapp
Summary: AVC denials noticed for gunicorn process after upgrading the Satellite 6.11 O...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SELinux
Version: 6.11.0
Hardware: All
OS: All
high
high
Target Milestone: 6.11.3
Assignee: Lukas Zapletal
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-29 13:25 UTC by Odilon Sousa
Modified: 2022-09-28 16:28 UTC (History)
7 users (show)

Fixed In Version: pulpcore-selinux-1.3.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2111570
Environment:
Last Closed: 2022-09-28 16:28:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pulp/pulpcore-selinux/commit/7905c5a7bfbac69e6decdc4478d4020c10463cf6 0 None None None 2022-08-29 13:26:11 UTC
Red Hat Issue Tracker SAT-12270 0 None None None 2022-08-29 13:26:11 UTC
Red Hat Product Errata RHBA-2022:6743 0 None None None 2022-09-28 16:28:59 UTC

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


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