From 1fcc483df13e049b96f620e515f0d4d45f3680b7 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 12 Oct 2023 12:01:46 +1100 Subject: [PATCH 1/3] Restore dns64 state during serve-stale processing If we are in the process of looking for the A records as part of dns64 processing and the server-stale timeout triggers, redo the dns64 changes that had been made to the orignal qctx. --- lib/ns/query.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/ns/query.c b/lib/ns/query.c index 07537a8040..b819dc4fdf 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -6251,6 +6251,13 @@ query_lookup_stale(ns_client_t *client) { query_ctx_t qctx; qctx_init(client, NULL, client->query.qtype, &qctx); + if (DNS64(client)) { + qctx.qtype = qctx.type = dns_rdatatype_a; + qctx.dns64 = true; + } + if (DNS64EXCLUDE(client)) { + qctx.dns64_exclude = true; + } dns_db_attach(client->view->cachedb, &qctx.db); client->query.attributes &= ~NS_QUERYATTR_RECURSIONOK; client->query.dboptions |= DNS_DBFIND_STALETIMEOUT; From 26671f8c478a66296ee5874adbe741c890e435d1 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 12 Oct 2023 13:39:57 +1100 Subject: [PATCH 2/3] Add CHANGES note for [GL #4334] --- CHANGES | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 1b27d586c0..548208b3ef 100644 --- a/CHANGES +++ b/CHANGES @@ -2,7 +2,8 @@ 6318. [placeholder] -6317. [placeholder] +6317. [security] Restore DNS64 state when handling a serve-stale timeout. + (CVE-2023-5679) [GL #4334] 6316. [security] Specific queries could trigger an assertion check with nxdomain-redirect enabled. (CVE-2023-5517) [GL #4281] From c4faf5c69f7eba3b23b8a932e66fc89ec3bee4a9 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 12 Oct 2023 13:42:38 +1100 Subject: [PATCH 3/3] Add release note for [GL #4334] --- doc/notes/notes-current.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/notes/notes-current.rst b/doc/notes/notes-current.rst index f793805ae4..0021e57c5f 100644 --- a/doc/notes/notes-current.rst +++ b/doc/notes/notes-current.rst @@ -27,6 +27,11 @@ Security Fixes assertion failure when :any:`nxdomain-redirect` was enabled. This has been fixed. :cve:`2023-5517` :gl:`#4281` +- A bad interaction between DNS64 and serve-stale could cause + :iscman:`named` to crash with an assertion failure, when both of these + features were enabled. This has been fixed. :cve:`2023-5679` + :gl:`#4334` + New Features ~~~~~~~~~~~~