Jan Včelák wrote:
there has been a request in our issue tracker [1], to
enable
IPV6_USE_MIN_MTU socket option [2] for IPv6 UDP sockets in Knot DNS.
This option makes the operating system to send the responses with a
maximal fragment size of 1280 bytes (minimal MTU size required by IPv6
specification).
I agree with Daisuke Higashi's comment on the issue tracker. There may
be other applications running on the same server as Knot (e.g., a web
server), so a global OS level configuration setting is probably not
granular enough.
The reasoning is based on the draft by Mark Andrews
from 2012 [3]. I
wonder if the reasoning is still valid in 2016. And I'm afraid that
enabling this option could enlarge the window for possible DNS cache
poisoning attacks.
Are you referring to a “Fragmentation Considered Poisonous” style
attack? One of the countermeasures described in that paper is:
Yet another possible defense for name servers, is to always add a
random RR to any packet over certain size (i.e., which may be
fragmented). A simple type A resource record, containing random IP
address for some fictitious domain name, would suffice. The TTL of
such an RR should be set to zero to prevent the resolver from
caching that record. This would prevent the attacker from being able
to predict and (correctly) adjust the checksum value. If there are
multiple vulnerable fragments, such a random RR should appear in
each fragment.
That is a little too fast and loose to be deployable in the real world,
but it seems like EDNS cookies would serve the same purpose, at least in
the two fragment case (and if the OPT RR is pushed to the end of the
additional section to guarantee that it appears in the second fragment)?
We would appreciate any feedback on your operational
experience with DNS
on IPv6 related to packet fragmentation.
There was a long thread a while back on the dns-operations mailing list
that may be of interest, starting here:
https://lists.dns-oarc.net/pipermail/dns-operations/2009-June/004021.html
--
Robert Edmonds
edmonds(a)debian.org