[Dnsmasq-discuss] Crash with "double free or corruption" when receiving SIGHUP, on a configuration using hosts file and tags
Simon Kelley
simon at thekelleys.org.uk
Fri Jan 31 23:51:58 UTC 2025
I think this is fixed in 2.91 by commit
f006be7842104a9f86fbf419326b7aad08ade61d
Cheers,
Simon.
On 1/31/25 13:20, Mathieu ABATI wrote:
> Hi,
>
> I am using dnsmasq through libvirt, and I get a crash when I send SIGHUP to dnsmasq, my setup is using a configuration with hosts and options files including tags.
> No error in my configuration files is reported by dnsmasq.
> I attached some files to have a simple setup to reproduce the issue.
>
> 1. Prepare network interfaces by running setup.sh script, it creates bridged virtual interfaces to simulate DHCP server and client.
> 2. Run dnsmasq: sudo dnsmasq -d --conf-file=dnsmasq.conf
> 3. Simulate a DHCP request from the host present in hosts.conf (else the crash will not occur): sudo dhclient -v -d dhclient-test
> 4. Send SIGHUP to dnsmasq to trigger hosts and options files reload. You get a crash with "double free or corruption (out)" message.
> 5. Cleanup with cleanup.sh script.
>
> If you edit hosts.conf to remove the ",set:group1" part, no more crash doing the same operations.
> So it seems to be related on tags reload in hosts file.
>
> Reproduced on ArchLinux and Ubuntu using dnsmasq 2.90.
>
> As a workaround to this problem, I removed tags from hosts.conf file and I have added such entry in the main configuration file:
> dhcp-mac=set:group1,52:54:00:3b:e8:08
> This is not reloaded on SIGHUP, but this is acceptable in my use case where I only need to update static IP addresses and options.
> But indeed it doesn't allow to dynamically add new tagged hosts without restarting dnsmasq process.
>
> Best regards
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
More information about the Dnsmasq-discuss
mailing list