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 2051522 - pulpcore_t and pulpcore_server_t domains are prevented to access httpd_config_t files
Summary: pulpcore_t and pulpcore_server_t domains are prevented to access httpd_config...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.11.0
Assignee: satellite6-bugs
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-07 12:28 UTC by Lukas Pramuk
Modified: 2022-07-05 14:33 UTC (History)
3 users (show)

Fixed In Version: pulpcore-selinux-1.3.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-05 14:32:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:33:04 UTC

Description Lukas Pramuk 2022-02-07 12:28:11 UTC
Description of problem:
pulpcore_t and pulpcore_server_t domains are prevented to access httpd_config_t files 
audit.log is being filled with these denials continuously.


Version-Release number of selected component (if applicable):
Satellite 7.0.0
pulpcore-selinux-1.2.7-1.1.el7pc.x86_64

How reproducible:
deterministic

Steps to Reproduce:
1. Have a Satellite
2. Check for denials

# audit2allow -a


#============= pulpcore_server_t ==============
allow pulpcore_server_t httpd_config_t:file { getattr ioctl open read };

#============= pulpcore_t ==============
allow pulpcore_t httpd_config_t:dir search;
allow pulpcore_t httpd_config_t:file { getattr ioctl open read };


Actual results:
selinux denials present

Expected results:
no selinux denials

Comment 1 Lukas Pramuk 2022-02-07 12:31:25 UTC
# grep avc /var/log/audit/audit.log*
type=AVC msg=audit(1643977935.648:127): avc:  denied  { read } for  pid=1664 comm="gunicorn" name="database_fields.symmetric.key" dev="vda1" ino=151037454 scontext=system_u:system_r:pulpcore_server_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=file permissive=1
type=AVC msg=audit(1643977935.648:127): avc:  denied  { open } for  pid=1664 comm="gunicorn" path="/etc/pulp/certs/database_fields.symmetric.key" dev="vda1" ino=151037454 scontext=system_u:system_r:pulpcore_server_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=file permissive=1
type=AVC msg=audit(1643977935.673:128): avc:  denied  { getattr } for  pid=1664 comm="gunicorn" path="/etc/pulp/certs/database_fields.symmetric.key" dev="vda1" ino=151037454 scontext=system_u:system_r:pulpcore_server_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=file permissive=1
type=AVC msg=audit(1643977935.673:129): avc:  denied  { ioctl } for  pid=1664 comm="gunicorn" path="/etc/pulp/certs/database_fields.symmetric.key" dev="vda1" ino=151037454 ioctlcmd=5401 scontext=system_u:system_r:pulpcore_server_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=file permissive=1
type=AVC msg=audit(1643977935.664:130): avc:  denied  { search } for  pid=1318 comm="pulpcore-worker" name="certs" dev="vda1" ino=151037453 scontext=system_u:system_r:pulpcore_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1643977935.664:130): avc:  denied  { read } for  pid=1318 comm="pulpcore-worker" name="database_fields.symmetric.key" dev="vda1" ino=151037454 scontext=system_u:system_r:pulpcore_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=file permissive=1
type=AVC msg=audit(1643977935.664:130): avc:  denied  { open } for  pid=1318 comm="pulpcore-worker" path="/etc/pulp/certs/database_fields.symmetric.key" dev="vda1" ino=151037454 scontext=system_u:system_r:pulpcore_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=file permissive=1
type=AVC msg=audit(1643977935.673:131): avc:  denied  { getattr } for  pid=1318 comm="pulpcore-worker" path="/etc/pulp/certs/database_fields.symmetric.key" dev="vda1" ino=151037454 scontext=system_u:system_r:pulpcore_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=file permissive=1
type=AVC msg=audit(1643977935.673:132): avc:  denied  { ioctl } for  pid=1318 comm="pulpcore-worker" path="/etc/pulp/certs/database_fields.symmetric.key" dev="vda1" ino=151037454 ioctlcmd=5401 scontext=system_u:system_r:pulpcore_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=file permissive=1

Comment 3 Mike DePaulo 2022-04-11 20:36:34 UTC
This is fixed upstream in pulpcore-selinux 1.3.0:
https://github.com/pulp/pulpcore-selinux/releases/tag/1.3.0

Comment 4 Lukas Pramuk 2022-04-20 12:02:16 UTC
VERIFIED.

@Satellite 6.11.0 Snap16
pulpcore-selinux-1.3.0-1.el7pc.x86_64

by the following manual reproducer:

# grep avc.*pulpcore /var/log/audit/audit.log*
<empty>

>>> there are no pulpcore related selinux denials

Comment 5 Lukas Pramuk 2022-04-20 13:34:49 UTC
However, on RHEL8 there are still some *other* pulpcore related denials:

    pulpcore_t and pulpcore_server_t domains are prevented to access unconfined_service_t:key => BZ#2077017

Comment 8 errata-xmlrpc 2022-07-05 14:32:45 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 (Moderate: Satellite 6.11 Release), 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-2022:5498


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