PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.7k stars 908 forks source link

"STL Exception: All data was not consumed" with incorrect HINFO RR in zone #7203

Open aldem opened 5 years ago

aldem commented 5 years ago

Short description

I had a zone file with an incorrect HINFO record:

hi IN HINFO "cpu" "os" "whatever"

The zone is loaded without any issues with pdnsutil load-zone, but attempt to retrieve zone content using API (/api/v1/servers/localhost/zones/t.z), or attempt to AXFR, or simple query for this RR produces errors:

HTTP ISE for "/api/v1/servers/localhost/zones/example.z": STL Exception: All data was not consumed

TCP Connection Thread died because of STL error: All data was not consumed

Exception building answer packet for hi.t.z/HINFO (All data was not consumed) sending out servfail

Environment

Steps to reproduce

  1. Create invalid HINFO RR: hi IN HINFO "a" "b" "c"
  2. Try to use API or AXFR to get zone content, or dig HINFO hi.zone

Expected behaviour

a) it would be logical to expect that such RR will not pass validation when loading zone using pdnsutil b) if, nevertheless, the incorrect data is provided by backend, it will be handled properly (log the problem and ignore extra content)

Actual behaviour

a) pdns silently dies on query of AXFR b) API call produces "Internal server error" without any details

aldem commented 5 years ago

Seems that this problem also applies to other RRs, for instance, MX with extra data also produces this error: mx IN MX 10 . bla