Description of problem: dsnmasq segfaults when the configuration file contains: interface=eth2 dhcp-range=fd00:ff:11:1::2,ra-only,64 Version-Release number of selected component: dnsmasq-2.65-4.fc18 Additional info: backtrace_rating: 4 cmdline: /usr/sbin/dnsmasq -k -d crash_function: strcpy executable: /usr/sbin/dnsmasq kernel: 3.7.9-205.fc18.x86_64 uid: 0 Truncated backtrace: Thread no. 1 (3 frames) #0 strcpy at ../sysdeps/x86_64/strcpy.S:73 #1 inet_ntop6 at inet_ntop.c:202 #2 inet_ntop at inet_ntop.c:69
Created attachment 708559 [details] File: backtrace
Created attachment 708560 [details] File: build_ids
Created attachment 708561 [details] File: cgroup
Created attachment 708562 [details] File: core_backtrace
Created attachment 708563 [details] File: dso_list
Created attachment 708564 [details] File: environ
Created attachment 708565 [details] File: limits
Created attachment 708566 [details] File: maps
Created attachment 708567 [details] File: open_fds
Created attachment 708568 [details] File: proc_pid_status
From Simon Kelly: Ok, this bug is long gone in the 2.66 releases, as the code has been completely re-written. The problem is that line 643 of src/dnsmasq.c uses daemon->dhcp_buff2 which is not allocated unless some DHCP service is configured. A minimal patch for RH would be something like daemon->dhcp_buff2=malloc(256); just before that line, workaround is to configure DHCP service as well as RA Since 2.6.6 is not coming out "Real Soon Now", a patch is suggested.
Thank you for the comment. I noticed Simon's reply on dnsmasq mailing-list today. I kind of don't like just adding malloc() before that line. I'll try to come up with something better ASAP and push an update in Fedora.
Created attachment 709670 [details] quick fix for 2.65 per Simon Kelly
(In reply to comment #13) > Created attachment 709670 [details] > quick fix for 2.65 per Simon Kelly I will not use this patch because if dhcp_buff2 was allocated before the memory would be leaked. Better solution is to fix IF condition where dhcp_common_init() is called to be called also if daemon->ra_contexts. I will test the fix and push an update.
Personally, I am going to give one of the 2.66 test releases a try. I agree that a correct patch is the right thing to do and not my "quick and dirty" which might have unpleasant side effects.
Created attachment 710598 [details] Fix for segfault
Fixed in: dnsmasq-2.65-5.fc20 dnsmasq-2.65-5.fc19 dnsmasq-2.65-5.fc18 dnsmasq-2.65-5.fc17
dnsmasq-2.65-5.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/dnsmasq-2.65-5.fc18
dnsmasq-2.65-5.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/dnsmasq-2.65-5.fc17
Gene, can you please test dnsmasq-2.65-5.fc18 from updates testing if it works for you? And also add the karma if possible. Thank you.
dnsmasq-2.65-5.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
dnsmasq-2.65-5.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.