From b53d90053ec981543cf2a8e5e39783c142f7e644 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Fri, 5 Jul 2024 17:18:01 +0200 Subject: [PATCH] - Fix #1099: Unbound core dump on SIGSEGV. --- doc/Changelog | 1 + services/cache/dns.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/doc/Changelog b/doc/Changelog index 09d4aa6bc..5d195d37d 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,7 @@ 5 July 2024: Wouter - Fix for neater printout for error for missing DS response. - Fix neater printout. + - Fix #1099: Unbound core dump on SIGSEGV. 4 July 2024: Wouter - Fix to print details about the failure to lookup a DNSKEY record diff --git a/services/cache/dns.c b/services/cache/dns.c index 632ed79ac..3307f58fe 100644 --- a/services/cache/dns.c +++ b/services/cache/dns.c @@ -115,7 +115,9 @@ store_rrsets(struct module_env* env, struct reply_info* rep, time_t now, } /* if ref was updated make sure the message ttl is updated to * the minimum of the current rrsets. */ + lock_rw_rdlock(&rep->rrsets[i]->entry.lock); ttl = ((struct packed_rrset_data*)rep->rrsets[i]->entry.data)->ttl; + lock_rw_unlock(&rep->rrsets[i]->entry.lock); if(ttl < min_ttl) min_ttl = ttl; } if(min_ttl < rep->ttl) { -- 2.47.2