I couldn't agree more. I'm currently TAing a Bachelor Security course where I had to design some challenges for students to break into systems and one of them is DNS cache poisoning. I've spent the last few weeks digging into Bind's code, DNS implementation and old vulnerable versions and it's amazing how much stuff had gone ignored in the past and how many subtle vulnerabilities can hide for years in very complex software and protocols.
Kaminsky's DNS cache poisoning attack is fun.
I trust djbdns more than perhaps any other piece of C code I run, and recommend it.
This failure undoes much of the benefits of source port randomization. A patch is available from a third party, but it is not part of the standard source tree.
http://www.your.org/dnscache/
There are also attack scripts for djbdns.BIND, Unbound and other recursives have both SPR and duplicate query control. This fact explains things like this:
http://dnsreactions.tumblr.com/search/djbdns
From a poisoning point of view, BIND and Unbound are more secure
than djbdns. To be fair djbdns is no longer maintained, so this poisoning
fix has not been integrated).Security is relative. From a software coding point of view, djbdns is smaller, has fewer features (e.g., ipv6 and dnssec lacking). I.e., there might be coding errors in large code bases.
But for me, an unmaintained code base with known, unpatched attacks is not a good choice.
BIND may have had a (really) bad run in the BIND 8 days, but BIND 9 was surely an improvement.
And if you really want to stay away from BIND, you can go for something like PowerDNS. Or a combination like PowerDNS+Unbound.
This is, for what it's worth, the original objection to qmail as well --- "it's not even maintained". It's not maintained because for the core job it does, it's _correct_. There's not a lot of mail software (at least, not software written in C) that can make a competing claim.
Has that addressed the patchiness blechery?
But bind is a fairly big and complex code base. Which is probably also tied to why people use it - it's got the features people need (and a _huge_ community and install base.)
BIND is one of those programs that scares the living crap out of me, both from a security perspective and from a complexity perspective. (Gee, could those be related?)
Just take a look at the list of BIND vulnerabilities. We're still finding em, and I'm sure we'll continue to for years to come.
http://www.cvedetails.com/vulnerability-list/vendor_id-64/pr...
For a refreshingly simple and secure DNS serving experience, I highly recommend djbdns / tinydns / dnscache:
http://cr.yp.to/djbdns/blurb/security.html