Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 814876 Details for
Bug 873700
net-dns/dnsmasq-2.86-r1 segfault when carrier is lost
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
empty-resolve.patch (text/plain), 1.21 KB, created by
Tango
on 2022-09-30 20:45:45 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Tango
Created:
2022-09-30 20:45:45 UTC
Size:
1.21 KB
patch
obsolete
>From d290630d31f4517ab26392d00753d1397f9a4114 Mon Sep 17 00:00:00 2001 >From: Simon Kelley <simon@thekelleys.org.uk> >Date: Wed, 6 Oct 2021 22:31:06 +0100 >Subject: [PATCH] Fix crash after re-reading an empty resolv.conf file. > >If dnsmasq re-reads a resolv file, and it's empty, it will >retry after a delay. In the meantime, the old servers from the >resolv file have been deleted, but the servers_array doesn't >get updated, leading to dangling pointers and crashes. > >Thanks to Brad Jorsch for finding and analysing this bug. > >This problem was introduced in 2.86. >--- > src/dnsmasq.c | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/src/dnsmasq.c b/src/dnsmasq.c >index c7fa024..9516680 100644 >--- a/src/dnsmasq.c >+++ b/src/dnsmasq.c >@@ -1682,6 +1682,11 @@ static void poll_resolv(int force, int do_reload, time_t now) > } > else > { >+ /* If we're delaying things, we don't call check_servers(), but >+ reload_servers() may have deleted some servers, rendering the server_array >+ invalid, so just rebuild that here. Once reload_servers() succeeds, >+ we call check_servers() above, which calls build_server_array itself. */ >+ build_server_array(); > latest->mtime = 0; > if (!warned) > { >-- >2.20.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 873700
: 814876