Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-4379

DNS resolution fails from time to time when no IPv6 record is returned

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • grub2-2.12-4.el10
    • None
    • Moderate
    • rhel-bootloader
    • ssg_display
    • 3
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Bug Fix
    • Hide
      .DNS resolution no longer fails in GRUB when you try to resolve DNS names into IP addresses

      Previously when you tried to resolve DNS names into IP addresses, GRUB exited prematurely because of incorrect error handling when both IPv4 and IPv6 servers were available. The buffer was allocated but no address was returned. This resulted in DNS resolution failure. With this fix, the error handling has been improved and as a result, DNS resolution works correctly.
      Show
      .DNS resolution no longer fails in GRUB when you try to resolve DNS names into IP addresses Previously when you tried to resolve DNS names into IP addresses, GRUB exited prematurely because of incorrect error handling when both IPv4 and IPv6 servers were available. The buffer was allocated but no address was returned. This resulted in DNS resolution failure. With this fix, the error handling has been improved and as a result, DNS resolution works correctly.
    • In Progress
    • None
    • 57,005

      Description of problem:

      When trying to resolve DNS names into IP addresses, the DNS code fails from time to time with the following error:
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
      error: ../../grub-core/net/dns.c:688:no DNS record found.
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      This happens when both IPv4 and IPv6 queries are performed against the DNS server (e.g. 8.8.8.8) but there is no IP returned for IPv6 query, as shown below:
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
      grub> net_del_dns 192.168.122.1
      grub> net_add_dns 8.8.8.8
      grub> net_nslookup ipv4.test-ipv6.com
      error: ../../grub-core/net/dns.c:688:no DNS record found.
      grub> net_nslookup ipv4.test-ipv6.com
      216.218.228.115
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      Digging into this, I found that the Grub code exits prematurely when the data->addresses buffer has been allocated in recv_hook(), even if there was no address returned last time recv_hook() executed.

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

      All grub2 releases

      How reproducible:

      See above.

      Steps to Reproduce:
      1. Network boot a UEFI system with grubx64.efi
      2. Change DNS server as above
      3. Repeatedly execute "net_nslookup ipv4.test-ipv6.com"

      Actual results:

      Sometimes error, sometimes "216.218.228.115"

      Expected results:

      Always "216.218.228.115" returned

              bootloader-eng-team bootloader -eng-team
              rhn-support-rmetrich Renaud Métrich
              bootloader -eng-team bootloader -eng-team
              Release Test Team Release Test Team
              Gabriela Fialova Gabriela Fialova (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: