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

Dmitry Valter dvalter at protonmail.com
Sat Mar 12 18:10:08 UTC 2022


Thanks, I've missed that fix.

It looks (and works as far as my repro goes) good, so master is no 
longer affected.

The only concern left for me is inconsistency of array and it's supposed 
size may trigger the same bug again during refactors, but it's up to You.

On 27/02/2022 15:00, Simon Kelley wrote:
> Thanks for that.
>
> Are you sure the bug still exists in master?
>
> I think there's a different solution to the same problem in
>
> https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=d290630d31f4517ab26392d00753d1397f9a4114
>
> but I may be confused.
>
>
> Cheers,
>
> Simon.
>
> On 26/02/2022 15:00, Dmitry Valter via Dnsmasq-discuss wrote:
>> 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






More information about the Dnsmasq-discuss mailing list