[Dnsmasq-discuss] Testers wanted: DNSSEC.

2014-02-06 Thread Henk Jan Agteresch
I compiled 2.69test6 on armv5tel (linksys 4200v2 running debian) using
dpkg-buildpackage.
dnsmasq crashes on the first received query with *** stack smashing
detected ***: /usr/sbin/dnsmasq terminated

Recompiled with CFLAGS=-g and started under gdb. Output follows

root@pms28:~/dev# gdb /usr/sbin/dnsmasq
GNU gdb (GDB) 7.6.2 (Debian 7.6.2-1)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show
copying
and show warranty for details.
This GDB was configured as arm-linux-gnueabi.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/sbin/dnsmasq...(no debugging symbols
found)...done.
(gdb) run -d -u dnsmasq -7
/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --dnssec
Starting program: /usr/sbin/dnsmasq -d -u dnsmasq -7
/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --dnssec
[Thread debugging using libthread_db enabled]
Using host libthread_db library
/lib/arm-linux-gnueabi/libthread_db.so.1.
dnsmasq: started, version 2.69test6 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP
DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC
dnsmasq: DNSSEC validation enabled
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver 8.8.4.4#53
dnsmasq: using nameserver 8.8.8.8#53
dnsmasq: read /etc/hosts - 4 addresses
dnsmasq: query[A] 8n1.org from ::1
dnsmasq: forwarded 8n1.org to 8.8.8.8
dnsmasq: forwarded 8n1.org to 8.8.4.4
dnsmasq: dnssec-query[DNSKEY] 8n1.org to 8.8.8.8
*** stack smashing detected ***: /usr/sbin/dnsmasq terminated

Program received signal SIGABRT, Aborted.
0xb6d43950 in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or
directory.
(gdb) bt
#0  0xb6d43950 in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0xb6d47444 in __GI_abort () at abort.c:90
#2  0xb6d7c884 in __libc_message (do_abort=do_abort@entry=2,
fmt=0xb6e3a860 *** %s ***: %s terminated\n)
at ../sysdeps/unix/sysv/linux/libc_fatal.c:199
#3  0xb6dfb43c in __GI___fortify_fail (msg=0xb6e3a848 stack smashing
detected) at fortify_fail.c:31
#4  0xb6dfb3f8 in __stack_chk_fail () at stack_chk_fail.c:28
#5  0x00041114 in ?? ()
#6  0x00041114 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt
stack?)

--
Regards,
Henk Jan Agteresch


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Testers wanted: DNSSEC.

2014-02-06 Thread Henk Jan Agteresch
On Thu, 06 Feb 2014, Simon Kelley wrote:

 On 06/02/14 10:17, Henk Jan Agteresch wrote:
 I compiled 2.69test6 on armv5tel (linksys 4200v2 running debian) using
 dpkg-buildpackage.
 dnsmasq crashes on the first received query with *** stack smashing
 detected ***: /usr/sbin/dnsmasq terminated
 
 
 Fixed code in 2.69test for from git pull.
 
 It seems to take the extra checking compiler flags that Debian
 packag builds use, and an ARM architecture, to detect this, same
 build flags on i386 didn't find it.
 
 The moral of this story is don't used fixed-size buffers, even for
 fixed strings. One day you may expand the strings, and then the
 buffer will be too small :-(
 
 Thanks for the bug report.
 

Compiled and works like a charm on my router. Thanks for the quick
fix! I'll do some more testing.

-- 
Regards,
Henk Jan Agteresch

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss