[Dnsmasq-discuss] Patch to cache SRV records - updated version (#3)

Simon Kelley simon at thekelleys.org.uk
Wed Jan 9 15:31:17 GMT 2019


Magic, thank you.

The fix, to a high level of confidence, is

http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=a90f09db4cc635941a32b973b57e58c662569625

and the problem involved querying for a SRV record for

_bookmarkdavs._tcp.p48-bookmarks.icloud.com

which returns NXDOMAIN, as it should, but drops a little logic bomb into
the cache datastructures which will detonate some unpredictable time
later, when the cache entry is freed.

Any non-existing SRV record will have the same effect.



I've also seen a tight-loop problem in my testing, which I don't think
is this problem. There's another fix,

http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=2896e2485e44c04e73a0b7c9f7cbc9c8515d0800

which I think fixes that, but I'm not 100% sure I can think myself from
the error to the tight loop, so I'm doing some more testing.


Thanks for your contribution with this, and please keep running the
development code. It really helps for people to do that.

Cheers,

Simon.


On 08/01/2019 23:51, Mufasa wrote:
> The requested core dump files have been sent.  I updated my CFLAGS to use -g instead of -O2 and executed the ulimit command immediately before dnsmasq is launched (same script) in the fresh container.
> 
> Because of the default behavior of Ubuntu’s Docker image, core dump files were not being generated nor could I set the core dump output location to a directory instead of the non-functional apport configuration default, so I made these additional changes to my environment to generate the files:
> 
> "docker —run”, the command to launch the container,  got new parameters "--privileged --ulimit core=-1” per recommendations I found on generating core dumps in a container.  This was in addition to running the ulimit command in the shell script I start dnsmasq from.
> 
> The launch script now does this to set the core dump location:
> echo '/tmp/core.%h.%e.%t' > /proc/sys/kernel/core_pattern
> 
> -Daniel
> 
>> On Jan 8, 2019, at 3:14 AM, Simon Kelley <simon at thekelleys.org.uk> wrote:
>>
>> Thanks for the feedback, and for tracking the bleeding-edge code. The
>> following should help get useful information.
>>
>> 1) Replace -O2 with -g in your compilation flags
>> 2) run the command "ulimit -c unlimited" from the shell you start
>> dnsmasq from.
>>
>> When it goes bang, send me the core dump and the dnsmasq binary.
>>
> 
> _______________________________________________
> 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