[Dnsmasq-discuss] Segfault in DNSSEC code

Wang Jian larkwang at gmail.com
Thu Apr 17 04:13:43 UTC 2014


Will this conflict with ipset fix (which related to DNSSEC) days ago?

2014-04-17 5:24 GMT+08:00 Simon Kelley <simon at thekelleys.org.uk>:
> On 15/04/14 22:39, Manish Singh wrote:
>> I've run across a segfault in the DNSSEC code when resolving a domain, when
>> DNSSEC builtin but turned off:
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> [Switching to Thread 0x7f3d178fe700 (LWP 10762)]
>> 0x0000000000407e26 in extract_name (header=0x1001272, plen=46,
>>     pp=0x7fffdc948590, name=0x0, isExtract=1, extrabytes=4) at rfc1035.c:27
>> 27        *cp = 0;
>> (gdb) bt
>> #0  0x0000000000407e26 in extract_name (header=0x1001272, plen=46,
>>     pp=0x7fffdc948590, name=0x0, isExtract=1, extrabytes=4) at rfc1035.c:27
>> #1  0x0000000000455419 in hash_questions (header=0x1001272, plen=46,
>> name=0x0)
>>     at dnssec.c:2284
>> #2  0x0000000000421160 in tcp_request (confd=11, now=1397591659,
>>     local_addr=0x7fffdc9487b0, netmask=..., auth_dns=0) at forward.c:1745
>> #3  0x00000000004295e7 in check_dns_listeners (set=0x7fffdc948920,
>>     now=1397591659) at dnsmasq.c:1591
>> #4  0x0000000000427c88 in main (argc=10, argv=0x7fffdc948c38) at
>> dnsmasq.c:955
>>
>> daemon->keyname is eventually passed into extract_name, but it is NULL
>> since the code that initializes is guarded by an
>> option_bool(OPT_DNSSEC_VALID) check.
>>
>> I don't really know enough about DNSSEC to ascertain why this code path got
>> triggered when it shouldn't be.
>
> It's a copy-n-paste error, I think. In any case
> s/daemon->keyname/daemon->namebuff/
> fixes it. I've just committed the fix to git.
>
> Thanks for that, it's a nasty bug, probably worth of an early release to
> fix it.
>
>
> Cheers,
>
>
> Simon.
>
>
>>
>> -Manish
>>
>>
>>
>> _______________________________________________
>> 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



More information about the Dnsmasq-discuss mailing list