<div dir="ltr"><div><span style="font-size:12.8000001907349px">Simon and friends,</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I’ve found that dnsmasq (I’m using 2.73) with --stop-dns-rebind enabled discards an entire DNS response even when only one of the addresses that it contains would constitute a possible rebind attack. I would have expected it to only discard the invalid address.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I searched this mailing list and found that Leonid Isaev asked this question last year[1], but there were no responses.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I’m currently seeing this problem when attempting to resolve a name whose server almost definitely shouldn’t be responding with a private-use address. Rather than accepting the valid public address, dnsmasq discards both.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Here’s my query:</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">$ dig +nocmd +noquestion +nostats <a href="http://www.titantv.com">www.titantv.com</a>. @<a href="http://8.8.8.8">8.8.8.8</a></span></div><div><span style="font-size:12.8000001907349px">;; Got answer:</span></div><div><span style="font-size:12.8000001907349px">;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50293</span></div><div><span style="font-size:12.8000001907349px">;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">;; ANSWER SECTION:</span></div><div><span style="font-size:12.8000001907349px"><a href="http://www.titantv.com">www.titantv.com</a>.<span class="" style="white-space:pre">    </span>21151<span class="" style="white-space:pre">     </span>IN<span class="" style="white-space:pre">        </span>A<span class="" style="white-space:pre"> </span>66.43.219.201</span></div><div><span style="font-size:12.8000001907349px"><a href="http://www.titantv.com">www.titantv.com</a>.<span class="" style="white-space:pre">   </span>451<span class="" style="white-space:pre">       </span>IN<span class="" style="white-space:pre">        </span>A<span class="" style="white-space:pre"> </span>192.168.10.173</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">But when I run the same query against dnsmasq, I get an empty answer:</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">$ dig +nocmd +noquestion +nostats <a href="http://www.titantv.com">www.titantv.com</a>. </span></div><div><span style="font-size:12.8000001907349px">;; Got answer:</span></div><div><span style="font-size:12.8000001907349px">;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39921</span></div><div><span style="font-size:12.8000001907349px">;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">and dnsmasq logs:</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Sun Aug 23 17:15:17 2015 daemon.warn dnsmasq[1524]: possible DNS-rebind attack detected: <a href="http://www.titantv.com">www.titantv.com</a></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I expected dnsmasq to discard 192.168.10.173 but still respond with 66.43.219.201. Is its behavior intentional?</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">[1] <a href="http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2014q3/008754.html">http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2014q3/008754.html</a></span></div></div>