mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[GH-ISSUE #1283] CNAME loops throws off the server #644
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#644
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SivaKesava1 on GitHub (Nov 11, 2020).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1283
Hi again,
If the zone file has a CNAME loop, the server does not respond to the later queries if a query related to the loop is asked.
Please, feel free to put this one also under the compliance tag or even ignore it, considering the zone file is not proper.
Consider the following example zone file: (I just picked a loop of length 2, but it could be longer)
The server responds to the queries normally if the query is not either of b.c.example.com. or l.c.example.com.. The debug log looks normal like
When the query b.c.example.com. is asked for the first time, the logs are as follows:
It looks like the same message is processed thrice. After that, the server hangs up (sometimes after responding to one or two more other queries). The debug logs do not show any error message, but a
digquery returnsconnection timed out; no servers could be reached.System:
@bluejekyll commented on GitHub (Nov 12, 2020):
Hmm. This sounds like we’re not detecting loops in the zone. Ideally we’d reject the zone on startup. The server should definitely not crash though. My guess is we’re losing threads to stack overflows or similar.
@Mossop commented on GitHub (Mar 8, 2022):
I just tripped over this. After a bit of debugging it looks like the server ends up infinite looping in InnerInMemory::additional_search. I wonder if the loop should bail out when a found additional has already been encountered here:
cs.github.com/bluejekyll/trust-dns@8515a4321f/crates/server/src/store/in_memory/authority.rs (L496)@djc commented on GitHub (Mar 8, 2022):
@Mossop that sounds like a sensible strategy. Would you be able to submit a PR?
(Out of curiosity, are you using trust-dns for a Mozilla project or for something else/personal?)
@Mossop commented on GitHub (Mar 8, 2022):
Something personal: https://github.com/Mossop/localns/ (quite experimental right now!)