Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#60366 - [dnsmasq] configuration-dependent segfault

Attached to Project: Arch Linux
Opened by Daniel Hogan (dhogan) - Wednesday, 10 October 2018, 01:58 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 18 October 2018, 14:29 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Christian Hesse (eworm)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


I use dnsmasq as a DNS-based ad blocker, using StevenBlack's list of ad-serving domains. His list is available at and is then processed into a dnsmasq compatible format. One of these hosts causes dnsmasq to segfault when added to the configuration file. The configuration file passes dnsmasq's internal configuration check ('dnsmasq --test'). The configuration did not cause previous versions to segfault, and the regression was introduced between versions 2.79-1 and 2.79-3.

Additional info:
dnsmasq 2.79-3

Steps to reproduce:
Add the line 'address=/' to /etc/dnsmasq.conf
Start dnsmasq.service
Dnsmasq segfaults
This task depends upon

Comment by Tasnad K (tasnad) - Tuesday, 23 October 2018, 15:28 GMT
I can confirm this. Same situation, same domain, newer
dnsmasq version 2.80.
I guess it would be better to report this upstream, but I'm not sure which bugtracker to use. The repo has no tracking and the github mirror seems unmaintained...
Comment by Jelle van der Waa (jelly) - Tuesday, 08 January 2019, 19:41 GMT
This does not segfault anymore since we now run dnsmasq --test before ExecStartPre.

And when running it manually I can also not reproduce it.

[jelle@helium][~]%sudo dnsmasq -C /etc/dnsmasq.conf

dnsmasq: bad option at line 680 of /etc/dnsmasq.conf
Comment by Tasnad K (tasnad) - Tuesday, 08 January 2019, 20:18 GMT
Still broken for me, but not a segfault, just dnsmasq failing to start (which has the same effect for me).

echo 'address=/' | dnsmasq -C -
work for you?
The end of you comment sounds like you also have the bug (although with slightly other wording of the error message).
I get "dnsmasq: error at line 1 of stdin".
The same happens with 'dnsmaq --test'.

I'm still on version 2.80 and there is no newer version updtream, as far as I can tell.

Comment by Jelle van der Waa (jelly) - Tuesday, 08 January 2019, 20:23 GMT
I have the same error as your example.
Comment by Tasnad K (tasnad) - Tuesday, 08 January 2019, 20:26 GMT
So I consider this a bug then, since the URLs are valid.
My guess is that it's related to arg parsing, since it appears when double dashes are in the URLs.
Any suggestions where to report it?
Comment by Jelle van der Waa (jelly) - Tuesday, 08 January 2019, 20:30 GMT
I presume you will have to escape the -, the following works:

echo 'address=/hm\-\' | dnsmasq -C -
Comment by Tasnad K (tasnad) - Tuesday, 08 January 2019, 20:59 GMT
I tried that. Although it prevents dnsmasq from failing, it renders the whole line ineffective.
Comment by Jelle van der Waa (jelly) - Thursday, 10 January 2019, 21:15 GMT
Please contact the dnsmasq mailinsg list about this issue since there is no bug tracker.