]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
lib/cache: don't stash packets with zeros in QNAME
authorVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 25 Jun 2019 13:55:20 +0000 (15:55 +0200)
committerPetr Špaček <petr.spacek@nic.cz>
Wed, 10 Jul 2019 12:18:34 +0000 (14:18 +0200)
commita6ecb58f5d2c2c722de09da1fb9b3174b90db64e
tree1cfd35e72992525dc0ff9095cbfd0e3a50310777
parent6576904c8a9408bdd4e19d9ef7bd1cb42cf4f1b7
lib/cache: don't stash packets with zeros in QNAME

Cache uses dname_lf for keys, i.e. zero bytes serve as separators
between labels.  Therefore having a zero inside label could masquerade
for QNAME that does have label separators instead of these zeros.
That doesn't seem really exploitable in practice, as standard registries
won't allow such labels, so I can't see any possible attack that would
"cross border" of these registries, e.g. attacking anything inside
example.org without any cooperation from its owner (or org or root).
lib/cache/api.c
lib/cache/impl.h