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.
Description of problem:
Can't run yum install or postgresql database in container.
Selinux policy prevents containers from creating sockets.
Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-192.el7.noarch
How reproducible:
always
Steps to Reproduce:
1. on RHEL 7.5 host with selinux-policy-3.13.1-192.el7.noarch run e.g.:
2. docker run --rm rhel7 yum list bash
3. grep AVC /var/log/audit.log
Actual results:
$ docker run --rm rhel7 yum list bash
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
https://cdn.redhat.com/content/rc/rhel/server/7/x86_64/os/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: cdn.redhat.com; Name or service not known"
Trying other mirror.
...
$ grep AVC /var/log/audit.log
type=AVC msg=audit(1520253563.959:457): avc: denied { create } for pid=8292 comm="yum" scontext=system_u:system_r:container_t:s0:c14,c957 tcontext=system_u:system_r:container_t:s0:c14,c957 tclass=udp_socket
Expected results:
$ docker run --rm rhel7 yum list bash
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
Installed Packages
bash.x86_64 4.2.46-21.el7_3 @anaconda/7.3
Available Packages
bash.x86_64 4.2.46-30.el7 rhel-7-server-htb-rpms
Additional info:
Downgrading to selinux-policy-3.13.1-166.el7.noarch fixes problem.
seems to work just fine for me:
lsm5 @ rhel75 : ~(master) $ sudo docker run --rm rhel7 yum list bash
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
This system is not receiving updates. You can use subscription-manager on the host to register and assign subscriptions.
Installed Packages
bash.x86_64 4.2.46-29.el7_4 @anaconda/7.4
lsm5 @ rhel75 : ~(master) $ rpm -q container-selinux selinux-policy docker
container-selinux-2.50-1.el7.noarch
selinux-policy-3.13.1-192.el7.noarch
docker-1.13.1-55.rhel75.git774336d.el7.x86_64
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-2018:1073