Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1716971

Summary: RHSM daemon denials when configuring Satellite 6 repositories
Product: Red Hat Enterprise Linux 8 Reporter: Lukas Zapletal <lzap>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: high    
Version: 8.0CC: csnyder, jsefler, lvrabec, mmalik, plautrba, ssekidde, zpytela
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.1   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 22:11:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1738246    

Description Lukas Zapletal 2019-06-04 13:10:02 UTC
Hello,

when configuring and installing Satellite 6.6 on RHEL 8.0, we see denials:

[root@pipeline-capsule-6-6-rhel8 vagrant]# ausearch -m AVC
----
time->Tue Jun  4 10:19:38 2019
type=PROCTITLE msg=audit(1559643578.802:2901): proctitle=2F7573722F6C6962657865632F706C6174666F726D2D707974686F6E002F7573722F6C6962657865632F7268736D63657274642D776F726B6572
type=SYSCALL msg=audit(1559643578.802:2901): arch=c000003e syscall=257 success=yes exit=9 a0=ffffff9c a1=5622b40e11b0 a2=441 a3=1b6 items=0 ppid=615 pid=13889 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rhsmcertd-worke" exe="/usr/libexec/platform-python3.6" subj=system_u:system_r:rhsmcertd_t:s0 key=(null)
type=AVC msg=audit(1559643578.802:2901): avc:  denied  { open } for  pid=13889 comm="rhsmcertd-worke" path="/var/log/hawkey.log" dev="vda3" ino=67118014 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=unconfined_u:object_r:var_log_t:s0 tclass=file permissive=1
----
time->Tue Jun  4 10:19:38 2019
type=PROCTITLE msg=audit(1559643578.802:2902): proctitle=2F7573722F6C6962657865632F706C6174666F726D2D707974686F6E002F7573722F6C6962657865632F7268736D63657274642D776F726B6572
type=SYSCALL msg=audit(1559643578.802:2902): arch=c000003e syscall=257 success=yes exit=10 a0=ffffff9c a1=7f2754eb7a70 a2=800c1 a3=1a4 items=0 ppid=615 pid=13889 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rhsmcertd-worke" exe="/usr/libexec/platform-python3.6" subj=system_u:system_r:rhsmcertd_t:s0 key=(null)
type=AVC msg=audit(1559643578.802:2902): avc:  denied  { open } for  pid=13889 comm="rhsmcertd-worke" path="/var/cache/dnf/metadata_lock.pid" dev="vda3" ino=201781718 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:rpm_var_cache_t:s0 tclass=file permissive=1
type=AVC msg=audit(1559643578.802:2902): avc:  denied  { create } for  pid=13889 comm="rhsmcertd-worke" name="metadata_lock.pid" scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:rpm_var_cache_t:s0 tclass=file permissive=1
type=AVC msg=audit(1559643578.802:2902): avc:  denied  { add_name } for  pid=13889 comm="rhsmcertd-worke" name="metadata_lock.pid" scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:rpm_var_cache_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1559643578.802:2902): avc:  denied  { write } for  pid=13889 comm="rhsmcertd-worke" name="dnf" dev="vda3" ino=201789555 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:rpm_var_cache_t:s0 tclass=dir permissive=1
----
time->Tue Jun  4 10:19:38 2019
type=PROCTITLE msg=audit(1559643578.905:2903): proctitle=2F7573722F6C6962657865632F706C6174666F726D2D707974686F6E002F7573722F6C6962657865632F7268736D63657274642D776F726B6572
type=SYSCALL msg=audit(1559643578.905:2903): arch=c000003e syscall=257 success=yes exit=10 a0=ffffff9c a1=5622b4133400 a2=0 a3=0 items=0 ppid=615 pid=13889 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rhsmcertd-worke" exe="/usr/libexec/platform-python3.6" subj=system_u:system_r:rhsmcertd_t:s0 key=(null)
type=AVC msg=audit(1559643578.905:2903): avc:  denied  { open } for  pid=13889 comm="rhsmcertd-worke" path="/var/cache/dnf/Satellite-Capsule-6.6-compose-76921cb09bd29791/repodata/repomd.xml" dev="vda3" ino=342121 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=unconfined_u:object_r:rpm_var_cache_t:s0 tclass=file permissive=1
----
time->Tue Jun  4 10:19:38 2019
type=PROCTITLE msg=audit(1559643578.905:2904): proctitle=2F7573722F6C6962657865632F706C6174666F726D2D707974686F6E002F7573722F6C6962657865632F7268736D63657274642D776F726B6572
type=SYSCALL msg=audit(1559643578.905:2904): arch=c000003e syscall=190 success=yes exit=0 a0=a a1=5622b414b9d0 a2=5622b4105c90 a3=41 items=0 ppid=615 pid=13889 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rhsmcertd-worke" exe="/usr/libexec/platform-python3.6" subj=system_u:system_r:rhsmcertd_t:s0 key=(null)
type=AVC msg=audit(1559643578.905:2904): avc:  denied  { setattr } for  pid=13889 comm="rhsmcertd-worke" name="58431a75e3dd9f682161fe33e0ed994a63f789d6594a797b28720cce6505dbb7-primary.xml.gz" dev="vda3" ino=342122 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=unconfined_u:object_r:rpm_var_cache_t:s0 tclass=file permissive=1
----
time->Tue Jun  4 10:19:44 2019
type=PROCTITLE msg=audit(1559643584.604:2905): proctitle=2F7573722F6C6962657865632F706C6174666F726D2D707974686F6E002F7573722F6C6962657865632F7268736D63657274642D776F726B6572
type=SYSCALL msg=audit(1559643584.604:2905): arch=c000003e syscall=87 success=yes exit=0 a0=7f2754ec0cf8 a1=0 a2=7f276b010a40 a3=7f276acfed1e items=0 ppid=615 pid=13889 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rhsmcertd-worke" exe="/usr/libexec/platform-python3.6" subj=system_u:system_r:rhsmcertd_t:s0 key=(null)
type=AVC msg=audit(1559643584.604:2905): avc:  denied  { unlink } for  pid=13889 comm="rhsmcertd-worke" name="metadata_lock.pid" dev="vda3" ino=201781718 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:rpm_var_cache_t:s0 tclass=file permissive=1
type=AVC msg=audit(1559643584.604:2905): avc:  denied  { remove_name } for  pid=13889 comm="rhsmcertd-worke" name="metadata_lock.pid" dev="vda3" ino=201781718 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:rpm_var_cache_t:s0 tclass=dir permissive=1

[root@pipeline-capsule-6-6-rhel8 vagrant]# audit2allow -Ra

require {
        type rhsmcertd_t;
}

#============= rhsmcertd_t ==============
logging_read_generic_logs(rhsmcertd_t)
rpm_manage_cache(rhsmcertd_t)

The process is:

1) Register and subscribe RHEL8 to our own Satellite
2) Enable few repositories
3) Yum install packages

Bang, denials. I can provide more details on how to setup things privately. Ping me for more info.

Comment 2 Lukas Vrabec 2019-06-05 09:06:49 UTC
Fixes in Fedora: 
commit c2d79cf5e1e07f02cba549dfc0b37a75f3042858 (HEAD -> rawhide)
Author: Lukas Vrabec <lvrabec>
Date:   Wed Jun 5 11:06:16 2019 +0200

    Allow rhsmcertd_t domain to manage rpm cache

Comment 23 errata-xmlrpc 2019-11-05 22:11:44 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, 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-2019:3547