Bug 31890 - DNS stub resolver ignores header-only error responses
Summary: DNS stub resolver ignores header-only error responses
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: network (show other bugs)
Version: 2.39
: P2 normal
Target Milestone: 2.41
Assignee: Florian Weimer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-13 08:48 UTC by Florian Weimer
Modified: 2024-09-06 14:34 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Weimer 2024-06-13 08:48:44 UTC
Current Unbound generates 12-byte header-only responses (with an empty question section) if configured like this:

server:
 interface: 0.0.0.0
 access-control: 0.0.0.0/0 refuse

We currently treat such responses as malformed, resulting in timeouts. This is tough situation because we only have the 16-bit DNS transaction ID to match such responses to the query.
Comment 1 Florian Weimer 2024-09-06 14:34:52 UTC
Fixed for 2.41 via:

commit 691a3b2e9bfaba842e46a5ccb7f5e6ea144c3ade
Author: Florian Weimer <fweimer@redhat.com>
Date:   Wed Jul 24 12:06:47 2024 +0200

    resolv: Allow short error responses to match any query (bug 31890)
    
    Reviewed-by: DJ Delorie <dj@redhat.com>