Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*.co domains do not resolve, dig times out. #93

Closed
rithvikvibhu opened this issue May 13, 2022 · 9 comments · Fixed by #110
Closed

*.co domains do not resolve, dig times out. #93

rithvikvibhu opened this issue May 13, 2022 · 9 comments · Fixed by #110

Comments

@rithvikvibhu
Copy link
Member

rithvikvibhu commented May 13, 2022

List of TLDs that don't resolve as of now (not complete):


Domains under the co TLD do not resolve. Ex: t.co, go.co

Built from master branch, updated tld.h generated with hs-names. Still no luck.

This is what happens in hnsd:

  1. Request comes in:
rs: query
rs:   id=600
rs:   labels=2
rs:   name=go.co.
rs:   type=1
rs:   class=1
rs:   edns=1
rs:   dnssec=0
rs:   tld=co
rs:   addr=127.0.0.1:58007
  1. No response, dig times out
  2. After 30-60 secs, receive answer in hnsd:
rs: received answer for: go.co.
rs:   rcode: 0
rs:   havedata: 1
rs:   nxdomain: 0
rs:   secure: 0
rs:   bogus: 1
rs:   why_bogus: validation failure <go.co. A IN>: key for validation co. is marked as invalid because of a previous validation failure <t.co. A IN>: No DNSKEY record for key co. while building chain of trust
  1. Next query with dig to the same domain works (gets IP, fast, mostly from cache)
@rithvikvibhu
Copy link
Member Author

Not just co, but .horse too.
Ex: https://www.xrays.horse/examinations/ (don't ask)

Will try to script and get a complete list of what's not working. If it's related to updating ICANN TLD data, then can add it as a test that runs regularly and we know when to refresh.

@mxroute
Copy link

mxroute commented Jul 31, 2022

Same with .us for me.

@v1xingyue
Copy link

Hi I got the same problem. the .cool does not work too. Hope it can be repaired soon.

@rithvikvibhu
Copy link
Member Author

Wrote a script to go through all ICANN TLDs and find SERVFAILs: https://gist.github.com/rithvikvibhu/90e4202a572b9633b1c6a05090dd6191

hnsd (well, fingertip) couldn't handle failing requests in series (no concurrent queries at all). Added a 5 second sleep after encountering a SERVFAIL to go slow. Then hnsd core dumped segmentation fault. (」°ロ°)」

So no list of TLDs, but got a reproducible segfault 🙃

@pinheadmz
Copy link
Member

Probably part of the hard coded root zone issue: #91

@buffrr
Copy link
Contributor

buffrr commented Aug 27, 2022

hnsd (well, fingertip) couldn't handle failing requests in series (no concurrent queries at all). Added a 5 second sleep after encountering a SERVFAIL to go slow. Then hnsd core dumped segmentation fault. (」°ロ°)」

That sucks since it's reproducible it might be worth creating an issue for that so we can track it. Slightly off-topic but I'm seriously considering a Go or a rust version. Maintaining hnsd is just too expensive. We could write several hnsds by the time it takes to develop a few features for the C version. We also have to deal with crashes, memory leaks and other C gotchas that easily introduce security vulnerabilities. Tor is moving away from C for the same reasons. From tor https://blog.torproject.org/announcing-arti/ :

"For us, these problems mean that programming in C is a slow and painstaking process. Everything we write takes more code than we'd like it to, and we need to double-check even the safest-looking code to make sure it doesn't fall prey to any of C's list of enormous gotchas. This slows us down seriously, and increases the cost of adding new features."

Also, see https://www.memorysafety.org/ for an initiative from ISRG/letsencrypt to move critical infrastructure to memory safe languages.

Probably part of the hard coded root zone issue: #91

Anyone tried updating the hardcoded zone file to check if it'll resolve this issue?

@rithvikvibhu
Copy link
Member Author

I'm all for a rewrite in rust! There's rsd for types/structs/etc. but is incomplete/outdated when I tried to use it.

Anyone tried updating the hardcoded zone file to check if it'll resolve this issue?

I had mentioned in the issue that I had tried with an updated tld.h and it hadn't solved the issue, but just tried it again and everything seems to work. No servfail and cool, work domains resolve properly (and other domains faster than before). Maybe hadn't copied over hnsd to fingertip last time, idk.

@buffrr
Copy link
Contributor

buffrr commented Aug 27, 2022

I'm all for a rewrite in rust! There's rsd for types/structs/etc. but is incomplete/outdated when I tried to use it.

LFG! I might start porting some stuff from that and creating a repo no promises though. Happy to see other devs laying the groundwork for that too.

No servfail and cool, work domains resolve properly (and other domains faster than before). Maybe hadn't copied over hnsd to fingertip last time, idk.

Interesting also keep in mind that Fingertip uses a PAC script for the proxy to skip all ICANN TLDs so they don't go through hnsd at all (for several reasons). So i'm assuming you're querying it directly.

@pinheadmz
Copy link
Member

pinheadmz commented Aug 27, 2022

Probably the fastest fix for this is passing a config file to the unbound recursive that forwards all icann TLDs to 1.1.1.1 or whatever. We can manually remove names like gay and ink that have claimed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants