Unable to parse DNS TXT #845

pavel-odintsov opened this Issue Jun 4, 2013 · 4 comments


None yet

3 participants



We use powerdnd from offical powerdns.com repo.

pdns_server --version
Version: 3.2, compiled on Jan 17 2013, 09:33:38 with gcc version 4.4.5

We use pdns bind backend.

We have problems with this zone:
$TTL 3600
ovkuse.ru. IN SOA ns3.fastvps.ru. support.fastvps.ru. (2011090328 10800 3600 604800 86400)
ovkuse.ru. IN NS ns3.fastvps.ru.
ovkuse.ru. IN NS ns4.fastvps.ru.
ovkuse.ru. IN MX 10 mail
ovkuse.ru. IN A
www IN A
mail IN A
_.ovkuse.ru. IN A
kupon IN A
shop IN A
market IN A
bac IN A
showroom.ovkuse.ru. IN CNAME shop.adlabs-retail.ru.
mail._domainkey IN TXT "k=rsa; p=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALNCqOb2+ZRPbSybIZvQLjL0g18ENuhYsYJg1aZ+ujJIQGbDJul+z+hvx+K5w6bjwoPWZPOOf+ENj8gyl+pjwAMCAwEAAQ=="
_domainkey IN TXT "t=y; o=~;"
ask IN A
board.ovkuse.ru. IN CNAME sellobuy.ru.
ovkuse.com._report._dmarc.ovkuse.ru. IN TXT "v=DMARC1"
mail.domainkey.ovkuse.com. IN TXT "v=DKIM1; g=; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCz+h+Ne14ncAtIGag7QDxBzg3zRu1DvxLUBN5FQ3mIc7UlbI0YzCEWHUTzq63Vfne6yCaST+eyUNirVt3+lGkyOrdzS6FB0b8JnCdVBAA8lxIanJd4GBG2zfwJPJByuVEaAeUcMg0WzRO4isc7ILORVMtmN2x4p5tb96lrHTtTUwIDAQAB"

If we request it from host tool we got following answer:
host -t txt mail._domainkey.ovkuse.ru ns2.fastvps.ru
Using domain server:
Name: ns2.fastvps.ru

mail._domainkey.ovkuse.ru.spb.fastvps.ru has no TXT record

IN log we found following records while this request executed:
Jun 4 18:23:37 ns2 pdns[32256]: Exception: Unable to parse DNS TXT '"k=rsa; p=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALNCqOb2+ZRPbSybIZvQLjL0g18ENuhYsYJg1aZ+ujJIQGbDJul+z+hvx+K5w6bjwoPWZPOOf+ENj8gyl+pjwAMCAwEAAQ=="'
Jun 4 18:23:37 ns2 pdns[32256]: Exception building answer packet (Unable to parse DNS TXT '"k=rsa; p=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALNCqOb2+ZRPbSybIZvQLjL0g18ENuhYsYJg1aZ+ujJIQGbDJul+z+hvx+K5w6bjwoPWZPOOf+ENj8gyl+pjwAMCAwEAAQ=="') sending out servfail

In Bind with same zone all works fine:
host -t txt mail._domainkey.ovkuse.ru ns3.fastvps.ru
Using domain server:
Name: ns3.fastvps.ru

mail._domainkey.ovkuse.ru descriptive text "k=rsa; p=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALNCqOb2+ZRPbSybIZvQLjL0g18ENuhYsYJg1aZ+ujJIQGbDJul+z+hvx+K5w6bjwoPWZPOOf+ENj8gyl+pjwAMCAwEAAQ=="

zeha commented Jun 5, 2013

It appears this is fixed in master, likely in 3.3-rc1 as well. Could you try with 3.3-rc1?


Thank you! All works find in 3.3-rc1.

But I found another issue, as u can see this zone consist of two TXT records for mail._domainkey.ovkuse.ru.

Bind behaviour is show only one record:
mail._domainkey.ovkuse.ru descriptive text "k=rsa; p=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALNCqOb2+ZRPbSybIZvQLjL0g18ENuhYsYJg1aZ+ujJIQGbDJul+z+hvx+K5w6bjwoPWZPOOf+ENj8gyl+pjwAMCAwEAAQ=="

PowerDNS bahaviour is show both records:
mail._domainkey.ovkuse.ru descriptive text "v=DKIM1; g=*; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCz+h+Ne14ncAtIGag7QDxBzg3zRu1DvxLUBN5FQ3mIc7UlbI0YzCEWHUTzq63Vfne6yCaST+eyUNirVt3+lGkyOrdzS6FB0b8JnCdVBAA8lxIanJd4GBG2zfwJPJByuVEaAeUcMg0WzRO4isc7ILORVMtmN2x4p5tb96lrHTtTUwIDAQAB"
mail._domainkey.ovkuse.ru descriptive text "k=rsa; p=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALNCqOb2+ZRPbSybIZvQLjL0g18ENuhYsYJg1aZ+ujJIQGbDJul+z+hvx+K5w6bjwoPWZPOOf+ENj8gyl+pjwAMCAwEAAQ=="

Could you check it? Is it ok return two records fot TXT or this is a bug also?

Habbie commented Jun 10, 2013

This is a bug.

Habbie commented Jun 10, 2013

issue is in

  else if(bdr.qname.length() > bb2.d_name.length())
    bdr.qname.resize(bdr.qname.length() - (bb2.d_name.length() + 1));

in bindbackend2.cc - taking this branch means not taking the branch that aborts this line for being out-of-zone.

@Habbie Habbie closed this in 99f95bd Jun 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment