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 1826709 - dnsmasq cannot forward DNS reply without qname
Summary: dnsmasq cannot forward DNS reply without qname
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnsmasq
Version: ---
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 8.0
Assignee: Petr Menšík
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On: 1826691
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-22 11:44 UTC by Petr Menšík
Modified: 2020-09-23 10:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1826691
Environment:
Last Closed: 2020-09-23 10:40:21 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Menšík 2020-04-22 11:44:55 UTC
+++ This bug was initially created as a clone of Bug #1826691 +++

Description of problem:
dnsmasq is not able to deliver response to client, if configured upstream forwarder replies just with status code and no QNAME section present.

Unbound 1.6.6 sends such reply, when non-recursive query is sent to it. If dnsmasq is forwarding to it, it will not deliver SERVFAIL or original response, it would just timeout.

Version-Release number of selected component (if applicable):
dnsmasq-2.80-13.fc30.x86_64

How reproducible:
always

Steps to Reproduce:
1. configure forwarder to reply without qname, reply size 12
2. set dnsmasq --server=[forwarder-ip]
3. dig @[dnsmasq-ip] some.example.com

Actual results:
; <<>> DiG 9.16.2-RedHat-9.16.2-1.fc30 <<>> -p 5354 @127.0.0.1 +norec nx.example.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached


Expected results:
status: SERVFAIL or exact response from the server


Additional info:

--- Additional comment from Petr Menšík on 2020-04-22 12:56:44 CEST ---

On localhost, unbound is supposed to run. When it replies without qname in response, this dig in this script timeouts. It should receive at least SERVFAIL.

Alternative would be ldns-utils package.

cat > testns << TESTNS
$TTL 600

ENTRY_BEGIN
MATCH #nx.test
REPLY SERVFAIL QR
ADJUST copy_id
ENTRY_END
TESTNS

ldns-testns testns

Then run this script

--- Additional comment from Petr Menšík on 2020-04-22 13:09:19 CEST ---

Unbound 1.6.6 from RHEL/CentOS 7 would return REFUSED when dig +norec is directed at default configuration. That reply is without qname. Qname was fixed in unbound 1.7.0, later versions answers are properly forwarded.

--- Additional comment from Petr Menšík on 2020-04-22 13:38:24 CEST ---

Updated reproducer, starting also ldns-testns on test. It provides complete check if dnsmasq is able to handle replies without qname.

--- Additional comment from Petr Menšík on 2020-04-22 13:40:40 CEST ---

Reply without qname looks like this in DiG:

$ dig -p 8054 test

; <<>> DiG 9.16.2-RedHat-9.16.2-1.fc30 <<>> -p 8054 test
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 29465
;; flags: qr; QUERY: 0, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; Query time: 0 msec
;; SERVER: 127.0.0.1#8054(127.0.0.1)
;; WHEN: St dub 22 13:39:36 CEST 2020
;; MSG SIZE  rcvd: 12

--- Additional comment from Petr Menšík on 2020-04-22 13:42:45 CEST ---

Comment 2 Petr Menšík 2020-09-23 10:40:21 UTC
Because any known software on RHEL8 produces such replies, I think it is not important to fix it now. When proper solution fix is found with upstream, this can be reopened. Closing until Patch is present on Fedora.


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