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 1337319 - rhsmcertd problem connecting to port 9090 due to selinux
Summary: rhsmcertd problem connecting to port 9090 due to selinux
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.2
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: beta
: 7.3
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-18 19:46 UTC by Johan Bergström
Modified: 2016-11-04 02:29 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.13.1-81.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 02:29:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2283 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2016-11-03 13:36:25 UTC

Description Johan Bergström 2016-05-18 19:46:40 UTC
Description of problem:
missing rhsmcertd_t attribute (from subscription-manager)

Noticed this while running satellite 6.1.9 server, freshly installed.

From /var/log/messages;

May 18 21:55:07 hostname setroubleshoot: SELinux is preventing /usr/bin/python2.7 from name_connect access on the tcp_socket port 9090. For complete SELinux messages. run sealert -l c1238a23-821d-43d7-94fe-e4838529ee3d
May 18 21:55:07 hostname python: SELinux is preventing /usr/bin/python2.7 from name_connect access on the tcp_socket port 9090.#012#012*****  Plugin catchall (100. confidence) suggests   **************************#012#012If you believe that python2.7 should be allowed name_connect access on the port 9090 tcp_socket by default.#012Then you should report this as a bug.#012You can generate a local policy module to allow this access.#012Do#012allow this access for now by executing:#012# grep rhsmcertd-worke /var/log/audit/audit.log | audit2allow -M mypol#012# semodule -i mypol.pp#012

Checking and creating module:

# grep rhsmcertd-worke /var/log/audit/audit.log | audit2allow
#============= rhsmcertd_t ==============
allow rhsmcertd_t websm_port_t:tcp_socket name_connect;

Inserting module gives;

# semodule -i rhsmcertd.pp
libsepol.print_missing_requirements: rhsmcertd's global requirements were not met: type/attribute rhsmcertd_t (No such file or directory).
libsemanage.semanage_link_sandbox: Link packages failed (No such file or directory).
semodule:  Failed!


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

# rpm -qa | grep -E 'redhat-release|subscription-manager|selinux-policy'
redhat-release-server-7.2-9.el7.x86_64
subscription-manager-1.15.9-15.el7.x86_64
selinux-policy-targeted-3.13.1-60.el7_2.3.noarch
selinux-policy-3.13.1-60.el7_2.3.noarch


How reproducible:

100% spamming /var/log/messages in a timely manner, every 4 hours.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Lukas Zapletal 2016-05-24 09:05:19 UTC
We don't maintain SELinux for subscription-manager component ourselves. This is on our SELinux team.

Triage notes: When RHEL subscribe to Satellite 6, rhsmcertd component starts communication over HTTPS on port 9090 with Satellite. Please introduce a boolean and if possible, enable it by default so Satellite 6 users don't need to turn it on for each individual system. Applies for all supported RHELs: 5, 6, 7 (where rhsmcertd is available).

Thanks.

Comment 2 Johan Bergström 2016-05-24 09:16:00 UTC
I realized that I was missing the selinux-policy-devel rpm & there is already a module named rhsmcertd, that probably caused the problem with loading the custom module.

# semodule -l | grep rhsm
rhsmcertd-jb    1.0
rhsmcertd       1.1.1

Re-created it with the name rhsmcertd-jb and it now works fine to load, so workaround is implemented. Lowering prio.

Comment 3 Johan Bergström 2016-05-24 09:36:52 UTC
And, the product is RHEL7.2, not 6.9. I don't have permission to change it.

Comment 9 errata-xmlrpc 2016-11-04 02:29:50 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://rhn.redhat.com/errata/RHBA-2016-2283.html


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