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 2095097 - [RFE] Podman copying the entries of /etc/hosts in the container
Summary: [RFE] Podman copying the entries of /etc/hosts in the container
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: podman
Version: 8.6
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jindrich Novy
QA Contact: Yuhui Jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-09 02:32 UTC by Faraz Sayyed
Modified: 2023-09-18 04:38 UTC (History)
13 users (show)

Fixed In Version: podman-4.1.0-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-08 09:16:27 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github containers podman issues 11835 0 None closed Podman includes host /etc/hosts in container /etc/hosts 2022-09-02 13:13:58 UTC
Github containers podman issues 13748 0 None closed podman behaves differently than docker regarding /etc/hosts management 2022-09-02 13:14:00 UTC
Red Hat Issue Tracker RHELPLAN-124740 0 None None None 2022-06-09 02:35:13 UTC
Red Hat Product Errata RHSA-2022:7457 0 None None None 2022-11-08 09:16:49 UTC

Description Faraz Sayyed 2022-06-09 02:32:22 UTC
Description of problem:

Podman leaking the entries of /etc/hosts from the host to the containers.

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

podman-4.0.2-6.module+el8.6.0+14877+f643d2d6.x86_64

How reproducible:

Always

Steps to Reproduce:

1. podman run -it --rm ubi8:latest cat /etc/hosts

Actual results:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.88.0.36	6b34a9129a7e unruffled_gagarin
10.88.0.1 host.containers.internal

Additional info:

There is a new option base_hosts_file="none" that can be added to the container.conf file which can prevent the podman from copying the contents of /etc/hosts from the host to the container. But this option will only work with podman version 4.1. Can we backport this feature to podman version 4.0?

Please refer to the below upstream link for reference:

https://github.com/containers/podman/issues/14253

Comment 3 Tom Sweeney 2022-06-09 17:16:06 UTC
@dornelas This was fixed in containers/common with this PR:  https://github.com/containers/common/pull/998, which was merged on April 21, 2022 which made it into c/common v0.48.0.  That version of c/common was spun up on May 2, 2022, and is in upstream Podman and also the v4.1 release branch. The v4.1 release branch is where the Podman v4.1.1 will be spun for RHEL 8.6.0.2.

Given All that, I'm going to set this to POST and will assign to Jindrich for any further BZ/packaging needs.

Comment 4 Derrick Ornelas 2022-06-09 17:18:35 UTC
Thanks for the confirmation.

Comment 15 errata-xmlrpc 2022-11-08 09:16:27 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: container-tools:rhel8 security, 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/RHSA-2022:7457

Comment 16 Red Hat Bugzilla 2023-09-18 04:38:55 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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