[dnsdist] What is so magical on \044
Marco Davids (SIDN)
marco.davids at sidn.nl
Mon Dec 19 14:13:44 UTC 2022
Hi there,
I spent too much time on this, but at least I was able to crunch it down
to something easily reproducible.
Here's the situation:
function bugornot(dq)
dq.dh:setAA(true)
return DNSAction.SpoofRaw,
"\0441234567890abcdefghijklmnopqrstuvwxyzABCDEFGH"
end
addAction(AndRule({QNameRule('bugornot.singlens.forfun.net.'),
QClassRule(DNSClass.IN), QTypeRule(DNSQType.TXT)}), LuaAction(bugornot))
The length of the string in the TXT record is 44 bytes. The result is a
malformed packet (the length-byte is not included).
When it is 43 bytes, or 45 bytes, this setup works. But when it is 44
buts (',' in ASCII, perhaps that matters?), it fails.
A demonstrator can be found here (at least at the time of writing):
dig -p 530 TXT bugornot.singlens.forfun.net @li1.forfun.net
It runs on DNSdist 1.7.2.
Is this a bug perhaps?
--
Marco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.powerdns.com/pipermail/dnsdist/attachments/20221219/6dc14736/attachment.sig>
More information about the dnsdist
mailing list