[Dnsmasq-discuss] [Patch] Fix for use-after-free in lookup_domain

Dmitry Valter dvalter at protonmail.com
Sat Feb 26 15:00:08 UTC 2022


Hi everyone!

I've been using dnsmasq 2.86 as a libvirt resolver on my laptop. 
Sometimes, likely when VM had sent a query during network reconnects, 
dnsmasq had crashed with SIGSEGV.
Rebuilding with ASAN and a few config changes helped me to identify 
likely cause in use-after-free. The full trace is attached in 
asan-trace.txt.

Since patching it I had no crashes (for a few months now). I believe, 
this bug still can be triggered in master branch, so you may find this 
patch useful.

Patch is created against v2.87test8-2-g8e59220

-- 
Best regards, Dmitry
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: asan-trace.txt
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20220226/13ca65bc/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cleanup-fix-uaf.patch
Type: text/x-patch
Size: 637 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20220226/13ca65bc/attachment.bin>


More information about the Dnsmasq-discuss mailing list