<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1503328034768_2769" dir="ltr">i found something similar:</div><div id="yui_3_16_0_ym19_1_1503328034768_2769" dir="ltr"><span id="yui_3_16_0_ym19_1_1503328034768_2803"><a href="http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2017q3/011691.html" id="yui_3_16_0_ym19_1_1503328034768_2802" class="">http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2017q3/011691.html</a></span></div><div id="yui_3_16_0_ym19_1_1503328034768_2769" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1503328034768_2769" dir="ltr">what happens, if u compile dnsmasq with -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ?</div><div id="yui_3_16_0_ym19_1_1503328034768_2914"><br></div><div id="yui_3_16_0_ym19_1_1503328034768_2969">-Arne</div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> Christian Kujau <lists@nerdbynature.de> schrieb am 10:34 Montag, 21.August 2017:<br></font></div>  <br><br> <div class="y_msg_container"><div dir="ltr">Hi,<br></div><div dir="ltr"><br></div><div dir="ltr">while playing around with the "dnseval" tool from the dnsdiag package[0], <br></div><div dir="ltr">I accidently crashed my dnsmasq instance that was running on my router. <br></div><div dir="ltr">This router is running Dnsmasq version 2.77 on a current LEDE operating <br></div><div dir="ltr">system, where similar have been reported in the past:<br></div><div dir="ltr"><br></div><div dir="ltr"> > sending SIGSEGV to dnsmasq for invalid read access from 00000000<br></div><div dir="ltr"> > <a href="https://bugs.lede-project.org/index.php?do=details&task_id=251" target="_blank">https://bugs.lede-project.org/index.php?do=details&task_id=251</a><br></div><div dir="ltr"> <br></div><div dir="ltr"> > Intermittent SIGSEGV crash of dnsmasq-full<br></div><div dir="ltr"> > <a href="https://bugs.lede-project.org/index.php?do=details&task_id=766" target="_blank">https://bugs.lede-project.org/index.php?do=details&task_id=766</a><br></div><div dir="ltr"><br></div><div dir="ltr">However, both bugs were closed because they either were related to some <br></div><div dir="ltr">busybox machinery errors or were pointing to the upstream project to look <br></div><div dir="ltr">at this.<br></div><div dir="ltr"><br></div><div dir="ltr">In the dnsmasq-discuss archives I found a thread from last year[1] with<br></div><div dir="ltr">a crash message that looked very much like the message I receive when <br></div><div dir="ltr">dnsmasq crashes on the LEDE router:<br></div><div dir="ltr"><br></div><div dir="ltr">===================<br></div><div dir="ltr">kernel: [ 2860.890789] do_page_fault(): sending SIGSEGV to dnsmasq for invalid write access to 00552000<br></div><div dir="ltr">kernel: [ 2860.899402] epc = 77cd488c in libc.so[77c62000+92000]<br></div><div dir="ltr">kernel: [ 2860.904552] ra  = 00406c41 in dnsmasq[400000+21000]<br></div><div dir="ltr">===================<br></div><div dir="ltr"><br></div><div dir="ltr">So, I tried to reproduce this scenario on a Debian/amd64 VM and <br></div><div dir="ltr">compiled today's git checkout with -Og -g and used a fairly simple <br></div><div dir="ltr">configuration file to start dnsmasq:<br></div><div dir="ltr"><br></div><div dir="ltr">===================<br></div><div dir="ltr">$ cat ~/test/dnsmasq.conf.bug<br></div><div dir="ltr">listen-address=192.168.56.130<br></div><div dir="ltr">bind-interfaces<br></div><div dir="ltr">no-daemon<br></div><div dir="ltr">no-hosts<br></div><div dir="ltr">no-resolv<br></div><div dir="ltr">log-queries=extra<br></div><div dir="ltr">server=8.8.8.8<br></div><div dir="ltr"><br></div><div dir="ltr">$ sudo -H src/dnsmasq -C ~/test/dnsmasq.conf.bug<br></div><div dir="ltr">dnsmasq: started, version 2.78test2-6-g69a815a cachesize 150<br></div><div dir="ltr">dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify<br></div><div dir="ltr">dnsmasq: using nameserver 8.8.8.8#53<br></div><div dir="ltr">dnsmasq: cleared cache<br></div><div dir="ltr"><br></div><div dir="ltr">dnsmasq: 1 192.168.56.1/59405 query[A] www.aol.com from 192.168.56.1<br></div><div dir="ltr">Segmentation fault<br></div><div dir="ltr">===================<br></div><div dir="ltr"><br></div><div dir="ltr">The segfault happened after I started "dnseval" against this newly spawned <br></div><div dir="ltr">dnsmasq instance. This "dnseval" thingy is described as:<br></div><div dir="ltr"><br></div><div dir="ltr">  > dnseval: -  bulk ping utility that sends an arbitrary DNS query to<br></div><div dir="ltr">  > a list of DNS servers<br></div><div dir="ltr"><br></div><div dir="ltr">Per default, "bulk" means it sends 10 requests to the DNS server, but <br></div><div dir="ltr">dnsmasq segfaults pretty quickly:<br></div><div dir="ltr"><br></div><div dir="ltr">  GDB output (still carries optimized out values, hm...)<br></div><div dir="ltr">  <a href="https://paste.fedoraproject.org/paste/awbvnGEvj57ru1TtAuA3ag" target="_blank">https://paste.fedoraproject.org/paste/awbvnGEvj57ru1TtAuA3ag</a><br></div><div dir="ltr"><br></div><div dir="ltr">  tcpdump for this run:<br></div><div dir="ltr">  <a href="https://paste.fedoraproject.org/paste/X-9Qa67oKT-jlmpKb4IU7A" target="_blank">https://paste.fedoraproject.org/paste/X-9Qa67oKT-jlmpKb4IU7A</a><br></div><div dir="ltr"><br></div><div dir="ltr">Ideas welcome :-)<br></div><div dir="ltr"><br></div><div dir="ltr">Thanks,<br></div><div dir="ltr">Christian.<br></div><div dir="ltr"><br></div><div dir="ltr">[0] <a href="https://github.com/farrokhi/dnsdiag" target="_blank">https://github.com/farrokhi/dnsdiag</a><br></div><div dir="ltr">[1] <a href="http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2016q3/010830.html" target="_blank">http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2016q3/010830.html</a><br></div><div dir="ltr">-- <br></div><div dir="ltr">BOFH excuse #37:<br></div><div dir="ltr"><br></div><div dir="ltr">heavy gravity fluctuation, move computer to floor rapidly<br></div><div dir="ltr"><br></div><div dir="ltr">_______________________________________________<br></div><div dir="ltr">Dnsmasq-discuss mailing list<br></div><div dir="ltr"><a ymailto="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br></div><div dir="ltr"><a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br></div><br><br></div>  </div> </div>  </div></div></body></html>