[Pdns-users] Crappy DNS query make Mysql/Pdns crash

Antoine Levavasseur pdns at vava.org
Tue Mar 30 08:06:20 UTC 2004


> After investigating, I have noticed that query with
> '%20' caracters leads to a LIKE query to MySQL thats really kicks it out
> and leads to pdns restarting when breaking 10000 q in query-queue.
> 
> By the way, in my log '%20toto.mydomain.com' query is just
> "discarded as malformed qdomain '%20toto.mydomain.com' dropping"
> 
> But a 'www.%20toto.mydomain.com' query leads to a 
> select content,ttl,prio,type,domain_id,name from records where type='NS'
> and name like '%20toto.mydomain.com' and domain_id='1'
> and lock the MySQL server for some time which can be fatal for my
> pdns instance.

RFC 1034 
3.4. Example name space 

<domain> ::= <subdomain> | " "
<subdomain> ::= <label> | <subdomain> "." <label>
<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]
<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
<let-dig-hyp> ::= <let-dig> | "-"
<let-dig> ::= <letter> | <digit>
<letter> ::= any one of the 52 alphabetic characters A through Z in
upper case and a through z in lower case
<digit> ::= any one of the ten digits 0 through 9

Stated clearly that '%' caracter is invalid in a DNS query
so every requests must be discarded as malformed qdomain as the ones
begining with '%'
as they leads to MySQL error this not a good situation.

-- 
Antoine.



More information about the Pdns-users mailing list