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 2177075

Summary: with any IPv4 loopback address as resolver on the host, passt forwards DNS queries to 127.0.0.1 instead of original loopback address
Product: Red Hat Enterprise Linux 9 Reporter: Stefano Brivio <sbrivio>
Component: passtAssignee: Stefano Brivio <sbrivio>
Status: CLOSED ERRATA QA Contact: Lei Yang <leiyang>
Severity: high Docs Contact:
Priority: medium    
Version: 9.2CC: chayang, jinzhao, juzhang, pvlasin, zhguo
Target Milestone: rcKeywords: Triaged
Target Release: 9.2Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: passt-0^20230222.g4ddbcb9-2.el9_2 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2179035 (view as bug list) Environment:
Last Closed: 2023-05-09 07:43:36 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: 2179035    

Description Stefano Brivio 2023-03-09 21:14:07 UTC
Seen with a Fedora 37 guest on a Fedora 37 host, with systemd-resolved handling DNS resolution in both:

- the IPv4 resolver listed in /etc/resolv.conf is 127.0.0.53 on both host and guest

- passt advertises the address of the default gateway, via DHCP, as DNS resolver (because that's the only way 127.0.0.53 on the host can be reached)

- the guest sends a DNS query to the address of the default gateway

- passt forwards it to 127.0.0.1 (not 127.0.0.53) and it doesn't receive a reply. DNS resolution fails altogether in the guest

This didn't happen with Fedora 36 and it only started happening recently on Fedora 37 -- I guess systemd-resolved also accepted queries to 127.0.0.1 until some point in time. I also couldn't see an issue like this on RHEL 9.

However, passt is forwarding DNS queries to the wrong (IPv4 loopback) address, which is rather critical: we shouldn't rely on a particular host configuration for DNS resolution to work.

We need these commits from upstream:

  https://passt.top/passt/commit/?id=ddf7097a718095e879428667f2d56ec7d4f027e5
  udp: Actually use host resolver to forward DNS queries

  https://passt.top/passt/commit/?id=8ca907a3f0a095691cdaf56ad610fd802df88146
  conf: Split add_dns{4,6}() out of get_dns()

  https://passt.top/passt/commit/?id=bad252687271c0255f6a077f19cbc19aa0427f8d
  conf, udp: Allow any loopback address to be used as resolver

Comment 19 errata-xmlrpc 2023-05-09 07:43:36 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 (passt 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:2292