[erlang-bugs] Potential endless loop in DNS resolver

Raimo Niskanen raimo+erlang-bugs@REDACTED
Wed Jan 16 09:47:01 CET 2008


Thank you for your bug report.

We will have a look at it, and you seem to have
thought this one through. It is probably a
real problem. The DNS resolver is a bit low
priority for us - it is mostly used by customers
with control over their DNS configuration, so
for them it is a ignorable real problem.

Then we will see what to do about it...



On Fri, Jan 11, 2008 at 10:43:41PM +0100, Florian Weimer wrote:
> It seems to me that the following code from lib/kernel/src/inet_dns.erl
> contains an endless loop:
> 
> dn_exp([N1,N2 | T], Buffer, Name) when N1 band ?INDIR_MASK =:= ?INDIR_MASK ->
>     Offset = ((N1 band 16#3f) bsl 8) bor N2,
>     case catch nthtail(Offset, Buffer) of
> 	{'EXIT', _} -> error;
> 	NDn -> 
> 	    %% We have to keep the Tail of original Dn in order to
> 	    %% prohibit ending up with the tail from an offset.
> 	    case dn_exp(NDn, Buffer, Name) of
> 		{ExpName, _} -> {ExpName, T};
> 		Res          -> Res
> 	    end
>     end;
> 
> A compression reference which points to itself results in dn_exp being
> called with the same argument over and over again.
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-bugs

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-bugs mailing list