From 987f61dbb70d87ee273b5eb368823793d49a7097 Mon Sep 17 00:00:00 2001 From: Aram Sargsyan Date: Mon, 27 Mar 2023 10:56:22 +0000 Subject: [PATCH 1/2] Fix a data race in dns__catz_update_cb() The dns__catz_update_cb() function was earlier updated (see d2ecff3c4a0d961041b860515858d258d40462d7) to use a separate 'dns_db_t' object ('catz->updb' instead of 'catz->db') to avoid a race between the 'dns__catz_update_cb()' and 'dns_catz_dbupdate_callback()' functions, but the 'REQUIRE' check there still checks the validity of the 'catz->db' object. Fix the omission. (cherry picked from commit a2817541b3f619fd6ad55f34e65b81bd9f46e913) --- lib/dns/catz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns/catz.c b/lib/dns/catz.c index f9397645e5..64d5f08027 100644 --- a/lib/dns/catz.c +++ b/lib/dns/catz.c @@ -2254,7 +2254,7 @@ dns__catz_update_cb(void *data) { uint32_t catz_vers; REQUIRE(DNS_CATZ_ZONE_VALID(catz)); - REQUIRE(DNS_DB_VALID(catz->db)); + REQUIRE(DNS_DB_VALID(catz->updb)); REQUIRE(DNS_CATZ_ZONES_VALID(catz->catzs)); updb = catz->updb; From 9fb1381110225f5fe93e4fc8418c608f4d6e72ee Mon Sep 17 00:00:00 2001 From: Aram Sargsyan Date: Mon, 27 Mar 2023 11:09:13 +0000 Subject: [PATCH 2/2] Add a CHANGES note for [GL #3968] (cherry picked from commit 95cb2affaae70dac9921a7c1166eac55363873d8) --- CHANGES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index 75cda85117..8b3a4bae05 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +6128. [bug] Fix an omission in an earlier commit to avoid a race + between the 'dns__catz_update_cb()' and + 'dns_catz_dbupdate_callback()' functions. [GL #3968] + 6126. [cleanup] Deprecate zone type "delegation-only" and the "delegation-only" and "root-delegation-only" options. [GL #3953]