[Dnsmasq-discuss] BUG Segfault when adding ethers entry via dBus and no dhcp-range is configured - debian version 2.89-1

Simon Kelley simon at thekelleys.org.uk
Sun Dec 1 22:17:43 UTC 2024


I'd be curious about that too, but I think the fundamental problem here 
is probably that the Dbus interface code doesn't take into account that 
the DHCP subsystem may not have been  initialised at all: If there's no 
--dhcp-range statement at all, then it won't have been initialised, and 
the dBus lease-update method should check for that and return an error.

Lou, could you clarify if this bug occurs when there are NO dhcp-range 
statements, or just no dhcp-range statements for the subnet in the 
ethersfile. That's not quite clear from your bug report.


Cheers,

Simon


On 12/1/24 18:49, jay at gr-oss.io wrote:
> Hi Lou,
> 
> I'd be curious if https://thekelleys.org.uk/gitweb/? 
> p=dnsmasq.git;a=commitdiff;h=f006be7842104a9f86fbf419326b7aad08ade61d
> could fix your issue. It corrected a similarly-presenting issue in 
> OpenStack Ironic's updating of DHCP options recently.
> 
> It hasn't been added to any releases yet, so you will need to build it 
> locally. We have a bash function here: https://github.com/openstack/ 
> ironic/blob/360e21124c2369174d7b38fbb8edf581e85f52e0/devstack/lib/ 
> ironic#L3565
> which builds the newer version for our CI, you're welcome to borrow it 
> -- although I'd suggest installing to /opt
> or /usr/local unless you don't mind making your package manager angry :D.
> -
> Jay Faulkner
> 
> On 11/29/24 4:22 AM, Lou Lecrivain via Dnsmasq-discuss <dnsmasq- 
> discuss at lists.thekelleys.org.uk> wrote:
>> Hello,
>>
>> I'd like to make a bug report following an issue discovered via 
>> Proxmox VE #5949 (https://bugzilla.proxmox.com/show_bug.cgi?id=5949 
>> <https:// bugzilla.proxmox.com/show_bug.cgi?id=5949>). This happens on 
>> debian dnsmasq package version 2.89-1. I have not yet tested on latest 
>> release / dev, but if you wish, I can try to reproduce on it too.
>>
>> How to reproduce:
>>
>>   *
>>     general dnsmasq configuration
>>   *
>>     configure interface (not sure this is mandatory for reproduction)
>>   *
>>     configure dhcp-option for a subnet (same comment)
>>   *
>>     do NOT create the dhcp-range in the config file
>>   *
>>     write ethers file with an entry that's in the subnet without dhcp- 
>> range
>>   *
>>     ask for reload via systemd
>>   *
>>     update lease via dBus, see code with link below
>>     https://git.proxmox.com/?p=pve-network.git;a=blob;f=src/PVE/Network/
>>     SDN/Dhcp/
>>     Dnsmasq.pm;h=ae52d3199e0fc51fd1401d7dd78085ad730e5588;hb=refs/heads/
>>     master#l41 <https://git.proxmox.com/?p=pve-network.git;a=blob;f=src/
>>     PVE/Network/SDN/Dhcp/
>>     Dnsmasq.pm;h=ae52d3199e0fc51fd1401d7dd78085ad730e5588;hb=refs/heads/
>>     master#l41>
>>   *
>>     segfault happens at this point
>>
>> Restarting manually via systemctl after the crash does not yields any 
>> further errors.
>>
>> The crash/segmentation fault precisely happens just right after reload 
>> is triggered. I have the following message in journalctl (sorry for 
>> the french!):
>> nov. 28 12:49:38 debian12-dev systemd[1]: Starting 
>> dnsmasq at simple.service - dnsmasq (simple) - A lightweight DHCP and 
>> caching DNS server>
>> nov. 28 12:49:38 debian12-dev dnsmasq[10598]: demarré, version 2.89 
>> (taille de cache 150)
>> nov. 28 12:49:38 debian12-dev dnsmasq[10598]: options à la 
>> compilation : IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no- 
>> Lua TFTP >
>> nov. 28 12:49:38 debian12-dev dnsmasq[10598]: Support DBus autorisé : 
>> connecté au bus système
>> nov. 28 12:49:38 debian12-dev dnsmasq-dhcp[10598]: annonces de routeur 
>> IPv6 activées
>> nov. 28 12:49:38 debian12-dev dnsmasq[10598]: Lecture de /etc/resolv.conf
>> nov. 28 12:49:38 debian12-dev dnsmasq[10598]: utilise le serveur de 
>> nom 192.168.122.1#53
>> nov. 28 12:49:38 debian12-dev dnsmasq[10598]: cache vidé
>> nov. 28 12:49:39 debian12-dev systemd[1]: Started 
>> dnsmasq at simple.service - dnsmasq (simple) - A lightweight DHCP and 
>> caching DNS server.
>> nov. 28 12:49:44 debian12-dev systemd[1]: dnsmasq at simple.service: Main 
>> process exited, code=killed, status=11/SEGV
>>
>> Don't hesitate to get back to me if you need further details.
>>
>> Best regards
>> -- 
>> Lou Lécrivain
>> Systems & Network engineer
>> WDZ GmbH
>> 📧 lou.lecrivain at wdz.de <mailto:lou.lecrivain at wdz.de>
>> <https://outlook.office.com/bookwithme/ 
>> user/347bbab3d47d435cadf7ceea954b35d8 at wdz.de?anonymous&ep=signature>
>> Book a meeting with me <https://outlook.office.com/bookwithme/ 
>> user/347bbab3d47d435cadf7ceea954b35d8 at wdz.de?anonymous&ep=signature>
>>
>>
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
>> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
>>
> 
> _______________________________________________
> 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