Skip to contentSkip to conversation

bind: Fix CVE-2026-1519

PATCH In review Ashishkumar Parmar X (asparmar - E INFOCHIPS PRIVATE LIMITED at Cisco) 2 participants 7 messages Jun 10 – Jul 6

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 bind: Fix CVE-2026-1519

From: Ashishkumar Parmar <[email protected]>

Pick the upstream 9.18 backport [1] for CVE-2026-1519. The public ISC advisory [2] describes the vulnerability and identifies the fixed BIND release.

The upstream fix is split across the reproducer and validation commits. Also include one prerequisite NSEC3 bounds-check commit that is required before the validation changes can be applied cleanly and validated safely on the downstream 9.18.44 source:

- CVE-2026-1519_p1.patch [3] adds the upstream system-test reproducer for excessive NSEC3 iterations at delegation.
- CVE-2026-1519-dependent.patch [4] adds the prerequisite NSEC3 next_length bounds check in isdelegation(). This patch is not part of the CVE merge commit, but it touches the same NSEC3 delegation path and must be applied before the functional validation changes.
- CVE-2026-1519_p2.patch [5] adds the iteration-limit handling in isdelegation().
- CVE-2026-1519_p3.patch [6] avoids re-validating already trusted rdatasets.
- CVE-2026-1519_p4.patch [7] checks RRset trust in validate_neg_rrset().

Keep the patches split to preserve the upstream commit structure and to make the SRC_URI ordering explicit.

[1] https://gitlab.com/isc-projects/bind9/-/commit/5ef459eeaa92222ad28d2186f5eae9a586dece70
[2] https://kb.isc.org/docs/cve-2026-1519
[3] https://gitlab.com/isc-projects/bind9/-/commit/2c82f99a3c95f356861d5977f12ef9bbe2063cb6
[4] https://gitlab.com/isc-projects/bind9/-/commit/368c75a9f567f8b36cf24fefe45023e0a050e47b
[5] https://gitlab.com/isc-projects/bind9/-/commit/85c21feff9acb0982fe60f2c88201bf55533bd0e
[6] https://gitlab.com/isc-projects/bind9/-/commit/8890a91c1c16129333139b9d8a4381e0f741f0d6
[7] https://gitlab.com/isc-projects/bind9/-/commit/85fcd704e2f7cc2a25d2195bc4bb28398c889ed3

---
 .../bind/bind/CVE-2026-1519-dependent.patch   |  50 +++
 .../bind/bind/CVE-2026-1519_p1.patch          | 341 ++++++++++++++++++
 .../bind/bind/CVE-2026-1519_p2.patch          | 176 +++++++++
 .../bind/bind/CVE-2026-1519_p3.patch          |  52 +++
 .../bind/bind/CVE-2026-1519_p4.patch          |  59 +++
 .../recipes-connectivity/bind/bind_9.18.44.bb |   5 +
 6 files changed, 683 insertions(+)
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519-dependent.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519_p1.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519_p2.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519_p3.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519_p4.patch
meta/recipes-connectivity/bind/bind/CVE-2026-1519-dependent.patch new file +50 -0
new file mode 100644
index 0000000000..eff7a06d82
@@ -0,0 +1,50 @@
+From af8929ebe72ca8564882632e59999795c781ebd4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <[email protected]>
+Date: Sat, 14 Feb 2026 14:43:41 +0100
+Subject: [PATCH] Invalid NSEC3 can cause OOB read of the isdelegation() stack
+
+When .next_length is longer than NSEC3_MAX_HASH_LENGTH, it causes a
+harmless out-of-bound read of the isdelegation() stack. This patch
+fixes the issue by skipping NSEC3 records with an oversized hash length
+during validation.
+
+CVE: CVE-2026-1519
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/368c75a9f567f8b36cf24fefe45023e0a050e47b]
+
+(cherry picked from commit 67b4fb56e40bf856e1fccd41e752d5f486b5b569)
+(cherry picked from commit 368c75a9f567f8b36cf24fefe45023e0a050e47b)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ lib/dns/rdata/generic/nsec3_50.c | 1 +
+ lib/dns/validator.c              | 3 +++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/lib/dns/rdata/generic/nsec3_50.c b/lib/dns/rdata/generic/nsec3_50.c
+index f45fe4dc33..e04587bd1b 100644
+--- a/lib/dns/rdata/generic/nsec3_50.c
++++ b/lib/dns/rdata/generic/nsec3_50.c
+@@ -324,6 +324,7 @@ tostruct_nsec3(ARGS_TOSTRUCT) {
+ 	}
+ 
+ 	nsec3->mctx = mctx;
++
+ 	return ISC_R_SUCCESS;
+ 
+ cleanup:
+diff --git a/lib/dns/validator.c b/lib/dns/validator.c
+index 809b7be911..9ec13581ab 100644
+--- a/lib/dns/validator.c
++++ b/lib/dns/validator.c
+@@ -339,6 +339,9 @@ trynsec3:
+ 			if (nsec3.hash != 1) {
+ 				continue;
+ 			}
++			if (nsec3.next_length > NSEC3_MAX_HASH_LENGTH) {
++				continue;
++			}
+ 			length = isc_iterated_hash(
+ 				hash, nsec3.hash, nsec3.iterations, nsec3.salt,
+ 				nsec3.salt_length, name->ndata, name->length);
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind/CVE-2026-1519_p1.patch new file +341 -0

341 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-1519_p2.patch new file +176 -0

176 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-1519_p3.patch new file +52 -0

52 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-1519_p4.patch new file +59 -0

59 lines not on this page · raw message

meta/recipes-connectivity/bind/bind_9.18.44.bb +5 -0
index d424edcb4e..9c8b73dccc 100644
@@ -18,6 +18,11 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \
            file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
            file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \
            file://0001-avoid-start-failure-with-bind-user.patch \
+           file://CVE-2026-1519_p1.patch \
+           file://CVE-2026-1519-dependent.patch \
+           file://CVE-2026-1519_p2.patch \
+           file://CVE-2026-1519_p3.patch \
+           file://CVE-2026-1519_p4.patch \
            "
 
 SRC_URI[sha256sum] = "81f5035a25c576af1a93f0061cf70bde6d00a0c7bd1274abf73f5b5389a6f82d"
Signature · 1 line
2.35.6
#1 lore raw

PATCH 2/5 bind: Fix CVE-2026-5950

From: Ashishkumar Parmar <[email protected]>

Pick the upstream 9.18 backport [1] for CVE-2026-5950. The public ISC advisory [2] describes the vulnerability and identifies the fixed BIND release.

The upstream fix is split across a reproducer, a counter refactor, and the functional resend-loop fix. Apply them in the same order so the final fix lands on top of the counter handling it depends on:

- CVE-2026-5950_p1.patch [3] adds the BADCOOKIE resend-loop system-test reproducer.
- CVE-2026-5950_p2.patch [4] refactors query-counter increment handling so resend paths can update counters consistently.
- CVE-2026-5950_p3.patch [5] updates rctx_resend() to increment query counters, preventing the unbounded resend loop from bypassing the quota accounting.

Keep the patches split to preserve the upstream commit structure and to make the SRC_URI ordering explicit.

[1] https://gitlab.com/isc-projects/bind9/-/commit/43d173797e3c781c7e38d879c3c765f01cc09c59
[2] https://kb.isc.org/docs/cve-2026-5950
[3] https://gitlab.com/isc-projects/bind9/-/commit/8344a38d6bc72d3872b552b4cae0e0d8be4c3d4a
[4] https://gitlab.com/isc-projects/bind9/-/commit/9ebfca2af824a60ea072292ffb1ab01ff87c7fa7
[5] https://gitlab.com/isc-projects/bind9/-/commit/d3ba533080e31de98986f3beff70d7c330ba9f89

---
 .../bind/bind/CVE-2026-5950_p1.patch          | 245 ++++++++++++++++++
 .../bind/bind/CVE-2026-5950_p2.patch          | 100 +++++++
 .../bind/bind/CVE-2026-5950_p3.patch          |  67 +++++
 .../recipes-connectivity/bind/bind_9.18.44.bb |   3 +
 4 files changed, 415 insertions(+)
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5950_p1.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5950_p2.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5950_p3.patch
meta/recipes-connectivity/bind/bind/CVE-2026-5950_p1.patch new file +245 -0
new file mode 100644
index 0000000000..3b603e41fd
@@ -0,0 +1,245 @@
+From 59bf865e9691f3a047e24bda071498a48e2a5220 Mon Sep 17 00:00:00 2001
+From: Matthijs Mekking <[email protected]>
+Date: Thu, 9 Apr 2026 11:32:07 +0200
+Subject: [PATCH] Add reproducer for BADCOOKIE resend loop
+
+Run malicious server: resend_loop/ans3/ans.py
+
+Start BIND: ns4
+
+Send single query to test.example
+
+The resolver will repeatedly resend queries until the fetch timeout
+expires, resulting in resulting in thousands of qrysent while the quota
+counter remains 0.
+
+CVE: CVE-2026-5950
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/8344a38d6bc72d3872b552b4cae0e0d8be4c3d4a]
+
+(cherry picked from commit 7eeb463bc58cbd71419aaf189d7829f2dfd8d055)
+(cherry picked from commit 8344a38d6bc72d3872b552b4cae0e0d8be4c3d4a)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ bin/tests/system/resend_loop/ans3/ans.py      | 128 ++++++++++++++++++
+ .../system/resend_loop/ns4/named.conf.j2      |  16 +++
+ bin/tests/system/resend_loop/ns4/root.hint    |  14 ++
+ .../system/resend_loop/tests_resend_loop.py   |  28 ++++
+ 4 files changed, 186 insertions(+)
+ create mode 100644 bin/tests/system/resend_loop/ans3/ans.py
+ create mode 100644 bin/tests/system/resend_loop/ns4/named.conf.j2
+ create mode 100644 bin/tests/system/resend_loop/ns4/root.hint
+ create mode 100644 bin/tests/system/resend_loop/tests_resend_loop.py
+
+diff --git a/bin/tests/system/resend_loop/ans3/ans.py b/bin/tests/system/resend_loop/ans3/ans.py
+new file mode 100644
+index 0000000000..90a3f2f9cc
+--- /dev/null
++++ b/bin/tests/system/resend_loop/ans3/ans.py
+@@ -0,0 +1,128 @@
++# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++#
++# SPDX-License-Identifier: MPL-2.0
++#
++# This Source Code Form is subject to the terms of the Mozilla Public
++# License, v. 2.0.  If a copy of the MPL was not distributed with this
++# file, you can obtain one at https://mozilla.org/MPL/2.0/.
++#
++# See the COPYRIGHT file distributed with this work for additional
++# information regarding copyright ownership.
++
++from collections.abc import AsyncGenerator
++
++import dns.edns
++import dns.name
++import dns.rcode
++import dns.rdatatype
++import dns.rrset
++
++from isctest.asyncserver import (
++    AsyncDnsServer,
++    DnsResponseSend,
++    QueryContext,
++    ResponseHandler,
++)
++
++
++def _get_cookie(qctx: QueryContext):
++    for o in qctx.query.options:
++        if o.otype == dns.edns.OptionType.COOKIE:
++            cookie = o
++            try:
++                if len(cookie.server) == 0:
++                    cookie.server = b"\x11\x22\x33\x44\x55\x66\x77\x88"
++            except AttributeError:  # dnspython<2.7.0 compat
++                if len(o.data) == 8:
++                    cookie.data *= 2
++
++            return cookie
++
++    return None
++
++
++class PrimeHandler(ResponseHandler):
++    """
++    Specifically handle priming query for "." NS (type 2)
++    """
++
++    def match(self, qctx: QueryContext) -> bool:
++        return len(qctx.qname.labels) == 0 and qctx.qtype == dns.rdatatype.NS
++
++    async def get_responses(
++        self, qctx: QueryContext
++    ) -> AsyncGenerator[DnsResponseSend, None]:
++
++        ns_rrset = dns.rrset.from_text(
++            ".", dns.rdatatype.NS, qctx.qclass, "a.root-servers.nil."
++        )
++        a_rrset = dns.rrset.from_text(
++            "a.root-servers.nil.", dns.rdatatype.A, qctx.qclass, "10.53.0.3"
++        )
++
++        response = qctx.prepare_new_response(with_zone_data=False)
++        response.set_rcode(dns.rcode.NOERROR)
++        response.answer.append(ns_rrset)
++        response.additional.append(a_rrset)
++
++        yield DnsResponseSend(response, authoritative=True)
++
++
++class CookieHandler(ResponseHandler):
++    def match(self, qctx: QueryContext) -> bool:
++        example = dns.name.from_text("example")
++        return qctx.qname.is_subdomain(example)
++
++    async def get_responses(
++        self, qctx: QueryContext
++    ) -> AsyncGenerator[DnsResponseSend, None]:
++
++        qctx.prepare_new_response()
++
++        # Check for client cookie
++        cookie = _get_cookie(qctx)
++
++        # If missing cookie entirely, just return SERVFAIL
++        if cookie is None:
++            qctx.response.set_rcode(dns.rcode.SERVFAIL)
++            yield DnsResponseSend(qctx.response, authoritative=True)
++
++        # If there is a client cookie, mock BADCOOKIE to trigger
++        # the resend loop logic.
++        qctx.response.use_edns(options=[cookie])
++        qctx.response.set_rcode(dns.rcode.BADCOOKIE)
++        yield DnsResponseSend(qctx.response, authoritative=True)
++
++
++class NoErrorHandler(ResponseHandler):
++    """
++    If the query is NOT a subdomain of example, respond with standard NOERROR empty answer
++    """
++
++    async def get_responses(
++        self, qctx: QueryContext
++    ) -> AsyncGenerator[DnsResponseSend, None]:
++
++        qctx.prepare_new_response()
++        qctx.response.set_rcode(dns.rcode.NOERROR)
++        yield DnsResponseSend(qctx.response, authoritative=True)
++
++
++def resend_server() -> AsyncDnsServer:
++    server = AsyncDnsServer(default_aa=True, default_rcode=dns.rcode.NOERROR)
++    server.install_response_handlers(
++        [
++            PrimeHandler(),
++            CookieHandler(),
++            NoErrorHandler(),
++        ]
++    )
++    return server
++
++
++def main() -> None:
++    resend_server().run()
++
++
++if __name__ == "__main__":
++    main()
+diff --git a/bin/tests/system/resend_loop/ns4/named.conf.j2 b/bin/tests/system/resend_loop/ns4/named.conf.j2
+new file mode 100644
+index 0000000000..360bc12e17
+--- /dev/null
++++ b/bin/tests/system/resend_loop/ns4/named.conf.j2
+@@ -0,0 +1,16 @@
++options {
++	query-source address 10.53.0.4;
++	notify-source 10.53.0.4;
++	transfer-source 10.53.0.4;
++	port @PORT@;
++	pid-file "named.pid";
++	listen-on { 10.53.0.4; };
++	listen-on-v6 { none; };
++	recursion yes;
++	dnssec-validation no;
++};
++
++zone "." IN {
++	type hint;
++	file "root.hint";
++};
+diff --git a/bin/tests/system/resend_loop/ns4/root.hint b/bin/tests/system/resend_loop/ns4/root.hint
+new file mode 100644
+index 0000000000..3889a8b353
+--- /dev/null
++++ b/bin/tests/system/resend_loop/ns4/root.hint
+@@ -0,0 +1,14 @@
++; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++;
++; SPDX-License-Identifier: MPL-2.0
++;
++; This Source Code Form is subject to the terms of the Mozilla Public
++; License, v. 2.0.  If a copy of the MPL was not distributed with this
++; file, you can obtain one at https://mozilla.org/MPL/2.0/.
++;
++; See the COPYRIGHT file distributed with this work for additional
++; information regarding copyright ownership.
++
++$TTL 999999
++.			 IN NS	a.root-servers.nil.
++a.root-servers.nil.	 IN A	10.53.0.3
+diff --git a/bin/tests/system/resend_loop/tests_resend_loop.py b/bin/tests/system/resend_loop/tests_resend_loop.py
+new file mode 100644
+index 0000000000..f7ed4d3da6
+--- /dev/null
++++ b/bin/tests/system/resend_loop/tests_resend_loop.py
+@@ -0,0 +1,28 @@
++# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++#
++# SPDX-License-Identifier: MPL-2.0
++#
++# This Source Code Form is subject to the terms of the Mozilla Public
++# License, v. 2.0.  If a copy of the MPL was not distributed with this
++# file, you can obtain one at https://mozilla.org/MPL/2.0/.
++#
++# See the COPYRIGHT file distributed with this work for additional
++# information regarding copyright ownership.
++
++import dns.message
++
++import isctest
++
++
++def test_resend_loop_badcookie(ns4):
++    expected_log = "exceeded max queries resolving 'test.example/A'"
++
++    msg = dns.message.make_query("test.example", "A")
++    with ns4.watch_log_from_here() as watcher:
++        res = isctest.query.udp(msg, ns4.ip)
++        watcher.wait_for_line(expected_log)
++
++    isctest.check.servfail(res)
++
++    prohibited_log = "query failed (timed out) for test.example/IN/A"
++    assert prohibited_log not in ns4.log
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind/CVE-2026-5950_p2.patch new file +100 -0

100 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-5950_p3.patch new file +67 -0

67 lines not on this page · raw message

meta/recipes-connectivity/bind/bind_9.18.44.bb +3 -0
index 9c8b73dccc..d55e0e0c4d 100644
@@ -23,6 +23,9 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \
            file://CVE-2026-1519_p2.patch \
            file://CVE-2026-1519_p3.patch \
            file://CVE-2026-1519_p4.patch \
+           file://CVE-2026-5950_p1.patch \
+           file://CVE-2026-5950_p2.patch \
+           file://CVE-2026-5950_p3.patch \
            "
 
 SRC_URI[sha256sum] = "81f5035a25c576af1a93f0061cf70bde6d00a0c7bd1274abf73f5b5389a6f82d"
Signature · 1 line
2.35.6
#2 lore raw

PATCH 3/5 bind: Fix CVE-2026-3592

In reply to Ashishkumar Parmar X (asparmar - E INFOCHIPS PRIVATE LIMITED at Cisco)

From: Ashishkumar Parmar <[email protected]>

Pick the upstream 9.18 backport [1] for CVE-2026-3592. The public ISC advisory [2] describes the vulnerability and identifies the fixed BIND release.

The upstream fix is split across resolver limits, glue deduplication, and system-test coverage. Apply the implementation patches before the tests so the test changes exercise the same behavior as the upstream fix set:

- CVE-2026-3592_p1.patch [3] limits the number of addresses returned per ADB find.
- CVE-2026-3592_p2.patch [4] removes duplicate addresses from the resolver SLIST.
- CVE-2026-3592_p3.patch [5] adds the self-pointed glue deduplication system test.
- CVE-2026-3592_p4.patch [6] syncs asyncserver.py from the development branch, with downstream backport adjustments for the 9.18.44 test tree.
- CVE-2026-3592_p5.patch [7] adds the SRTT-based server selection system test.
- CVE-2026-3592_p6.patch [8] fixes the resend_loop system test after the preceding test-support changes.

Keep the patches split to preserve the upstream commit structure and to make the SRC_URI ordering explicit.

[1] https://gitlab.com/isc-projects/bind9/-/commit/5abfbc2663023e0c6f2a08ee6a7986f2a404f2f6
[2] https://kb.isc.org/docs/cve-2026-3592
[3] https://gitlab.com/isc-projects/bind9/-/commit/695362e3438c832ed0e39e144a77f233113d3431
[4] https://gitlab.com/isc-projects/bind9/-/commit/e25eaf9e6e09bbdd826252226144570222d542d8
[5] https://gitlab.com/isc-projects/bind9/-/commit/d2a67ba22246029192d8072d31b97e3bfd235f64
[6] https://gitlab.com/isc-projects/bind9/-/commit/b0e8966647e744482edc06e48bc9ff5079a1c541
[7] https://gitlab.com/isc-projects/bind9/-/commit/d5cd9b71ebadf7c0c76f09c5bbb65b6a7b944d0d
[8] https://gitlab.com/isc-projects/bind9/-/commit/cb13dcabdb64bdb5f8f7ed33980aaf470a90e877

---
 .../bind/bind/CVE-2026-3592_p1.patch          | 115 +++
 .../bind/bind/CVE-2026-3592_p2.patch          | 334 +++++++
 .../bind/bind/CVE-2026-3592_p3.patch          | 629 +++++++++++++
 .../bind/bind/CVE-2026-3592_p4.patch          | 891 ++++++++++++++++++
 .../bind/bind/CVE-2026-3592_p5.patch          | 554 +++++++++++
 .../bind/bind/CVE-2026-3592_p6.patch          |  41 +
 .../recipes-connectivity/bind/bind_9.18.44.bb |   6 +
 7 files changed, 2570 insertions(+)
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-3592_p1.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-3592_p2.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-3592_p3.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-3592_p4.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-3592_p5.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-3592_p6.patch
meta/recipes-connectivity/bind/bind/CVE-2026-3592_p1.patch new file +115 -0
new file mode 100644
index 0000000000..3955165a5f
@@ -0,0 +1,115 @@
+From 2910d537ac86aa033023678c70ded227ebda1af3 Mon Sep 17 00:00:00 2001
+From: Colin Vidal <[email protected]>
+Date: Thu, 5 Feb 2026 09:46:01 +0100
+Subject: [PATCH] Limit the number of addresses returned per ADB find
+
+Add a hard limit on the number of addresses that ADB returns from a
+single NS lookup (dns_adbfind_t).  This mitigates a flood attack
+where an attacker controls a zone with many addresses for a
+nameserver, each returning an invalid response.  The global
+max-query count (default 50) also limits this, but significant harm
+can be done before that limit is reached.
+
+The default limit is now 6 (v4 and/or v6) addresses for an ADB find (so,
+ADB looking up for A/AAAA addresses of a name server name). It can be
+overridden for testing via 'named -T adbaddrslimit=N'.
+
+CVE: CVE-2026-3592
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/695362e3438c832ed0e39e144a77f233113d3431]
+
+(cherry picked from commit 3ec37fc69356ee682bee7f67940613ac31d93d7b)
+(cherry picked from commit 695362e3438c832ed0e39e144a77f233113d3431)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ bin/named/main.c |  9 +++++++++
+ lib/dns/adb.c    | 26 ++++++++++++++++++++++++++
+ 2 files changed, 35 insertions(+)
+
+diff --git a/bin/named/main.c b/bin/named/main.c
+index df47e8d667..ddd43c9b2c 100644
+--- a/bin/named/main.c
++++ b/bin/named/main.c
+@@ -114,6 +114,8 @@ extern unsigned int dns_zone_mkey_hour;
+ extern unsigned int dns_zone_mkey_day;
+ extern unsigned int dns_zone_mkey_month;
+ 
++extern size_t dns_adb_addrslimit;
++
+ static bool want_stats = false;
+ static char program_name[NAME_MAX] = "named";
+ static char absolute_conffile[PATH_MAX];
+@@ -805,6 +807,13 @@ parse_T_opt(char *option) {
+ 		transferstuck = true;
+ 	} else if (!strncmp(option, "tat=", 4)) {
+ 		named_g_tat_interval = atoi(option + 4);
++	} else if (!strncmp(option, "adbaddrslimit=", 14)) {
++		size_t adb_addrslimit = atoi(option + 14);
++		if (adb_addrslimit < 1) {
++			named_main_earlyfatal("adbaddrslimit must be at "
++					      "least 1");
++		}
++		dns_adb_addrslimit = adb_addrslimit;
+ 	} else {
+ 		fprintf(stderr, "unknown -T flag '%s'\n", option);
+ 	}
+diff --git a/lib/dns/adb.c b/lib/dns/adb.c
+index 6ff9069a47..31b489e04a 100644
+--- a/lib/dns/adb.c
++++ b/lib/dns/adb.c
+@@ -86,6 +86,15 @@
+ 
+ #define DNS_ADB_MINADBSIZE (1024U * 1024U) /*%< 1 Megabyte */
+ 
++/*
++ * Default and override for the per-find address limit, the sum of the number of
++ * A and AAAA RR from an ADB NS name resolution.  When non-zero, this value is
++ * used instead of the default.  Can be set via 'named -T adbaddrslimit=N' for
++ * testing.
++ */
++#define DEFAULT_ADDRSLIMIT 6
++size_t dns_adb_addrslimit = 0;
++
+ typedef ISC_LIST(dns_adbname_t) dns_adbnamelist_t;
+ typedef struct dns_adbnamehook dns_adbnamehook_t;
+ typedef ISC_LIST(dns_adbnamehook_t) dns_adbnamehooklist_t;
+@@ -2200,6 +2209,9 @@ copy_namehook_lists(dns_adb_t *adb, dns_adbfind_t *find,
+ 	dns_adbaddrinfo_t *addrinfo;
+ 	dns_adbentry_t *entry;
+ 	int bucket;
++	size_t count = 0;
++	size_t limit = dns_adb_addrslimit != 0 ? dns_adb_addrslimit
++					       : DEFAULT_ADDRSLIMIT;
+ 
+ 	bucket = DNS_ADB_INVALIDBUCKET;
+ 
+@@ -2232,6 +2244,13 @@ copy_namehook_lists(dns_adb_t *adb, dns_adbfind_t *find,
+ 			inc_entry_refcnt(adb, entry, false);
+ 			ISC_LIST_APPEND(find->list, addrinfo, publink);
+ 			addrinfo = NULL;
++
++			if (++count >= limit) {
++				DP(ISC_LOG_DEBUG(3), "skipping addresses");
++				UNLOCK(&adb->entrylocks[bucket]);
++				return;
++			}
++
+ 		nextv4:
+ 			UNLOCK(&adb->entrylocks[bucket]);
+ 			bucket = DNS_ADB_INVALIDBUCKET;
+@@ -2267,6 +2286,13 @@ copy_namehook_lists(dns_adb_t *adb, dns_adbfind_t *find,
+ 			inc_entry_refcnt(adb, entry, false);
+ 			ISC_LIST_APPEND(find->list, addrinfo, publink);
+ 			addrinfo = NULL;
++
++			if (++count >= limit) {
++				DP(ISC_LOG_DEBUG(3), "skipping addresses");
++				UNLOCK(&adb->entrylocks[bucket]);
++				return;
++			}
++
+ 		nextv6:
+ 			UNLOCK(&adb->entrylocks[bucket]);
+ 			bucket = DNS_ADB_INVALIDBUCKET;
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind/CVE-2026-3592_p2.patch new file +334 -0

334 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-3592_p3.patch new file +629 -0

629 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-3592_p4.patch new file +891 -0

891 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-3592_p5.patch new file +554 -0

554 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-3592_p6.patch new file +41 -0

41 lines not on this page · raw message

meta/recipes-connectivity/bind/bind_9.18.44.bb +6 -0
index d55e0e0c4d..dd8923f185 100644
@@ -26,6 +26,12 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \
            file://CVE-2026-5950_p1.patch \
            file://CVE-2026-5950_p2.patch \
            file://CVE-2026-5950_p3.patch \
+           file://CVE-2026-3592_p1.patch \
+           file://CVE-2026-3592_p2.patch \
+           file://CVE-2026-3592_p3.patch \
+           file://CVE-2026-3592_p4.patch \
+           file://CVE-2026-3592_p5.patch \
+           file://CVE-2026-3592_p6.patch \
            "
 
 SRC_URI[sha256sum] = "81f5035a25c576af1a93f0061cf70bde6d00a0c7bd1274abf73f5b5389a6f82d"
Signature · 1 line
2.35.6
#3 lore raw

PATCH 4/5 bind: Ignore CVE-2026-3039

In reply to Ashishkumar Parmar X (asparmar - E INFOCHIPS PRIVATE LIMITED at Cisco)

From: Ashishkumar Parmar <[email protected]>

Analysis:
- CVE-2026-3039 affects BIND servers using TKEY-based authentication via GSS-API tokens [1].
- This recipe configures BIND with --with-gssapi=no, so the vulnerable GSS-API TKEY negotiation path is disabled [2].
- Hence ignoring the CVE for this build configuration.

Reference:
[1] https://kb.isc.org/docs/cve-2026-3039
[2] meta/recipes-connectivity/bind/bind_9.18.44.bb

---
 meta/recipes-connectivity/bind/bind_9.18.44.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-connectivity/bind/bind_9.18.44.bb +1 -0
index dd8923f185..7b5baf5338 100644
@@ -43,6 +43,7 @@ UPSTREAM_CHECK_REGEX = "(?P<pver>9.(\d*[02468])+(\.\d+)+(-P\d+)*)/"
 # Issue only affects dhcpd with recent bind versions. We don't ship dhcpd anymore
 # so the issue doesn't affect us.
 CVE_STATUS[CVE-2019-6470] = "not-applicable-config: Issue only affects dhcpd with recent bind versions and we don't ship dhcpd anymore."
+CVE_STATUS[CVE-2026-3039] = "not-applicable-config: BIND is built with --with-gssapi=no, so GSS-API TKEY negotiation is disabled."
 
 inherit autotools update-rc.d systemd useradd pkgconfig multilib_header update-alternatives
 
Signature · 1 line
2.35.6
#4 lore raw

PATCH 5/5 bind: Fix CVE-2026-5946

In reply to Ashishkumar Parmar X (asparmar - E INFOCHIPS PRIVATE LIMITED at Cisco)

From: Ashishkumar Parmar <[email protected]>

Pick the upstream 9.18 backport [1] for CVE-2026-5946. The public ISC advisory [2] describes the vulnerability and identifies the fixed BIND release.

The upstream fix is split across prerequisite ownership/update helpers, non-IN class handling changes, and system-test coverage. Apply the dependent patches first because later patches use MOVE_OWNERSHIP() and the updated DNS UPDATE ownership flow:

- CVE-2026-5946-dependent_p1.patch [3] adds the MOVE_OWNERSHIP() helper used by the following update-path prerequisite.
- CVE-2026-5946-dependent_p2.patch [4] fixes DNS UPDATE SSU table ownership handling and depends on MOVE_OWNERSHIP().
- CVE-2026-5946_p1.patch [5] disables recursion for non-IN classes.
- CVE-2026-5946_p2.patch [6] disables UPDATE and NOTIFY for non-IN classes.
- CVE-2026-5946_p3.patch [7] validates DNS message CLASS early in request processing.
- CVE-2026-5946_p4.patch [8] rejects meta-classes in UPDATE and NOTIFY messages.
- CVE-2026-5946_p5.patch [9] skips deny-answer-address handling for non-IN addresses.
- CVE-2026-5946_p6.patch [10] tests CHAOS view recursion behavior.
- CVE-2026-5946_p7.patch [11] tests UPDATE behavior in CHAOS and other non-IN classes.
- CVE-2026-5946_p8.patch [12] tests server behavior for different UPDATE requests.
- CVE-2026-5946_p9.patch [13] makes the RD flag optional in isctest.query() for the test coverage above.

Keep the patches split to preserve the upstream commit structure and to make the SRC_URI ordering explicit.

[1] https://gitlab.com/isc-projects/bind9/-/commit/7ce6ce37b1b04af0953ed2d3211587465085600e
[2] https://kb.isc.org/docs/cve-2026-5946
[3] https://gitlab.com/isc-projects/bind9/-/commit/8a0a0b01ff00d51509cf7e9ee8ca7bd076ba7b28
[4] https://gitlab.com/isc-projects/bind9/-/commit/f6fdc77c4699db4e54165e1759e7bf3d639b30cb
[5] https://gitlab.com/isc-projects/bind9/-/commit/401a6374b026afb76a7b22acc4a1402d21a7e77b
[6] https://gitlab.com/isc-projects/bind9/-/commit/04092ed136c8a6db2b1059dcd32693d57a7bdc24
[7] https://gitlab.com/isc-projects/bind9/-/commit/b247dbb3506ef628a683d184fbc6a99fad45ed94
[8] https://gitlab.com/isc-projects/bind9/-/commit/185c10981b941bfa5b753b3624b6e11ccca8737f
[9] https://gitlab.com/isc-projects/bind9/-/commit/772d1d5f905c819d7155e76a08c33218bfcc973e
[10] https://gitlab.com/isc-projects/bind9/-/commit/ba6b159d880e803decb85fdc88280b23d6f3a652
[11] https://gitlab.com/isc-projects/bind9/-/commit/e5b3149b70ed24f7590b6bc08aad4492a00c2022
[12] https://gitlab.com/isc-projects/bind9/-/commit/7e3d49815c3b8243b009c29955cef018fe87b7f0
[13] https://gitlab.com/isc-projects/bind9/-/commit/d79f2d3f35887ea4525e283d389d9078fa1ef439

---
 .../bind/CVE-2026-5946-dependent_p1.patch     |  39 ++
 .../bind/CVE-2026-5946-dependent_p2.patch     |  78 ++++
 .../bind/bind/CVE-2026-5946_p1.patch          | 216 +++++++++++
 .../bind/bind/CVE-2026-5946_p2.patch          | 244 +++++++++++++
 .../bind/bind/CVE-2026-5946_p3.patch          | 169 +++++++++
 .../bind/bind/CVE-2026-5946_p4.patch          |  56 +++
 .../bind/bind/CVE-2026-5946_p5.patch          |  40 +++
 .../bind/bind/CVE-2026-5946_p6.patch          | 336 ++++++++++++++++++
 .../bind/bind/CVE-2026-5946_p7.patch          | 153 ++++++++
 .../bind/bind/CVE-2026-5946_p8.patch          | 225 ++++++++++++
 .../bind/bind/CVE-2026-5946_p9.patch          |  44 +++
 .../recipes-connectivity/bind/bind_9.18.44.bb |  11 +
 12 files changed, 1611 insertions(+)
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5946-dependent_p1.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5946-dependent_p2.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5946_p1.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5946_p2.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5946_p3.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5946_p4.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5946_p5.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5946_p6.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5946_p7.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5946_p8.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-5946_p9.patch
meta/recipes-connectivity/bind/bind/CVE-2026-5946-dependent_p1.patch new file +39 -0
new file mode 100644
index 0000000000..68ad96da85
@@ -0,0 +1,39 @@
+From 8a0a0b01ff00d51509cf7e9ee8ca7bd076ba7b28 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <[email protected]>
+Date: Fri, 20 Mar 2026 02:15:17 +0100
+Subject: [PATCH] Add MOVE_OWNERSHIP() macro for transferring pointer ownership
+
+A helper macro that returns the current value of a pointer and sets
+it to NULL in one expression, useful for transferring ownership in
+designated initializers.
+
+CVE: CVE-2026-5946
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/8a0a0b01ff00d51509cf7e9ee8ca7bd076ba7b28]
+
+(cherry picked from commit 8a0a0b01ff00d51509cf7e9ee8ca7bd076ba7b28)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ lib/isc/include/isc/util.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/lib/isc/include/isc/util.h b/lib/isc/include/isc/util.h
+index 2d507c3f7e..222dac56bc 100644
+--- a/lib/isc/include/isc/util.h
++++ b/lib/isc/include/isc/util.h
+@@ -47,6 +47,13 @@
+  *** General Macros.
+  ***/
+ 
++#define MOVE_OWNERSHIP(source)                             \
++	({                                                 \
++		__typeof__(source) __ownership = (source); \
++		(source) = NULL;                           \
++		__ownership;                               \
++	})
++
+ /*%
+  * Use this to hide unused function arguments.
+  * \code
+-- 
+GitLab
+
meta/recipes-connectivity/bind/bind/CVE-2026-5946-dependent_p2.patch new file +78 -0

78 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-5946_p1.patch new file +216 -0

216 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-5946_p2.patch new file +244 -0

244 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-5946_p3.patch new file +169 -0

169 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-5946_p4.patch new file +56 -0

56 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-5946_p5.patch new file +40 -0
new file mode 100644
index 0000000000..59bd66d345
@@ -0,0 +1,40 @@
+From 544f128439772cd710e541df1e1081c308642533 Mon Sep 17 00:00:00 2001
+From: Evan Hunt <[email protected]>
+Date: Tue, 17 Mar 2026 13:24:43 -0700
+Subject: [PATCH] Skip "deny-answer-address" for non-IN addresses
+
+Ensure that we don't attempt an ACL match for answer addresses
+when handling a class-CHAOS zone. This is an additional line of
+defense for YWH-PGM40640-74.
+
+CVE: CVE-2026-5946
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/772d1d5f905c819d7155e76a08c33218bfcc973e]
+
+(cherry picked from commit e62673c765b52307c800e86f0185fe52b573c145)
+(cherry picked from commit 772d1d5f905c819d7155e76a08c33218bfcc973e)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ lib/dns/resolver.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
+index c1584c3399..7788171bf2 100644
+--- a/lib/dns/resolver.c
++++ b/lib/dns/resolver.c
+@@ -7333,6 +7333,13 @@ is_answeraddress_allowed(dns_view_t *view, dns_name_t *name,
+ 		}
+ 	}
+ 
++	/*
++	 * deny-answer-address doesn't apply to non-IN classes.
++	 */
++	if (rdataset->rdclass != dns_rdataclass_in) {
++		return true;
++	}
++
+ 	/*
+ 	 * Otherwise, search the filter list for a match for each
+ 	 * address record.  If a match is found, the address should be
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind/CVE-2026-5946_p6.patch new file +336 -0

336 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-5946_p7.patch new file +153 -0

153 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-5946_p8.patch new file +225 -0

225 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/CVE-2026-5946_p9.patch new file +44 -0

44 lines not on this page · raw message

meta/recipes-connectivity/bind/bind_9.18.44.bb +11 -0
index 7b5baf5338..42651fca4e 100644
@@ -32,6 +32,17 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \
            file://CVE-2026-3592_p4.patch \
            file://CVE-2026-3592_p5.patch \
            file://CVE-2026-3592_p6.patch \
+           file://CVE-2026-5946-dependent_p1.patch \
+           file://CVE-2026-5946-dependent_p2.patch \
+           file://CVE-2026-5946_p1.patch \
+           file://CVE-2026-5946_p2.patch \
+           file://CVE-2026-5946_p3.patch \
+           file://CVE-2026-5946_p4.patch \
+           file://CVE-2026-5946_p5.patch \
+           file://CVE-2026-5946_p6.patch \
+           file://CVE-2026-5946_p7.patch \
+           file://CVE-2026-5946_p8.patch \
+           file://CVE-2026-5946_p9.patch \
            "
 
 SRC_URI[sha256sum] = "81f5035a25c576af1a93f0061cf70bde6d00a0c7bd1274abf73f5b5389a6f82d"
Signature · 1 line
2.35.6
#5 lore raw
In reply to Ashishkumar Parmar X (asparmar - E INFOCHIPS PRIVATE LIMITED at Cisco)
Quoted 5 lines · On Wed Jun 10, 2026 at 12:04 PM CEST, Ashishkumar Parmar X (asparmar - E…

From: Ashishkumar Parmar <[email protected]>

Pick the upstream 9.18 backport [1] for CVE-2026-1519. The public ISC advisory [2] describes the vulnerability and identifies the fixed BIND release.

Hello,

I have not checked but bind is one of those rare project to have a stable branch that match our stable policy (I've already taken some upgrades).

Instead of backporting CVE patches, why not trying to upgrade along the 9.18 branch?

Quoted 769 lines

The upstream fix is split across the reproducer and validation commits. Also include one prerequisite NSEC3 bounds-check commit that is required before the validation changes can be applied cleanly and validated safely on the downstream 9.18.44 source:

- CVE-2026-1519_p1.patch [3] adds the upstream system-test reproducer for excessive NSEC3 iterations at delegation.
- CVE-2026-1519-dependent.patch [4] adds the prerequisite NSEC3 next_length bounds check in isdelegation(). This patch is not part of the CVE merge commit, but it touches the same NSEC3 delegation path and must be applied before the functional validation changes.
- CVE-2026-1519_p2.patch [5] adds the iteration-limit handling in isdelegation().
- CVE-2026-1519_p3.patch [6] avoids re-validating already trusted rdatasets.
- CVE-2026-1519_p4.patch [7] checks RRset trust in validate_neg_rrset().

Keep the patches split to preserve the upstream commit structure and to make the SRC_URI ordering explicit.

[1] https://gitlab.com/isc-projects/bind9/-/commit/5ef459eeaa92222ad28d2186f5eae9a586dece70
[2] https://kb.isc.org/docs/cve-2026-1519
[3] https://gitlab.com/isc-projects/bind9/-/commit/2c82f99a3c95f356861d5977f12ef9bbe2063cb6
[4] https://gitlab.com/isc-projects/bind9/-/commit/368c75a9f567f8b36cf24fefe45023e0a050e47b
[5] https://gitlab.com/isc-projects/bind9/-/commit/85c21feff9acb0982fe60f2c88201bf55533bd0e
[6] https://gitlab.com/isc-projects/bind9/-/commit/8890a91c1c16129333139b9d8a4381e0f741f0d6
[7] https://gitlab.com/isc-projects/bind9/-/commit/85fcd704e2f7cc2a25d2195bc4bb28398c889ed3

---
 .../bind/bind/CVE-2026-1519-dependent.patch   |  50 +++
 .../bind/bind/CVE-2026-1519_p1.patch          | 341 ++++++++++++++++++
 .../bind/bind/CVE-2026-1519_p2.patch          | 176 +++++++++
 .../bind/bind/CVE-2026-1519_p3.patch          |  52 +++
 .../bind/bind/CVE-2026-1519_p4.patch          |  59 +++
 .../recipes-connectivity/bind/bind_9.18.44.bb |   5 +
 6 files changed, 683 insertions(+)
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519-dependent.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519_p1.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519_p2.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519_p3.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519_p4.patch
meta/recipes-connectivity/bind/bind/CVE-2026-1519-dependent.patch new file +50 -0
new file mode 100644
index 0000000000..eff7a06d82
@@ -0,0 +1,50 @@
+From af8929ebe72ca8564882632e59999795c781ebd4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <[email protected]>
+Date: Sat, 14 Feb 2026 14:43:41 +0100
+Subject: [PATCH] Invalid NSEC3 can cause OOB read of the isdelegation() stack
+
+When .next_length is longer than NSEC3_MAX_HASH_LENGTH, it causes a
+harmless out-of-bound read of the isdelegation() stack. This patch
+fixes the issue by skipping NSEC3 records with an oversized hash length
+during validation.
+
+CVE: CVE-2026-1519
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/368c75a9f567f8b36cf24fefe45023e0a050e47b]
+
+(cherry picked from commit 67b4fb56e40bf856e1fccd41e752d5f486b5b569)
+(cherry picked from commit 368c75a9f567f8b36cf24fefe45023e0a050e47b)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ lib/dns/rdata/generic/nsec3_50.c | 1 +
+ lib/dns/validator.c              | 3 +++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/lib/dns/rdata/generic/nsec3_50.c b/lib/dns/rdata/generic/nsec3_50.c
+index f45fe4dc33..e04587bd1b 100644
+--- a/lib/dns/rdata/generic/nsec3_50.c
++++ b/lib/dns/rdata/generic/nsec3_50.c
+@@ -324,6 +324,7 @@ tostruct_nsec3(ARGS_TOSTRUCT) {
+ 	}
+ 
+ 	nsec3->mctx = mctx;
++
+ 	return ISC_R_SUCCESS;
+ 
+ cleanup:
+diff --git a/lib/dns/validator.c b/lib/dns/validator.c
+index 809b7be911..9ec13581ab 100644
+--- a/lib/dns/validator.c
++++ b/lib/dns/validator.c
+@@ -339,6 +339,9 @@ trynsec3:
+ 			if (nsec3.hash != 1) {
+ 				continue;
+ 			}
++			if (nsec3.next_length > NSEC3_MAX_HASH_LENGTH) {
++				continue;
++			}
+ 			length = isc_iterated_hash(
+ 				hash, nsec3.hash, nsec3.iterations, nsec3.salt,
+ 				nsec3.salt_length, name->ndata, name->length);
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind/CVE-2026-1519_p1.patch new file +341 -0
new file mode 100644
index 0000000000..f78af9da11
@@ -0,0 +1,341 @@
+From 81f8acc4bdf84eec6f53a65709b61ad3d963b4f7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nicki=20K=C5=99=C3=AD=C5=BEek?= <[email protected]>
+Date: Tue, 3 Feb 2026 18:25:04 +0100
+Subject: [PATCH] Reproducer for CVE-2026-1519
+
+When a validating resolver processes a delegation from a DNSSEC-signed
+zone which uses too many NSEC3 iterations, it should cease the attempt
+to validate due to an NSEC3 iteration limit being exceeded and fall back
+to insecure.
+
+CVE: CVE-2026-1519
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/2c82f99a3c95f356861d5977f12ef9bbe2063cb6]
+
+(cherry picked from commit 9bc14a89f1313aa38330e84674ac3b7691db3383)
+(cherry picked from commit 2c82f99a3c95f356861d5977f12ef9bbe2063cb6)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ .../system/nsec3-delegation/ns1/named.conf.j2 | 35 +++++++++++
+ bin/tests/system/nsec3-delegation/ns1/root.db | 25 ++++++++
+ .../ns2/iter-too-many.db.j2.manual            | 31 ++++++++++
+ .../system/nsec3-delegation/ns2/named.conf.j2 | 40 ++++++++++++
+ .../nsec3-delegation/ns2/sub.iter-too-many.db | 24 ++++++++
+ .../system/nsec3-delegation/ns3/named.conf.j2 | 37 +++++++++++
+ .../nsec3-delegation/ns3/trusted.conf.j2      |  1 +
+ .../tests_excessive_nsec3_iterations.py       | 61 +++++++++++++++++++
+ 8 files changed, 254 insertions(+)
+ create mode 100644 bin/tests/system/nsec3-delegation/ns1/named.conf.j2
+ create mode 100644 bin/tests/system/nsec3-delegation/ns1/root.db
+ create mode 100644 bin/tests/system/nsec3-delegation/ns2/iter-too-many.db.j2.manual
+ create mode 100644 bin/tests/system/nsec3-delegation/ns2/named.conf.j2
+ create mode 100644 bin/tests/system/nsec3-delegation/ns2/sub.iter-too-many.db
+ create mode 100644 bin/tests/system/nsec3-delegation/ns3/named.conf.j2
+ create mode 120000 bin/tests/system/nsec3-delegation/ns3/trusted.conf.j2
+ create mode 100644 bin/tests/system/nsec3-delegation/tests_excessive_nsec3_iterations.py
+
+diff --git a/bin/tests/system/nsec3-delegation/ns1/named.conf.j2 b/bin/tests/system/nsec3-delegation/ns1/named.conf.j2
+new file mode 100644
+index 0000000000..65016d1c67
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns1/named.conf.j2
+@@ -0,0 +1,35 @@
++/*
++ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++ *
++ * SPDX-License-Identifier: MPL-2.0
++ *
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0.  If a copy of the MPL was not distributed with this
++ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
++ *
++ * See the COPYRIGHT file distributed with this work for additional
++ * information regarding copyright ownership.
++ */
++
++options {
++	query-source address 10.53.0.1;
++	notify-source 10.53.0.1;
++	transfer-source 10.53.0.1;
++	port @PORT@;
++	pid-file "named.pid";
++	listen-on { 10.53.0.1; };
++	listen-on-v6 { none; };
++	recursion no;
++	dnssec-validation no;
++};
++
++controls {
++	inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
++};
++
++include "../../_common/rndc.key";
++
++zone "." {
++	type primary;
++	file "root.db";
++};
+diff --git a/bin/tests/system/nsec3-delegation/ns1/root.db b/bin/tests/system/nsec3-delegation/ns1/root.db
+new file mode 100644
+index 0000000000..c3f80d0d4b
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns1/root.db
+@@ -0,0 +1,25 @@
++; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++;
++; SPDX-License-Identifier: MPL-2.0
++;
++; This Source Code Form is subject to the terms of the Mozilla Public
++; License, v. 2.0.  If a copy of the MPL was not distributed with this
++; file, you can obtain one at https://mozilla.org/MPL/2.0/.
++;
++; See the COPYRIGHT file distributed with this work for additional
++; information regarding copyright ownership.
++
++$TTL 300
++.			IN SOA	. . (
++				2025063000	; serial
++				600		; refresh
++				600		; retry
++				1200		; expire
++				600		; minimum
++				)
++.			NS	a.root-servers.nil.
++
++a.root-servers.nil	A	10.53.0.1
++
++iter-too-many.		NS	ns2.iter-too-many.
++ns2.iter-too-many.	A	10.53.0.2
+diff --git a/bin/tests/system/nsec3-delegation/ns2/iter-too-many.db.j2.manual b/bin/tests/system/nsec3-delegation/ns2/iter-too-many.db.j2.manual
+new file mode 100644
+index 0000000000..fa5023d21b
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns2/iter-too-many.db.j2.manual
+@@ -0,0 +1,31 @@
++; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++;
++; SPDX-License-Identifier: MPL-2.0
++;
++; This Source Code Form is subject to the terms of the Mozilla Public
++; License, v. 2.0.  If a copy of the MPL was not distributed with this
++; file, you can obtain one at https://mozilla.org/MPL/2.0/.
++;
++; See the COPYRIGHT file distributed with this work for additional
++; information regarding copyright ownership.
++
++{% raw %}
++$TTL 300
++@			IN SOA	ns2.iter-too-many. hostmaster.iter-too-many. (
++				2026020300	; serial
++				20		; refresh (20 seconds)
++				20		; retry (20 seconds)
++				1814400		; expire (3 weeks)
++				3600		; minimum (1 hour)
++)
++
++@	IN	NS	ns2.iter-too-many.
++ns2	IN	A	10.53.0.2
++
++sub	IN	NS	ns2.sub.iter-too-many.
++ns2.sub	IN	A	10.53.0.2
++{% endraw %}
++
++{% for dnskey in dnskeys %}
++@dnskey@
++{% endfor %}
+diff --git a/bin/tests/system/nsec3-delegation/ns2/named.conf.j2 b/bin/tests/system/nsec3-delegation/ns2/named.conf.j2
+new file mode 100644
+index 0000000000..2f4823574f
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns2/named.conf.j2
+@@ -0,0 +1,40 @@
++/*
++ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++ *
++ * SPDX-License-Identifier: MPL-2.0
++ *
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0.  If a copy of the MPL was not distributed with this
++ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
++ *
++ * See the COPYRIGHT file distributed with this work for additional
++ * information regarding copyright ownership.
++ */
++
++options {
++	query-source address 10.53.0.2;
++	notify-source 10.53.0.2;
++	transfer-source 10.53.0.2;
++	port @PORT@;
++	pid-file "named.pid";
++	listen-on { 10.53.0.2; };
++	listen-on-v6 { none; };
++	recursion no;
++	dnssec-validation no;
++};
++
++controls {
++	inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
++};
++
++include "../../_common/rndc.key";
++
++zone "iter-too-many" {
++	type primary;
++	file "iter-too-many.signed.db";
++};
++
++zone "sub.iter-too-many" {
++	type primary;
++	file "sub.iter-too-many.db";
++};
+diff --git a/bin/tests/system/nsec3-delegation/ns2/sub.iter-too-many.db b/bin/tests/system/nsec3-delegation/ns2/sub.iter-too-many.db
+new file mode 100644
+index 0000000000..09b2bb6fb3
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns2/sub.iter-too-many.db
+@@ -0,0 +1,24 @@
++; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++;
++; SPDX-License-Identifier: MPL-2.0
++;
++; This Source Code Form is subject to the terms of the Mozilla Public
++; License, v. 2.0.  If a copy of the MPL was not distributed with this
++; file, you can obtain one at https://mozilla.org/MPL/2.0/.
++;
++; See the COPYRIGHT file distributed with this work for additional
++; information regarding copyright ownership.
++
++$TTL 300
++@			IN SOA	ns2.sub.iter-too-many. hostmaster.sub.iter-too-many. (
++				2026020300	; serial
++				20		; refresh (20 seconds)
++				20		; retry (20 seconds)
++				1814400		; expire (3 weeks)
++				3600		; minimum (1 hour)
++)
++
++@	IN	NS	ns2.sub.iter-too-many.
++ns2	IN	A	10.53.0.2
++
++example	IN	A	127.0.0.1
+diff --git a/bin/tests/system/nsec3-delegation/ns3/named.conf.j2 b/bin/tests/system/nsec3-delegation/ns3/named.conf.j2
+new file mode 100644
+index 0000000000..e36b88c53e
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns3/named.conf.j2
+@@ -0,0 +1,37 @@
++/*
++ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++ *
++ * SPDX-License-Identifier: MPL-2.0
++ *
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0.  If a copy of the MPL was not distributed with this
++ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
++ *
++ * See the COPYRIGHT file distributed with this work for additional
++ * information regarding copyright ownership.
++ */
++
++options {
++	query-source address 10.53.0.3;
++	notify-source 10.53.0.3;
++	transfer-source 10.53.0.3;
++	port @PORT@;
++	pid-file "named.pid";
++	listen-on { 10.53.0.3; };
++	listen-on-v6 { none; };
++	recursion yes;
++	dnssec-validation yes;
++};
++
++controls {
++	inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
++};
++
++include "../../_common/rndc.key";
++
++zone "." {
++	type hint;
++	file "../../_common/root.hint";
++};
++
++include "trusted.conf";
+diff --git a/bin/tests/system/nsec3-delegation/ns3/trusted.conf.j2 b/bin/tests/system/nsec3-delegation/ns3/trusted.conf.j2
+new file mode 120000
+index 0000000000..cb0be77b22
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns3/trusted.conf.j2
+@@ -0,0 +1 @@
++../../_common/trusted.conf.j2
+\ No newline at end of file
+diff --git a/bin/tests/system/nsec3-delegation/tests_excessive_nsec3_iterations.py b/bin/tests/system/nsec3-delegation/tests_excessive_nsec3_iterations.py
+new file mode 100644
+index 0000000000..f85384bb1e
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/tests_excessive_nsec3_iterations.py
+@@ -0,0 +1,61 @@
++# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++#
++# SPDX-License-Identifier: MPL-2.0
++#
++# This Source Code Form is subject to the terms of the Mozilla Public
++# License, v. 2.0.  If a copy of the MPL was not distributed with this
++# file, you can obtain one at https://mozilla.org/MPL/2.0/.
++#
++# See the COPYRIGHT file distributed with this work for additional
++# information regarding copyright ownership.
++
++from isctest.run import EnvCmd
++
++import isctest
++
++
++def bootstrap():
++    templates = isctest.template.TemplateEngine(".")
++    keygen = EnvCmd("KEYGEN", "-a ECDSA256")
++    signer = EnvCmd("SIGNER")
++
++    isctest.log.info("setup iter-too-many.")
++    zonename = "iter-too-many."
++    ksk_name = keygen(f"-f KSK {zonename}", cwd="ns2").out.strip()
++    zsk_name = keygen(f"{zonename}", cwd="ns2").out.strip()
++    ksk = isctest.kasp.Key(ksk_name, keydir="ns2")
++    zsk = isctest.kasp.Key(zsk_name, keydir="ns2")
++    dnskeys = [ksk.dnskey, zsk.dnskey]
++
++    tdata = {
++        "dnskeys": dnskeys,
++    }
++    templates.render(f"ns2/{zonename}db", tdata, template=f"ns2/{zonename}db.j2.manual")
++    signer(
++        f"-P -o {zonename} -f {zonename}signed.db -3 A1B2C3D4 -H too-many -H 151 -S {zonename}db",
++        cwd="ns2",
++    )
++
++    return {
++        "trust_anchors": [
++            ksk.into_ta("static-key"),
++        ],
++    }
++
++
++def test_excessive_nsec3_iterations_delegation(ns3):
++    # reproducer for CVE-2026-1519 [GL#5708]
++    zone = "example.sub.iter-too-many"
++    msg = isctest.query.create(zone, "A")
++    res = isctest.query.tcp(msg, ns3.ip)
++
++    # an insecure response is expected regardless of the NSEC3 iteration limit,
++    # because the sub.iter-too-many. zone is unsigned. the real difference is
++    # in the CPU usage required for generating such response, but that can't be
++    # easily and reliably tested in an automated fashion
++    isctest.check.noerror(res)
++
++    with ns3.watch_log_from_start() as watcher:
++        watcher.wait_for_line(
++            f"validating {zone}/A: validator_callback_ds: too many iterations"
++        )
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind/CVE-2026-1519_p2.patch new file +176 -0
new file mode 100644
index 0000000000..ee033b4b91
@@ -0,0 +1,176 @@
+From e77c45ddae1ca87058244978868b6489610ca136 Mon Sep 17 00:00:00 2001
+From: Matthijs Mekking <[email protected]>
+Date: Tue, 3 Mar 2026 10:40:36 +0100
+Subject: [PATCH] Check iterations in isdelegation()
+
+When looking up an NSEC3 as part of an insecurity proof, check the
+number of iterations. If this is too high, treat the answer as insecure
+by marking the answer with trust level "answer", indicating that they
+did not validate, but could be cached as insecure.
+
+CVE: CVE-2026-1519
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/85c21feff9acb0982fe60f2c88201bf55533bd0e]
+
+(cherry picked from commit 988040a5e02f86f4a8cdb0704e8d501f9082a89c)
+(cherry picked from commit 85c21feff9acb0982fe60f2c88201bf55533bd0e)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ lib/dns/validator.c | 64 +++++++++++++++++++++++++++++++++------------
+ 1 file changed, 48 insertions(+), 16 deletions(-)
+
+diff --git a/lib/dns/validator.c b/lib/dns/validator.c
+index 9ec13581ab..179b6590b5 100644
+--- a/lib/dns/validator.c
++++ b/lib/dns/validator.c
+@@ -256,12 +256,25 @@ exit_check(dns_validator_t *val) {
+ }
+ 
+ /*%
+- * Look in the NSEC record returned from a DS query to see if there is
+- * a NS RRset at this name.  If it is found we are at a delegation point.
++ * The isdelegation() function is called as part of seeking the DS record.
++ * Look in the NSEC or NSEC3 record returned from a DS query to see if the
++ * record has the NS bitmap set. If so, we are at a delegation point.
++ *
++ * If the response contains NSEC3 records with too high iterations, we cannot
++ * (or rather we are not going to) validate the insecurity proof. Instead we
++ * are going to treat the message as insecure and just assume the DS was at
++ * the delegation.
++ *
++ * Returns:
++ *\li	#ISC_R_SUCCESS	the NS bitmap was set in the NSEC or NSEC3 record, or
++ *			the NSEC3 covers the name (in case of opt-out), or
++ *			we cannot validate the insecurity proof and are going
++ *			to treat the message as isnecure.
++ *\li	#ISC_R_NOTFOUND the NS bitmap was not set,
+  */
+-static bool
+-isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
+-	     isc_result_t dbresult) {
++static isc_result_t
++isdelegation(dns_validator_t *val, dns_name_t *name, dns_rdataset_t *rdataset,
++	     isc_result_t dbresult, const char *caller) {
+ 	dns_fixedname_t fixed;
+ 	dns_label_t hashlabel;
+ 	dns_name_t nsec3name;
+@@ -289,7 +302,7 @@ isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
+ 			goto trynsec3;
+ 		}
+ 		if (result != ISC_R_SUCCESS) {
+-			return false;
++			return ISC_R_NOTFOUND;
+ 		}
+ 	}
+ 
+@@ -303,7 +316,7 @@ isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
+ 		dns_rdata_reset(&rdata);
+ 	}
+ 	dns_rdataset_disassociate(&set);
+-	return found;
++	return found ? ISC_R_SUCCESS : ISC_R_NOTFOUND;
+ 
+ trynsec3:
+ 	/*
+@@ -342,6 +355,18 @@ trynsec3:
+ 			if (nsec3.next_length > NSEC3_MAX_HASH_LENGTH) {
+ 				continue;
+ 			}
++			/*
++			 * If there are too many iterations assume bad things
++			 * are happening and bail out early. Treat as if the
++			 * DS was at the delegation.
++			 */
++			if (nsec3.iterations > DNS_NSEC3_MAXITERATIONS) {
++				validator_log(val, ISC_LOG_DEBUG(3),
++					      "%s: too many iterations",
++					      caller);
++				dns_rdataset_disassociate(&set);
++				return ISC_R_SUCCESS;
++			}
+ 			length = isc_iterated_hash(
+ 				hash, nsec3.hash, nsec3.iterations, nsec3.salt,
+ 				nsec3.salt_length, name->ndata, name->length);
+@@ -353,7 +378,7 @@ trynsec3:
+ 				found = dns_nsec3_typepresent(&rdata,
+ 							      dns_rdatatype_ns);
+ 				dns_rdataset_disassociate(&set);
+-				return found;
++				return found ? ISC_R_SUCCESS : ISC_R_NOTFOUND;
+ 			}
+ 			if ((nsec3.flags & DNS_NSEC3FLAG_OPTOUT) == 0) {
+ 				continue;
+@@ -369,12 +394,12 @@ trynsec3:
+ 			      memcmp(hash, nsec3.next, length) < 0)))
+ 			{
+ 				dns_rdataset_disassociate(&set);
+-				return true;
++				return ISC_R_SUCCESS;
+ 			}
+ 		}
+ 		dns_rdataset_disassociate(&set);
+ 	}
+-	return found;
++	return found ? ISC_R_SUCCESS : ISC_R_NOTFOUND;
+ }
+ 
+ /*%
+@@ -590,8 +615,9 @@ fetch_callback_ds(isc_task_t *task, isc_event_t *event) {
+ 		} else if (eresult == DNS_R_SERVFAIL) {
+ 			goto unexpected;
+ 		} else if (eresult != DNS_R_CNAME &&
+-			   isdelegation(devent->foundname, &val->frdataset,
+-					eresult))
++			   isdelegation(val, devent->foundname, &val->frdataset,
++					eresult,
++					"fetch_callback_ds") == ISC_R_SUCCESS)
+ 		{
+ 			/*
+ 			 * Failed to find a DS while trying to prove
+@@ -755,10 +781,13 @@ validator_callback_ds(isc_task_t *task, isc_event_t *event) {
+ 			      dns_trust_totext(val->frdataset.trust));
+ 		have_dsset = (val->frdataset.type == dns_rdatatype_ds);
+ 		name = dns_fixedname_name(&val->fname);
++
+ 		if ((val->attributes & VALATTR_INSECURITY) != 0 &&
+ 		    val->frdataset.covers == dns_rdatatype_ds &&
+ 		    NEGATIVE(&val->frdataset) &&
+-		    isdelegation(name, &val->frdataset, DNS_R_NCACHENXRRSET))
++		    isdelegation(val, name, &val->frdataset,
++				 DNS_R_NCACHENXRRSET,
++				 "validator_callback_ds") == ISC_R_SUCCESS)
+ 		{
+ 			result = markanswer(val, "validator_callback_ds",
+ 					    "no DS and this is a delegation");
+@@ -2590,7 +2619,8 @@ validate_nx(dns_validator_t *val, bool resume) {
+ 			result = findnsec3proofs(val);
+ 			if (result == DNS_R_NSEC3ITERRANGE) {
+ 				validator_log(val, ISC_LOG_DEBUG(3),
+-					      "too many iterations");
++					      "%s: too many iterations",
++					      __func__);
+ 				markanswer(val, "validate_nx (3)", NULL);
+ 				return ISC_R_SUCCESS;
+ 			}
+@@ -2626,7 +2656,7 @@ validate_nx(dns_validator_t *val, bool resume) {
+ 		result = findnsec3proofs(val);
+ 		if (result == DNS_R_NSEC3ITERRANGE) {
+ 			validator_log(val, ISC_LOG_DEBUG(3),
+-				      "too many iterations");
++				      "%s: too many iterations", __func__);
+ 			markanswer(val, "validate_nx (4)", NULL);
+ 			return ISC_R_SUCCESS;
+ 		}
+@@ -2833,7 +2863,9 @@ seek_ds(dns_validator_t *val, isc_result_t *resp) {
+ 			return ISC_R_COMPLETE;
+ 		}
+ 
+-		if (isdelegation(tname, &val->frdataset, result)) {
++		result = isdelegation(val, tname, &val->frdataset, result,
++				      "seek_ds");
++		if (result == ISC_R_SUCCESS) {
+ 			*resp = markanswer(val, "seek_ds (3)",
+ 					   "this is a delegation");
+ 			return ISC_R_COMPLETE;
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind/CVE-2026-1519_p3.patch new file +52 -0
new file mode 100644
index 0000000000..0473f40752
@@ -0,0 +1,52 @@
+From 87c7c1aa7c648f15d57810afb198db709aa08ad3 Mon Sep 17 00:00:00 2001
+From: Matthijs Mekking <[email protected]>
+Date: Tue, 3 Mar 2026 11:17:25 +0100
+Subject: [PATCH] Don't verify already trusted rdatasets
+
+If we already marked an rdataset as secure (or it has even stronger
+trust), there is no need to cryptographically verify it again.
+
+CVE: CVE-2026-1519
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/8890a91c1c16129333139b9d8a4381e0f741f0d6]
+
+(cherry picked from commit 0ec08c212022d08c9717f2bc6bd3e8ebd6f034ce)
+(cherry picked from commit 8890a91c1c16129333139b9d8a4381e0f741f0d6)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ lib/dns/include/dns/types.h | 1 +
+ lib/dns/validator.c         | 7 +++++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/lib/dns/include/dns/types.h b/lib/dns/include/dns/types.h
+index 8ddcbeb4e2..bd9623058a 100644
+--- a/lib/dns/include/dns/types.h
++++ b/lib/dns/include/dns/types.h
+@@ -352,6 +352,7 @@ enum {
+ 	((x) == dns_trust_additional || (x) == dns_trust_pending_additional)
+ #define DNS_TRUST_GLUE(x)   ((x) == dns_trust_glue)
+ #define DNS_TRUST_ANSWER(x) ((x) == dns_trust_answer)
++#define DNS_TRUST_SECURE(x) ((x) >= dns_trust_secure)
+ 
+ /*%
+  * Name checking severities.
+diff --git a/lib/dns/validator.c b/lib/dns/validator.c
+index 179b6590b5..47efd3940f 100644
+--- a/lib/dns/validator.c
++++ b/lib/dns/validator.c
+@@ -1523,6 +1523,13 @@ verify(dns_validator_t *val, dst_key_t *key, dns_rdata_t *rdata,
+ 	bool ignore = false;
+ 	dns_name_t *wild;
+ 
++	if (DNS_TRUST_SECURE(val->event->rdataset->trust)) {
++		/*
++		 * This RRset was already verified before.
++		 */
++		return ISC_R_SUCCESS;
++	}
++
+ 	val->attributes |= VALATTR_TRIEDVERIFY;
+ 	wild = dns_fixedname_initname(&fixed);
+ again:
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind/CVE-2026-1519_p4.patch new file +59 -0
new file mode 100644
index 0000000000..fd5d1afcd7
@@ -0,0 +1,59 @@
+From 52b1997275768884d46c648b40f2ea625c386d17 Mon Sep 17 00:00:00 2001
+From: Matthijs Mekking <[email protected]>
+Date: Tue, 3 Mar 2026 11:43:23 +0100
+Subject: [PATCH] Check RRset trust in validate_neg_rrset()
+
+In many places we only create a validator if the RRset has too low
+trust (the RRset is pending validation, or could not be validated
+before). This check was missing prior to validating negative response
+data.
+
+CVE: CVE-2026-1519
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/85fcd704e2f7cc2a25d2195bc4bb28398c889ed3]
+
+(cherry picked from commit 6ca67f65cd685cf8699540a852c1e3775bd48d64)
+(cherry picked from commit 85fcd704e2f7cc2a25d2195bc4bb28398c889ed3)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ lib/dns/validator.c | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/lib/dns/validator.c b/lib/dns/validator.c
+index 47efd3940f..7db102062b 100644
+--- a/lib/dns/validator.c
++++ b/lib/dns/validator.c
+@@ -2463,6 +2463,17 @@ validate_neg_rrset(dns_validator_t *val, dns_name_t *name,
+ 		}
+ 	}
+ 
++	if (rdataset->type != dns_rdatatype_nsec &&
++	    DNS_TRUST_SECURE(rdataset->trust))
++	{
++		/*
++		 * The negative response data is already verified.
++		 * We skip NSEC records, because they require special
++		 * processing in validator_callback_nsec().
++		 */
++		return DNS_R_CONTINUE;
++	}
++
+ 	val->currentset = rdataset;
+ 	result = create_validator(val, name, rdataset->type, rdataset,
+ 				  sigrdataset, validator_callback_nsec,
+@@ -2573,11 +2584,9 @@ validate_ncache(dns_validator_t *val, bool resume) {
+ 		}
+ 
+ 		result = validate_neg_rrset(val, name, rdataset, sigrdataset);
+-		if (result == DNS_R_CONTINUE) {
+-			continue;
++		if (result != DNS_R_CONTINUE) {
++			return result;
+ 		}
+-
+-		return result;
+ 	}
+ 	if (result == ISC_R_NOMORE) {
+ 		result = ISC_R_SUCCESS;
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind_9.18.44.bb +5 -0
index d424edcb4e..9c8b73dccc 100644
@@ -18,6 +18,11 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \
            file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
            file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \
            file://0001-avoid-start-failure-with-bind-user.patch \
+           file://CVE-2026-1519_p1.patch \
+           file://CVE-2026-1519-dependent.patch \
+           file://CVE-2026-1519_p2.patch \
+           file://CVE-2026-1519_p3.patch \
+           file://CVE-2026-1519_p4.patch \
            "
 
 SRC_URI[sha256sum] = "81f5035a25c576af1a93f0061cf70bde6d00a0c7bd1274abf73f5b5389a6f82d"
Signature · 2 lines
Yoann Congal
Smile ECS
#6 lore raw
Quoted 7 lines · Yoann Congal
Quoted 5 lines · On Wed Jun 10, 2026 at 12:04 PM CEST, Ashishkumar Parmar X (asparmar - E…

From: Ashishkumar Parmar <[email protected]>

Pick the upstream 9.18 backport [1] for CVE-2026-1519. The public ISC advisory [2] describes the vulnerability and identifies the fixed BIND release.

Quoted 7 lines

Hello,

I have not checked but bind is one of those rare project to have a stable branch that match our stable policy (I've already taken some upgrades).

Instead of backporting CVE patches, why not trying to upgrade along the 9.18 branch?

Hello,

This whole series is now superseded by
https://patchwork.yoctoproject.org/project/oe-core/patch/[email protected]/

Thanks!

Quoted 770 lines
Quoted 770 lines

The upstream fix is split across the reproducer and validation commits. Also include one prerequisite NSEC3 bounds-check commit that is required before the validation changes can be applied cleanly and validated safely on the downstream 9.18.44 source:

- CVE-2026-1519_p1.patch [3] adds the upstream system-test reproducer for excessive NSEC3 iterations at delegation.
- CVE-2026-1519-dependent.patch [4] adds the prerequisite NSEC3 next_length bounds check in isdelegation(). This patch is not part of the CVE merge commit, but it touches the same NSEC3 delegation path and must be applied before the functional validation changes.
- CVE-2026-1519_p2.patch [5] adds the iteration-limit handling in isdelegation().
- CVE-2026-1519_p3.patch [6] avoids re-validating already trusted rdatasets.
- CVE-2026-1519_p4.patch [7] checks RRset trust in validate_neg_rrset().

Keep the patches split to preserve the upstream commit structure and to make the SRC_URI ordering explicit.

[1] https://gitlab.com/isc-projects/bind9/-/commit/5ef459eeaa92222ad28d2186f5eae9a586dece70
[2] https://kb.isc.org/docs/cve-2026-1519
[3] https://gitlab.com/isc-projects/bind9/-/commit/2c82f99a3c95f356861d5977f12ef9bbe2063cb6
[4] https://gitlab.com/isc-projects/bind9/-/commit/368c75a9f567f8b36cf24fefe45023e0a050e47b
[5] https://gitlab.com/isc-projects/bind9/-/commit/85c21feff9acb0982fe60f2c88201bf55533bd0e
[6] https://gitlab.com/isc-projects/bind9/-/commit/8890a91c1c16129333139b9d8a4381e0f741f0d6
[7] https://gitlab.com/isc-projects/bind9/-/commit/85fcd704e2f7cc2a25d2195bc4bb28398c889ed3

---
 .../bind/bind/CVE-2026-1519-dependent.patch   |  50 +++
 .../bind/bind/CVE-2026-1519_p1.patch          | 341 ++++++++++++++++++
 .../bind/bind/CVE-2026-1519_p2.patch          | 176 +++++++++
 .../bind/bind/CVE-2026-1519_p3.patch          |  52 +++
 .../bind/bind/CVE-2026-1519_p4.patch          |  59 +++
 .../recipes-connectivity/bind/bind_9.18.44.bb |   5 +
 6 files changed, 683 insertions(+)
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519-dependent.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519_p1.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519_p2.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519_p3.patch
 create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-1519_p4.patch
meta/recipes-connectivity/bind/bind/CVE-2026-1519-dependent.patch new file +50 -0
new file mode 100644
index 0000000000..eff7a06d82
@@ -0,0 +1,50 @@
+From af8929ebe72ca8564882632e59999795c781ebd4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <[email protected]>
+Date: Sat, 14 Feb 2026 14:43:41 +0100
+Subject: [PATCH] Invalid NSEC3 can cause OOB read of the isdelegation() stack
+
+When .next_length is longer than NSEC3_MAX_HASH_LENGTH, it causes a
+harmless out-of-bound read of the isdelegation() stack. This patch
+fixes the issue by skipping NSEC3 records with an oversized hash length
+during validation.
+
+CVE: CVE-2026-1519
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/368c75a9f567f8b36cf24fefe45023e0a050e47b]
+
+(cherry picked from commit 67b4fb56e40bf856e1fccd41e752d5f486b5b569)
+(cherry picked from commit 368c75a9f567f8b36cf24fefe45023e0a050e47b)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ lib/dns/rdata/generic/nsec3_50.c | 1 +
+ lib/dns/validator.c              | 3 +++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/lib/dns/rdata/generic/nsec3_50.c b/lib/dns/rdata/generic/nsec3_50.c
+index f45fe4dc33..e04587bd1b 100644
+--- a/lib/dns/rdata/generic/nsec3_50.c
++++ b/lib/dns/rdata/generic/nsec3_50.c
+@@ -324,6 +324,7 @@ tostruct_nsec3(ARGS_TOSTRUCT) {
+ 	}
+ 
+ 	nsec3->mctx = mctx;
++
+ 	return ISC_R_SUCCESS;
+ 
+ cleanup:
+diff --git a/lib/dns/validator.c b/lib/dns/validator.c
+index 809b7be911..9ec13581ab 100644
+--- a/lib/dns/validator.c
++++ b/lib/dns/validator.c
+@@ -339,6 +339,9 @@ trynsec3:
+ 			if (nsec3.hash != 1) {
+ 				continue;
+ 			}
++			if (nsec3.next_length > NSEC3_MAX_HASH_LENGTH) {
++				continue;
++			}
+ 			length = isc_iterated_hash(
+ 				hash, nsec3.hash, nsec3.iterations, nsec3.salt,
+ 				nsec3.salt_length, name->ndata, name->length);
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind/CVE-2026-1519_p1.patch new file +341 -0
new file mode 100644
index 0000000000..f78af9da11
@@ -0,0 +1,341 @@
+From 81f8acc4bdf84eec6f53a65709b61ad3d963b4f7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nicki=20K=C5=99=C3=AD=C5=BEek?= <[email protected]>
+Date: Tue, 3 Feb 2026 18:25:04 +0100
+Subject: [PATCH] Reproducer for CVE-2026-1519
+
+When a validating resolver processes a delegation from a DNSSEC-signed
+zone which uses too many NSEC3 iterations, it should cease the attempt
+to validate due to an NSEC3 iteration limit being exceeded and fall back
+to insecure.
+
+CVE: CVE-2026-1519
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/2c82f99a3c95f356861d5977f12ef9bbe2063cb6]
+
+(cherry picked from commit 9bc14a89f1313aa38330e84674ac3b7691db3383)
+(cherry picked from commit 2c82f99a3c95f356861d5977f12ef9bbe2063cb6)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ .../system/nsec3-delegation/ns1/named.conf.j2 | 35 +++++++++++
+ bin/tests/system/nsec3-delegation/ns1/root.db | 25 ++++++++
+ .../ns2/iter-too-many.db.j2.manual            | 31 ++++++++++
+ .../system/nsec3-delegation/ns2/named.conf.j2 | 40 ++++++++++++
+ .../nsec3-delegation/ns2/sub.iter-too-many.db | 24 ++++++++
+ .../system/nsec3-delegation/ns3/named.conf.j2 | 37 +++++++++++
+ .../nsec3-delegation/ns3/trusted.conf.j2      |  1 +
+ .../tests_excessive_nsec3_iterations.py       | 61 +++++++++++++++++++
+ 8 files changed, 254 insertions(+)
+ create mode 100644 bin/tests/system/nsec3-delegation/ns1/named.conf.j2
+ create mode 100644 bin/tests/system/nsec3-delegation/ns1/root.db
+ create mode 100644 bin/tests/system/nsec3-delegation/ns2/iter-too-many.db.j2.manual
+ create mode 100644 bin/tests/system/nsec3-delegation/ns2/named.conf.j2
+ create mode 100644 bin/tests/system/nsec3-delegation/ns2/sub.iter-too-many.db
+ create mode 100644 bin/tests/system/nsec3-delegation/ns3/named.conf.j2
+ create mode 120000 bin/tests/system/nsec3-delegation/ns3/trusted.conf.j2
+ create mode 100644 bin/tests/system/nsec3-delegation/tests_excessive_nsec3_iterations.py
+
+diff --git a/bin/tests/system/nsec3-delegation/ns1/named.conf.j2 b/bin/tests/system/nsec3-delegation/ns1/named.conf.j2
+new file mode 100644
+index 0000000000..65016d1c67
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns1/named.conf.j2
+@@ -0,0 +1,35 @@
++/*
++ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++ *
++ * SPDX-License-Identifier: MPL-2.0
++ *
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0.  If a copy of the MPL was not distributed with this
++ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
++ *
++ * See the COPYRIGHT file distributed with this work for additional
++ * information regarding copyright ownership.
++ */
++
++options {
++	query-source address 10.53.0.1;
++	notify-source 10.53.0.1;
++	transfer-source 10.53.0.1;
++	port @PORT@;
++	pid-file "named.pid";
++	listen-on { 10.53.0.1; };
++	listen-on-v6 { none; };
++	recursion no;
++	dnssec-validation no;
++};
++
++controls {
++	inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
++};
++
++include "../../_common/rndc.key";
++
++zone "." {
++	type primary;
++	file "root.db";
++};
+diff --git a/bin/tests/system/nsec3-delegation/ns1/root.db b/bin/tests/system/nsec3-delegation/ns1/root.db
+new file mode 100644
+index 0000000000..c3f80d0d4b
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns1/root.db
+@@ -0,0 +1,25 @@
++; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++;
++; SPDX-License-Identifier: MPL-2.0
++;
++; This Source Code Form is subject to the terms of the Mozilla Public
++; License, v. 2.0.  If a copy of the MPL was not distributed with this
++; file, you can obtain one at https://mozilla.org/MPL/2.0/.
++;
++; See the COPYRIGHT file distributed with this work for additional
++; information regarding copyright ownership.
++
++$TTL 300
++.			IN SOA	. . (
++				2025063000	; serial
++				600		; refresh
++				600		; retry
++				1200		; expire
++				600		; minimum
++				)
++.			NS	a.root-servers.nil.
++
++a.root-servers.nil	A	10.53.0.1
++
++iter-too-many.		NS	ns2.iter-too-many.
++ns2.iter-too-many.	A	10.53.0.2
+diff --git a/bin/tests/system/nsec3-delegation/ns2/iter-too-many.db.j2.manual b/bin/tests/system/nsec3-delegation/ns2/iter-too-many.db.j2.manual
+new file mode 100644
+index 0000000000..fa5023d21b
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns2/iter-too-many.db.j2.manual
+@@ -0,0 +1,31 @@
++; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++;
++; SPDX-License-Identifier: MPL-2.0
++;
++; This Source Code Form is subject to the terms of the Mozilla Public
++; License, v. 2.0.  If a copy of the MPL was not distributed with this
++; file, you can obtain one at https://mozilla.org/MPL/2.0/.
++;
++; See the COPYRIGHT file distributed with this work for additional
++; information regarding copyright ownership.
++
++{% raw %}
++$TTL 300
++@			IN SOA	ns2.iter-too-many. hostmaster.iter-too-many. (
++				2026020300	; serial
++				20		; refresh (20 seconds)
++				20		; retry (20 seconds)
++				1814400		; expire (3 weeks)
++				3600		; minimum (1 hour)
++)
++
++@	IN	NS	ns2.iter-too-many.
++ns2	IN	A	10.53.0.2
++
++sub	IN	NS	ns2.sub.iter-too-many.
++ns2.sub	IN	A	10.53.0.2
++{% endraw %}
++
++{% for dnskey in dnskeys %}
++@dnskey@
++{% endfor %}
+diff --git a/bin/tests/system/nsec3-delegation/ns2/named.conf.j2 b/bin/tests/system/nsec3-delegation/ns2/named.conf.j2
+new file mode 100644
+index 0000000000..2f4823574f
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns2/named.conf.j2
+@@ -0,0 +1,40 @@
++/*
++ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++ *
++ * SPDX-License-Identifier: MPL-2.0
++ *
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0.  If a copy of the MPL was not distributed with this
++ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
++ *
++ * See the COPYRIGHT file distributed with this work for additional
++ * information regarding copyright ownership.
++ */
++
++options {
++	query-source address 10.53.0.2;
++	notify-source 10.53.0.2;
++	transfer-source 10.53.0.2;
++	port @PORT@;
++	pid-file "named.pid";
++	listen-on { 10.53.0.2; };
++	listen-on-v6 { none; };
++	recursion no;
++	dnssec-validation no;
++};
++
++controls {
++	inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
++};
++
++include "../../_common/rndc.key";
++
++zone "iter-too-many" {
++	type primary;
++	file "iter-too-many.signed.db";
++};
++
++zone "sub.iter-too-many" {
++	type primary;
++	file "sub.iter-too-many.db";
++};
+diff --git a/bin/tests/system/nsec3-delegation/ns2/sub.iter-too-many.db b/bin/tests/system/nsec3-delegation/ns2/sub.iter-too-many.db
+new file mode 100644
+index 0000000000..09b2bb6fb3
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns2/sub.iter-too-many.db
+@@ -0,0 +1,24 @@
++; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++;
++; SPDX-License-Identifier: MPL-2.0
++;
++; This Source Code Form is subject to the terms of the Mozilla Public
++; License, v. 2.0.  If a copy of the MPL was not distributed with this
++; file, you can obtain one at https://mozilla.org/MPL/2.0/.
++;
++; See the COPYRIGHT file distributed with this work for additional
++; information regarding copyright ownership.
++
++$TTL 300
++@			IN SOA	ns2.sub.iter-too-many. hostmaster.sub.iter-too-many. (
++				2026020300	; serial
++				20		; refresh (20 seconds)
++				20		; retry (20 seconds)
++				1814400		; expire (3 weeks)
++				3600		; minimum (1 hour)
++)
++
++@	IN	NS	ns2.sub.iter-too-many.
++ns2	IN	A	10.53.0.2
++
++example	IN	A	127.0.0.1
+diff --git a/bin/tests/system/nsec3-delegation/ns3/named.conf.j2 b/bin/tests/system/nsec3-delegation/ns3/named.conf.j2
+new file mode 100644
+index 0000000000..e36b88c53e
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns3/named.conf.j2
+@@ -0,0 +1,37 @@
++/*
++ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++ *
++ * SPDX-License-Identifier: MPL-2.0
++ *
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0.  If a copy of the MPL was not distributed with this
++ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
++ *
++ * See the COPYRIGHT file distributed with this work for additional
++ * information regarding copyright ownership.
++ */
++
++options {
++	query-source address 10.53.0.3;
++	notify-source 10.53.0.3;
++	transfer-source 10.53.0.3;
++	port @PORT@;
++	pid-file "named.pid";
++	listen-on { 10.53.0.3; };
++	listen-on-v6 { none; };
++	recursion yes;
++	dnssec-validation yes;
++};
++
++controls {
++	inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
++};
++
++include "../../_common/rndc.key";
++
++zone "." {
++	type hint;
++	file "../../_common/root.hint";
++};
++
++include "trusted.conf";
+diff --git a/bin/tests/system/nsec3-delegation/ns3/trusted.conf.j2 b/bin/tests/system/nsec3-delegation/ns3/trusted.conf.j2
+new file mode 120000
+index 0000000000..cb0be77b22
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/ns3/trusted.conf.j2
+@@ -0,0 +1 @@
++../../_common/trusted.conf.j2
+\ No newline at end of file
+diff --git a/bin/tests/system/nsec3-delegation/tests_excessive_nsec3_iterations.py b/bin/tests/system/nsec3-delegation/tests_excessive_nsec3_iterations.py
+new file mode 100644
+index 0000000000..f85384bb1e
+--- /dev/null
++++ b/bin/tests/system/nsec3-delegation/tests_excessive_nsec3_iterations.py
+@@ -0,0 +1,61 @@
++# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
++#
++# SPDX-License-Identifier: MPL-2.0
++#
++# This Source Code Form is subject to the terms of the Mozilla Public
++# License, v. 2.0.  If a copy of the MPL was not distributed with this
++# file, you can obtain one at https://mozilla.org/MPL/2.0/.
++#
++# See the COPYRIGHT file distributed with this work for additional
++# information regarding copyright ownership.
++
++from isctest.run import EnvCmd
++
++import isctest
++
++
++def bootstrap():
++    templates = isctest.template.TemplateEngine(".")
++    keygen = EnvCmd("KEYGEN", "-a ECDSA256")
++    signer = EnvCmd("SIGNER")
++
++    isctest.log.info("setup iter-too-many.")
++    zonename = "iter-too-many."
++    ksk_name = keygen(f"-f KSK {zonename}", cwd="ns2").out.strip()
++    zsk_name = keygen(f"{zonename}", cwd="ns2").out.strip()
++    ksk = isctest.kasp.Key(ksk_name, keydir="ns2")
++    zsk = isctest.kasp.Key(zsk_name, keydir="ns2")
++    dnskeys = [ksk.dnskey, zsk.dnskey]
++
++    tdata = {
++        "dnskeys": dnskeys,
++    }
++    templates.render(f"ns2/{zonename}db", tdata, template=f"ns2/{zonename}db.j2.manual")
++    signer(
++        f"-P -o {zonename} -f {zonename}signed.db -3 A1B2C3D4 -H too-many -H 151 -S {zonename}db",
++        cwd="ns2",
++    )
++
++    return {
++        "trust_anchors": [
++            ksk.into_ta("static-key"),
++        ],
++    }
++
++
++def test_excessive_nsec3_iterations_delegation(ns3):
++    # reproducer for CVE-2026-1519 [GL#5708]
++    zone = "example.sub.iter-too-many"
++    msg = isctest.query.create(zone, "A")
++    res = isctest.query.tcp(msg, ns3.ip)
++
++    # an insecure response is expected regardless of the NSEC3 iteration limit,
++    # because the sub.iter-too-many. zone is unsigned. the real difference is
++    # in the CPU usage required for generating such response, but that can't be
++    # easily and reliably tested in an automated fashion
++    isctest.check.noerror(res)
++
++    with ns3.watch_log_from_start() as watcher:
++        watcher.wait_for_line(
++            f"validating {zone}/A: validator_callback_ds: too many iterations"
++        )
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind/CVE-2026-1519_p2.patch new file +176 -0
new file mode 100644
index 0000000000..ee033b4b91
@@ -0,0 +1,176 @@
+From e77c45ddae1ca87058244978868b6489610ca136 Mon Sep 17 00:00:00 2001
+From: Matthijs Mekking <[email protected]>
+Date: Tue, 3 Mar 2026 10:40:36 +0100
+Subject: [PATCH] Check iterations in isdelegation()
+
+When looking up an NSEC3 as part of an insecurity proof, check the
+number of iterations. If this is too high, treat the answer as insecure
+by marking the answer with trust level "answer", indicating that they
+did not validate, but could be cached as insecure.
+
+CVE: CVE-2026-1519
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/85c21feff9acb0982fe60f2c88201bf55533bd0e]
+
+(cherry picked from commit 988040a5e02f86f4a8cdb0704e8d501f9082a89c)
+(cherry picked from commit 85c21feff9acb0982fe60f2c88201bf55533bd0e)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ lib/dns/validator.c | 64 +++++++++++++++++++++++++++++++++------------
+ 1 file changed, 48 insertions(+), 16 deletions(-)
+
+diff --git a/lib/dns/validator.c b/lib/dns/validator.c
+index 9ec13581ab..179b6590b5 100644
+--- a/lib/dns/validator.c
++++ b/lib/dns/validator.c
+@@ -256,12 +256,25 @@ exit_check(dns_validator_t *val) {
+ }
+ 
+ /*%
+- * Look in the NSEC record returned from a DS query to see if there is
+- * a NS RRset at this name.  If it is found we are at a delegation point.
++ * The isdelegation() function is called as part of seeking the DS record.
++ * Look in the NSEC or NSEC3 record returned from a DS query to see if the
++ * record has the NS bitmap set. If so, we are at a delegation point.
++ *
++ * If the response contains NSEC3 records with too high iterations, we cannot
++ * (or rather we are not going to) validate the insecurity proof. Instead we
++ * are going to treat the message as insecure and just assume the DS was at
++ * the delegation.
++ *
++ * Returns:
++ *\li	#ISC_R_SUCCESS	the NS bitmap was set in the NSEC or NSEC3 record, or
++ *			the NSEC3 covers the name (in case of opt-out), or
++ *			we cannot validate the insecurity proof and are going
++ *			to treat the message as isnecure.
++ *\li	#ISC_R_NOTFOUND the NS bitmap was not set,
+  */
+-static bool
+-isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
+-	     isc_result_t dbresult) {
++static isc_result_t
++isdelegation(dns_validator_t *val, dns_name_t *name, dns_rdataset_t *rdataset,
++	     isc_result_t dbresult, const char *caller) {
+ 	dns_fixedname_t fixed;
+ 	dns_label_t hashlabel;
+ 	dns_name_t nsec3name;
+@@ -289,7 +302,7 @@ isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
+ 			goto trynsec3;
+ 		}
+ 		if (result != ISC_R_SUCCESS) {
+-			return false;
++			return ISC_R_NOTFOUND;
+ 		}
+ 	}
+ 
+@@ -303,7 +316,7 @@ isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
+ 		dns_rdata_reset(&rdata);
+ 	}
+ 	dns_rdataset_disassociate(&set);
+-	return found;
++	return found ? ISC_R_SUCCESS : ISC_R_NOTFOUND;
+ 
+ trynsec3:
+ 	/*
+@@ -342,6 +355,18 @@ trynsec3:
+ 			if (nsec3.next_length > NSEC3_MAX_HASH_LENGTH) {
+ 				continue;
+ 			}
++			/*
++			 * If there are too many iterations assume bad things
++			 * are happening and bail out early. Treat as if the
++			 * DS was at the delegation.
++			 */
++			if (nsec3.iterations > DNS_NSEC3_MAXITERATIONS) {
++				validator_log(val, ISC_LOG_DEBUG(3),
++					      "%s: too many iterations",
++					      caller);
++				dns_rdataset_disassociate(&set);
++				return ISC_R_SUCCESS;
++			}
+ 			length = isc_iterated_hash(
+ 				hash, nsec3.hash, nsec3.iterations, nsec3.salt,
+ 				nsec3.salt_length, name->ndata, name->length);
+@@ -353,7 +378,7 @@ trynsec3:
+ 				found = dns_nsec3_typepresent(&rdata,
+ 							      dns_rdatatype_ns);
+ 				dns_rdataset_disassociate(&set);
+-				return found;
++				return found ? ISC_R_SUCCESS : ISC_R_NOTFOUND;
+ 			}
+ 			if ((nsec3.flags & DNS_NSEC3FLAG_OPTOUT) == 0) {
+ 				continue;
+@@ -369,12 +394,12 @@ trynsec3:
+ 			      memcmp(hash, nsec3.next, length) < 0)))
+ 			{
+ 				dns_rdataset_disassociate(&set);
+-				return true;
++				return ISC_R_SUCCESS;
+ 			}
+ 		}
+ 		dns_rdataset_disassociate(&set);
+ 	}
+-	return found;
++	return found ? ISC_R_SUCCESS : ISC_R_NOTFOUND;
+ }
+ 
+ /*%
+@@ -590,8 +615,9 @@ fetch_callback_ds(isc_task_t *task, isc_event_t *event) {
+ 		} else if (eresult == DNS_R_SERVFAIL) {
+ 			goto unexpected;
+ 		} else if (eresult != DNS_R_CNAME &&
+-			   isdelegation(devent->foundname, &val->frdataset,
+-					eresult))
++			   isdelegation(val, devent->foundname, &val->frdataset,
++					eresult,
++					"fetch_callback_ds") == ISC_R_SUCCESS)
+ 		{
+ 			/*
+ 			 * Failed to find a DS while trying to prove
+@@ -755,10 +781,13 @@ validator_callback_ds(isc_task_t *task, isc_event_t *event) {
+ 			      dns_trust_totext(val->frdataset.trust));
+ 		have_dsset = (val->frdataset.type == dns_rdatatype_ds);
+ 		name = dns_fixedname_name(&val->fname);
++
+ 		if ((val->attributes & VALATTR_INSECURITY) != 0 &&
+ 		    val->frdataset.covers == dns_rdatatype_ds &&
+ 		    NEGATIVE(&val->frdataset) &&
+-		    isdelegation(name, &val->frdataset, DNS_R_NCACHENXRRSET))
++		    isdelegation(val, name, &val->frdataset,
++				 DNS_R_NCACHENXRRSET,
++				 "validator_callback_ds") == ISC_R_SUCCESS)
+ 		{
+ 			result = markanswer(val, "validator_callback_ds",
+ 					    "no DS and this is a delegation");
+@@ -2590,7 +2619,8 @@ validate_nx(dns_validator_t *val, bool resume) {
+ 			result = findnsec3proofs(val);
+ 			if (result == DNS_R_NSEC3ITERRANGE) {
+ 				validator_log(val, ISC_LOG_DEBUG(3),
+-					      "too many iterations");
++					      "%s: too many iterations",
++					      __func__);
+ 				markanswer(val, "validate_nx (3)", NULL);
+ 				return ISC_R_SUCCESS;
+ 			}
+@@ -2626,7 +2656,7 @@ validate_nx(dns_validator_t *val, bool resume) {
+ 		result = findnsec3proofs(val);
+ 		if (result == DNS_R_NSEC3ITERRANGE) {
+ 			validator_log(val, ISC_LOG_DEBUG(3),
+-				      "too many iterations");
++				      "%s: too many iterations", __func__);
+ 			markanswer(val, "validate_nx (4)", NULL);
+ 			return ISC_R_SUCCESS;
+ 		}
+@@ -2833,7 +2863,9 @@ seek_ds(dns_validator_t *val, isc_result_t *resp) {
+ 			return ISC_R_COMPLETE;
+ 		}
+ 
+-		if (isdelegation(tname, &val->frdataset, result)) {
++		result = isdelegation(val, tname, &val->frdataset, result,
++				      "seek_ds");
++		if (result == ISC_R_SUCCESS) {
+ 			*resp = markanswer(val, "seek_ds (3)",
+ 					   "this is a delegation");
+ 			return ISC_R_COMPLETE;
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind/CVE-2026-1519_p3.patch new file +52 -0
new file mode 100644
index 0000000000..0473f40752
@@ -0,0 +1,52 @@
+From 87c7c1aa7c648f15d57810afb198db709aa08ad3 Mon Sep 17 00:00:00 2001
+From: Matthijs Mekking <[email protected]>
+Date: Tue, 3 Mar 2026 11:17:25 +0100
+Subject: [PATCH] Don't verify already trusted rdatasets
+
+If we already marked an rdataset as secure (or it has even stronger
+trust), there is no need to cryptographically verify it again.
+
+CVE: CVE-2026-1519
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/8890a91c1c16129333139b9d8a4381e0f741f0d6]
+
+(cherry picked from commit 0ec08c212022d08c9717f2bc6bd3e8ebd6f034ce)
+(cherry picked from commit 8890a91c1c16129333139b9d8a4381e0f741f0d6)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ lib/dns/include/dns/types.h | 1 +
+ lib/dns/validator.c         | 7 +++++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/lib/dns/include/dns/types.h b/lib/dns/include/dns/types.h
+index 8ddcbeb4e2..bd9623058a 100644
+--- a/lib/dns/include/dns/types.h
++++ b/lib/dns/include/dns/types.h
+@@ -352,6 +352,7 @@ enum {
+ 	((x) == dns_trust_additional || (x) == dns_trust_pending_additional)
+ #define DNS_TRUST_GLUE(x)   ((x) == dns_trust_glue)
+ #define DNS_TRUST_ANSWER(x) ((x) == dns_trust_answer)
++#define DNS_TRUST_SECURE(x) ((x) >= dns_trust_secure)
+ 
+ /*%
+  * Name checking severities.
+diff --git a/lib/dns/validator.c b/lib/dns/validator.c
+index 179b6590b5..47efd3940f 100644
+--- a/lib/dns/validator.c
++++ b/lib/dns/validator.c
+@@ -1523,6 +1523,13 @@ verify(dns_validator_t *val, dst_key_t *key, dns_rdata_t *rdata,
+ 	bool ignore = false;
+ 	dns_name_t *wild;
+ 
++	if (DNS_TRUST_SECURE(val->event->rdataset->trust)) {
++		/*
++		 * This RRset was already verified before.
++		 */
++		return ISC_R_SUCCESS;
++	}
++
+ 	val->attributes |= VALATTR_TRIEDVERIFY;
+ 	wild = dns_fixedname_initname(&fixed);
+ again:
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind/CVE-2026-1519_p4.patch new file +59 -0
new file mode 100644
index 0000000000..fd5d1afcd7
@@ -0,0 +1,59 @@
+From 52b1997275768884d46c648b40f2ea625c386d17 Mon Sep 17 00:00:00 2001
+From: Matthijs Mekking <[email protected]>
+Date: Tue, 3 Mar 2026 11:43:23 +0100
+Subject: [PATCH] Check RRset trust in validate_neg_rrset()
+
+In many places we only create a validator if the RRset has too low
+trust (the RRset is pending validation, or could not be validated
+before). This check was missing prior to validating negative response
+data.
+
+CVE: CVE-2026-1519
+Upstream-Status: Backport [https://gitlab.com/isc-projects/bind9/-/commit/85fcd704e2f7cc2a25d2195bc4bb28398c889ed3]
+
+(cherry picked from commit 6ca67f65cd685cf8699540a852c1e3775bd48d64)
+(cherry picked from commit 85fcd704e2f7cc2a25d2195bc4bb28398c889ed3)
+Signed-off-by: Ashishkumar Parmar <[email protected]>
+---
+ lib/dns/validator.c | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/lib/dns/validator.c b/lib/dns/validator.c
+index 47efd3940f..7db102062b 100644
+--- a/lib/dns/validator.c
++++ b/lib/dns/validator.c
+@@ -2463,6 +2463,17 @@ validate_neg_rrset(dns_validator_t *val, dns_name_t *name,
+ 		}
+ 	}
+ 
++	if (rdataset->type != dns_rdatatype_nsec &&
++	    DNS_TRUST_SECURE(rdataset->trust))
++	{
++		/*
++		 * The negative response data is already verified.
++		 * We skip NSEC records, because they require special
++		 * processing in validator_callback_nsec().
++		 */
++		return DNS_R_CONTINUE;
++	}
++
+ 	val->currentset = rdataset;
+ 	result = create_validator(val, name, rdataset->type, rdataset,
+ 				  sigrdataset, validator_callback_nsec,
+@@ -2573,11 +2584,9 @@ validate_ncache(dns_validator_t *val, bool resume) {
+ 		}
+ 
+ 		result = validate_neg_rrset(val, name, rdataset, sigrdataset);
+-		if (result == DNS_R_CONTINUE) {
+-			continue;
++		if (result != DNS_R_CONTINUE) {
++			return result;
+ 		}
+-
+-		return result;
+ 	}
+ 	if (result == ISC_R_NOMORE) {
+ 		result = ISC_R_SUCCESS;
+-- 
+2.35.6
+
meta/recipes-connectivity/bind/bind_9.18.44.bb +5 -0
index d424edcb4e..9c8b73dccc 100644
@@ -18,6 +18,11 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \
            file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
            file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \
            file://0001-avoid-start-failure-with-bind-user.patch \
+           file://CVE-2026-1519_p1.patch \
+           file://CVE-2026-1519-dependent.patch \
+           file://CVE-2026-1519_p2.patch \
+           file://CVE-2026-1519_p3.patch \
+           file://CVE-2026-1519_p4.patch \
            "
 
 SRC_URI[sha256sum] = "81f5035a25c576af1a93f0061cf70bde6d00a0c7bd1274abf73f5b5389a6f82d"
Signature · 2 lines
Yoann Congal
Smile ECS