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 2130204 - SELinux is preventing /usr/bin/python3.9 from execute access on the file /usr/bin/gpg
Summary: SELinux is preventing /usr/bin/python3.9 from execute access on the file /usr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: 9.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: 9.2
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
: 2160707 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-27 13:40 UTC by Ceri Williams
Modified: 2023-07-18 10:47 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-34.1.44-1.el9
Doc Type: Bug Fix
Doc Text:
Cause: SELinux denies subscription-manager package to execute gpg and gets blocked. Consequence: When a repository configuration changes to "repo_gpgcheck=1", the rhsmcertd worker executes gpg or gpgsm to perform a GPG signature check on this repository's metadata. Fix: Allow rhsmcertd execute gpg Result: No SELinux denials
Clone Of:
Environment:
Last Closed: 2023-05-09 08:16:34 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1887572 0 medium CLOSED SELinux prevents rhsmcertd-worker from executing the gpgsm file 2024-12-20 19:24:50 UTC
Red Hat Issue Tracker RHELPLAN-135026 0 None None None 2022-10-06 15:04:06 UTC
Red Hat Product Errata RHBA-2023:2483 0 None None None 2023-05-09 08:16:49 UTC

Description Ceri Williams 2022-09-27 13:40:14 UTC
Description of problem:

It appears that the subscription-manager package attempts to execute gpg and gets blocked.

Version-Release number of selected component (if applicable):

$ rpm -q redhat-release selinux-policy-targeted subscription-manager
redhat-release-9.0-2.17.el9.x86_64
selinux-policy-targeted-34.1.29-1.el9_0.2.noarch
subscription-manager-1.29.26.1-1.el9_0.x86_64


How reproducible:

Unsure, as this is happening in the background.

Steps to Reproduce: TBC

Actual results:

SELinux alert occurs:
SELinux is preventing /usr/bin/python3.9 from execute access on the file /usr/bin/gpg.


Expected results:
No alert and the policy accommodates Red Hat packages

Additional info:

Source Context                system_u:system_r:rhsmcertd_t:s0
Target Context                system_u:object_r:gpg_exec_t:s0
Target Objects                /usr/bin/gpg [ file ]
Source                        rhsmcertd-worke
Source Path                   /usr/bin/python3.9
Port                          <Unknown>
Host                          REDACTED
Source RPM Packages           python3-3.9.10-2.el9.x86_64
Target RPM Packages           gnupg2-2.3.3-2.el9_0.x86_64
SELinux Policy RPM            selinux-policy-targeted-34.1.29-1.el9_0.2.noarch
Local Policy RPM              selinux-policy-targeted-34.1.29-1.el9_0.2.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     REDACTED
Platform                      Linux REDACTED 5.14.0-70.26.1.el9_0.x86_64
                              #1 SMP PREEMPT Fri Sep 2 16:07:40 EDT 2022 x86_64
                              x86_64
Alert Count                   3
First Seen                    2022-09-26 13:33:08 BST
Last Seen                     2022-09-27 14:23:28 BST

Comment 2 Zdenek Pytela 2022-10-10 13:57:21 UTC
Commit to backport:
commit f9b53ec1aa05e9768b9808507b7b22a81e46c17c
Author: Zdenek Pytela <zpytela>
Date:   Wed Aug 11 17:33:44 2021 +0200

    Allow rhsmcertd execute gpg

Comment 12 errata-xmlrpc 2023-05-09 08:16:34 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 (selinux-policy bug fix and enhancement 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-2023:2483

Comment 13 Welterlen Benoit 2023-07-17 08:08:29 UTC
*** Bug 2160707 has been marked as a duplicate of this bug. ***


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