[Dnsmasq-discuss] Config Parcing Bug

Tasnad Kernetzky tasnadk at gmail.com
Sat Jan 12 10:27:19 GMT 2019


On 12.01.19 10:55, Simon Kelley wrote:
> Are you compiling dnsmasq with support for IDN?
>
> dnsmasq -v will tell you.
>
> Simon.
>
>
> On 12/01/2019 00:22, Tasnad Kernetzky wrote:
>> Hi all,
>>
>> I wanted to report a bug (at least we belieave it is one). We had a
>> short discussion over at the archlinux bugtracker
>> (https://bugs.archlinux.org/task/60366).
>>
>> In short:
>>
>>> echo 'address=/ab--c.example.com/#' | dnsmasq --test -C -
>>> dnsmasq: error at line 1 of stdin
>> Althoug the URL is "forbidden":
>>
>>> host 'ab--c.example.com'        
>>> host: 'ab--c.example.com' is not a legal IDNA2008 name (string
>> contains forbidden two hyphens pattern), use +noidnin
>>
>> it would be nice to be able to block it. We ended up there, since the
>> filter list from
>> https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts started
>> to include these kinds of URLs.
>>
>>
>> My feeling is, that parsing the two dashes somehow fails. Interestingly,
>> adding one more character before the dashes does not trigger the bug:
>>
>>> echo 'address=/abb--c.example.com/#' | dnsmasq --test -C -
>>> dnsmasq: syntax check OK.
>>
>> Escaping (ab\-\-c.example.com) allows dnsmasq to start, but renders the
>> line ineffective.
>>
>>
>> Do you know about this and is it intended behaviour?
>>
>>
>> Regards,
>>
>> Tasnad
>>
>>
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


I think yes, I'm using the default from arch linux:

Dnsmasq version 2.80  Copyright (c) 2000-2018 Simon Kelley
Compile time options: IPv6 GNU-getopt DBus i18n IDN2 DHCP DHCPv6 no-Lua
TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20190112/f33fd5d9/attachment-0001.sig>


More information about the Dnsmasq-discuss mailing list