TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Systemd-resolved DNS cache poisoning

93 pointsby comiceover 10 years ago

9 comments

josteinkover 10 years ago
Am I the only one who is getting fed up with everything under the sun having their own DNS resolver and DNS cache? It&#x27;s border-lining madness right now.<p>Before you had a situation like this. ISP: Server and cache. Router: Client, server and cache. OS: Client and cache.<p>So if you ever encounter DNS failing, you only had 3 possible places to look for errors, or maybe not even errors, just stale data that may or may not correct itself over time. Flush the caches you can and hope for the best. Rinse and repeat.<p>But then came the browsers and decided that 3 levels of caching was good enough. Let&#x27;s add more which can fail in the name of performance!<p>Combine this with mobile, mobility and data-roaming and now you not only have a DNS-cache (based on already tripple-cached data) which often is guaranteed to be wrong, your browser may actually have cached the wrong DNS-servers, so when you roam from Wifi to cell-data your precious LAN DNS servers are no longer available and your browser just looks stupid.<p>And now systemd adds to this. What the flying <i>fuck</i>?<p>All this nonsense because someone somewhere decided that a nice, shared, global OS level client and cache wasn&#x27;t good enough. Handling this complexity once would just be <i>too easy</i>.<p>Can someone tell me why? Why wasn&#x27;t it good enough? What was it that prompted someone to go reimplement all this wrongly, yet again?<p>Yes this is a rant, but if there are underlying technical reasons for this nonsense, I&#x27;m very, very interested to hear about it.
评论 #8595676 未加载
评论 #8595627 未加载
评论 #8595687 未加载
评论 #8595660 未加载
评论 #8595616 未加载
评论 #8596095 未加载
评论 #8595618 未加载
评论 #8597715 未加载
amlutoover 10 years ago
I find the design of systemd-resolved to be very strange. It uses dbus to talk to glibc, and it seems to be a new, from-scratch implementation of a DNS resolver. To be clear, I don&#x27;t really think it matters whether systemd-resolved is under the systemd umbrella, but I do think that the design has a lot of unnecessary NIH syndrome.<p>It turns out that there&#x27;s a very well-specified protocol by which clients can ask a local cache on their system to answer DNS queries. That protocol is called DNS :) I don&#x27;t see why routing something DNS-like over dbus makes any sense in contrast to doing it using DNS itself on port 53.<p>Fedora is experimenting with running unbound as a local caching resolver [1]. This gives caching, DNSSEC validation, and all the benefits from the fact that unbound is probably much better hardened than the average libc or application-side DNS client implementation.<p>[1] <a href="http://fedoraproject.org/wiki/Features/DNSSEC_on_workstations" rel="nofollow">http:&#x2F;&#x2F;fedoraproject.org&#x2F;wiki&#x2F;Features&#x2F;DNSSEC_on_workstation...</a>
评论 #8598858 未加载
agwaover 10 years ago
This is a perfect example of why the systemd approach of putting a bunch of disparate components under a single tightly-coupled umbrella is bad engineering. Generally, projects focused on doing one thing are able to do it well, while projects that attempt to do many things have a hard time doing any of them well. Unfortunately, as the steady stream of cache poisoning vulnerabilities in other DNS servers have demonstrated, implementing DNS securely is <i>really hard</i>. A less-than-perfect attempt at implementing a caching DNS resolver <i>will</i> be insecure. For this reason, it&#x27;s a task best left to a mature project run by people with DNS-specific experience who can focus on doing that one thing well.
评论 #8595811 未加载
评论 #8595919 未加载
评论 #8595838 未加载
jacquesmover 10 years ago
Pretty weird for Systemd to have its own cache and resolver. If you need a local resolver and a cache simply run a local DNS server rather than to re-invent the wheel (in a broken way at that). I&#x27;m sure they have their reasons but this is not the unix way.
评论 #8595643 未加载
评论 #8595636 未加载
userbinatorover 10 years ago
Interesting background discussion here for those wondering why systemd has its own DNS resolver: <a href="https://news.ycombinator.com/item?id=8203080" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8203080</a>
评论 #8595731 未加载
评论 #8598836 未加载
vezzy-fnordover 10 years ago
The submitter doesn&#x27;t state affected versions, but judging from systemd&#x27;s NEWS file, the resolved component was first introduced in 213 and later dubbed as &quot;a pretty complete caching DNS and LLMNR stub resolver&quot; in 216: <a href="http://lwn.net/Articles/609740/" rel="nofollow">http:&#x2F;&#x2F;lwn.net&#x2F;Articles&#x2F;609740&#x2F;</a><p>Considering most users run on a backported 208-stable IIRC (I know RHEL 7 settled on that), I&#x27;m not sure how widespread this is. Still concerning that they felt to roll their own and not follow RFC guidelines, though.<p>Considering how plagued with vulnerabilities BIND was, I&#x27;d assume DNS is a hard thing to do.
评论 #8596242 未加载
talideonover 10 years ago
Of all the components of systemd that doesn&#x27;t need to exist, resolved is definitely one of them. Why they&#x27;re reinventing the wheel rather than allowing the user to set up something that works and is battle-tested, such as unbound, is beyond me.
评论 #8596099 未加载
SixSigmaover 10 years ago
Caches are bugs waiting to happen. Rob Pike ‏@rob_pike 21 Mar 2014<p>By the same author<p>&quot;There&#x27;s no such thing as a simple cache bug.&quot;<p>&quot;Caches aren&#x27;t architecture, they&#x27;re just optimization.&quot;
评论 #8596330 未加载
4ydxover 10 years ago
Systemd... a very large mass of c code being written in a short amount of time with huge functionality creep. Yeah, this is going to end&#x2F;begin really well. I swear all of the people commenting about it being a good thing are not seasoned developers.