Skip to content

Commit eab8ce4

Browse files
Merge PR "[AUTO-CHERRYPICK] [AutoPR- Security] Patch bind for CVE-2026-1519 [HIGH] - branch main" #16862
Co-authored-by: Azure Linux Security Servicing Account <azurelinux-security@microsoft.com>
1 parent aea447e commit eab8ce4

2 files changed

Lines changed: 284 additions & 1 deletion

File tree

SPECS/bind/CVE-2026-1519.patch

Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
From cc92db37659144dccc482cb88533a741929712a7 Mon Sep 17 00:00:00 2001
2+
From: Matthijs Mekking <matthijs@isc.org>
3+
Date: Tue, 3 Mar 2026 10:40:36 +0100
4+
Subject: [PATCH 1/3] Check iterations in isdelegation()
5+
6+
When looking up an NSEC3 as part of an insecurity proof, check the
7+
number of iterations. If this is too high, treat the answer as insecure
8+
by marking the answer with trust level "answer", indicating that they
9+
did not validate, but could be cached as insecure.
10+
11+
(cherry picked from commit 988040a5e02f86f4a8cdb0704e8d501f9082a89c)
12+
13+
Signed-off-by: Azure Linux Security Servicing Account <azurelinux-security@microsoft.com>
14+
Upstream-reference: https://gitlab.isc.org/isc-projects/bind9/-/commit/94ece263832ebd4777d4a227e3752c92305c109e.patch
15+
16+
---
17+
lib/dns/validator.c | 65 ++++++++++++++++++++++++++++++++++-----------
18+
1 file changed, 49 insertions(+), 16 deletions(-)
19+
20+
diff --git a/lib/dns/validator.c b/lib/dns/validator.c
21+
index 4e856e5..082db33 100644
22+
--- a/lib/dns/validator.c
23+
+++ b/lib/dns/validator.c
24+
@@ -251,12 +251,25 @@ exit_check(dns_validator_t *val) {
25+
}
26+
27+
/*%
28+
- * Look in the NSEC record returned from a DS query to see if there is
29+
- * a NS RRset at this name. If it is found we are at a delegation point.
30+
+ * The isdelegation() function is called as part of seeking the DS record.
31+
+ * Look in the NSEC or NSEC3 record returned from a DS query to see if the
32+
+ * record has the NS bitmap set. If so, we are at a delegation point.
33+
+ *
34+
+ * If the response contains NSEC3 records with too high iterations, we cannot
35+
+ * (or rather we are not going to) validate the insecurity proof. Instead we
36+
+ * are going to treat the message as insecure and just assume the DS was at
37+
+ * the delegation.
38+
+ *
39+
+ * Returns:
40+
+ *\li #ISC_R_SUCCESS the NS bitmap was set in the NSEC or NSEC3 record, or
41+
+ * the NSEC3 covers the name (in case of opt-out), or
42+
+ * we cannot validate the insecurity proof and are going
43+
+ * to treat the message as isnecure.
44+
+ *\li #ISC_R_NOTFOUND the NS bitmap was not set,
45+
*/
46+
-static bool
47+
-isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
48+
- isc_result_t dbresult) {
49+
+static isc_result_t
50+
+isdelegation(dns_validator_t *val, dns_name_t *name, dns_rdataset_t *rdataset,
51+
+ isc_result_t dbresult, const char *caller) {
52+
dns_fixedname_t fixed;
53+
dns_label_t hashlabel;
54+
dns_name_t nsec3name;
55+
@@ -284,7 +297,7 @@ isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
56+
goto trynsec3;
57+
}
58+
if (result != ISC_R_SUCCESS) {
59+
- return (false);
60+
+ return (ISC_R_NOTFOUND);
61+
}
62+
}
63+
64+
@@ -298,7 +311,7 @@ isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
65+
dns_rdata_reset(&rdata);
66+
}
67+
dns_rdataset_disassociate(&set);
68+
- return (found);
69+
+ return (found ? ISC_R_SUCCESS : ISC_R_NOTFOUND);
70+
71+
trynsec3:
72+
/*
73+
@@ -334,6 +347,18 @@ trynsec3:
74+
if (nsec3.hash != 1) {
75+
continue;
76+
}
77+
+ /*
78+
+ * If there are too many iterations assume bad things
79+
+ * are happening and bail out early. Treat as if the
80+
+ * DS was at the delegation.
81+
+ */
82+
+ if (nsec3.iterations > DNS_NSEC3_MAXITERATIONS) {
83+
+ validator_log(val, ISC_LOG_DEBUG(3),
84+
+ "%s: too many iterations",
85+
+ caller);
86+
+ dns_rdataset_disassociate(&set);
87+
+ return (ISC_R_SUCCESS);
88+
+ }
89+
length = isc_iterated_hash(
90+
hash, nsec3.hash, nsec3.iterations, nsec3.salt,
91+
nsec3.salt_length, name->ndata, name->length);
92+
@@ -345,7 +370,7 @@ trynsec3:
93+
found = dns_nsec3_typepresent(&rdata,
94+
dns_rdatatype_ns);
95+
dns_rdataset_disassociate(&set);
96+
- return (found);
97+
+ return (found ? ISC_R_SUCCESS : ISC_R_NOTFOUND);
98+
}
99+
if ((nsec3.flags & DNS_NSEC3FLAG_OPTOUT) == 0) {
100+
continue;
101+
@@ -361,12 +386,12 @@ trynsec3:
102+
memcmp(hash, nsec3.next, length) < 0)))
103+
{
104+
dns_rdataset_disassociate(&set);
105+
- return (true);
106+
+ return (ISC_R_SUCCESS);
107+
}
108+
}
109+
dns_rdataset_disassociate(&set);
110+
}
111+
- return (found);
112+
+ return (found ? ISC_R_SUCCESS : ISC_R_NOTFOUND);
113+
}
114+
115+
/*%
116+
@@ -582,8 +607,10 @@ fetch_callback_ds(isc_task_t *task, isc_event_t *event) {
117+
} else if (eresult == DNS_R_SERVFAIL) {
118+
goto unexpected;
119+
} else if (eresult != DNS_R_CNAME &&
120+
- isdelegation(dns_fixedname_name(&devent->foundname),
121+
- &val->frdataset, eresult))
122+
+ isdelegation(val,
123+
+ dns_fixedname_name(&devent->foundname),
124+
+ &val->frdataset, eresult,
125+
+ "fetch_callback_ds") == ISC_R_SUCCESS)
126+
{
127+
/*
128+
* Failed to find a DS while trying to prove
129+
@@ -743,10 +770,13 @@ validator_callback_ds(isc_task_t *task, isc_event_t *event) {
130+
dns_trust_totext(val->frdataset.trust));
131+
have_dsset = (val->frdataset.type == dns_rdatatype_ds);
132+
name = dns_fixedname_name(&val->fname);
133+
+
134+
if ((val->attributes & VALATTR_INSECURITY) != 0 &&
135+
val->frdataset.covers == dns_rdatatype_ds &&
136+
NEGATIVE(&val->frdataset) &&
137+
- isdelegation(name, &val->frdataset, DNS_R_NCACHENXRRSET))
138+
+ isdelegation(val, name, &val->frdataset,
139+
+ DNS_R_NCACHENXRRSET,
140+
+ "validator_callback_ds") == ISC_R_SUCCESS)
141+
{
142+
result = markanswer(val, "validator_callback_ds",
143+
"no DS and this is a delegation");
144+
@@ -2565,7 +2595,8 @@ validate_nx(dns_validator_t *val, bool resume) {
145+
result = findnsec3proofs(val);
146+
if (result == DNS_R_NSEC3ITERRANGE) {
147+
validator_log(val, ISC_LOG_DEBUG(3),
148+
- "too many iterations");
149+
+ "%s: too many iterations",
150+
+ __func__);
151+
markanswer(val, "validate_nx (3)", NULL);
152+
return (ISC_R_SUCCESS);
153+
}
154+
@@ -2601,7 +2632,7 @@ validate_nx(dns_validator_t *val, bool resume) {
155+
result = findnsec3proofs(val);
156+
if (result == DNS_R_NSEC3ITERRANGE) {
157+
validator_log(val, ISC_LOG_DEBUG(3),
158+
- "too many iterations");
159+
+ "%s: too many iterations", __func__);
160+
markanswer(val, "validate_nx (4)", NULL);
161+
return (ISC_R_SUCCESS);
162+
}
163+
@@ -2818,7 +2849,9 @@ seek_ds(dns_validator_t *val, isc_result_t *resp) {
164+
return (ISC_R_COMPLETE);
165+
}
166+
167+
- if (isdelegation(tname, &val->frdataset, result)) {
168+
+ result = isdelegation(val, tname, &val->frdataset, result,
169+
+ "seek_ds");
170+
+ if (result == ISC_R_SUCCESS) {
171+
*resp = markanswer(val, "proveunsecure (4)",
172+
"this is a delegation");
173+
return (ISC_R_COMPLETE);
174+
--
175+
2.45.4
176+
177+
178+
From 76a45317d9806512c7f1365e6893267ce681df00 Mon Sep 17 00:00:00 2001
179+
From: Matthijs Mekking <matthijs@isc.org>
180+
Date: Tue, 3 Mar 2026 11:17:25 +0100
181+
Subject: [PATCH 2/3] Don't verify already trusted rdatasets
182+
183+
If we already marked an rdataset as secure (or it has even stronger
184+
trust), there is no need to cryptographically verify it again.
185+
186+
(cherry picked from commit 0ec08c212022d08c9717f2bc6bd3e8ebd6f034ce)
187+
---
188+
lib/dns/include/dns/types.h | 1 +
189+
lib/dns/validator.c | 7 +++++++
190+
2 files changed, 8 insertions(+)
191+
192+
diff --git a/lib/dns/include/dns/types.h b/lib/dns/include/dns/types.h
193+
index 641d81f..6f40629 100644
194+
--- a/lib/dns/include/dns/types.h
195+
+++ b/lib/dns/include/dns/types.h
196+
@@ -356,6 +356,7 @@ enum {
197+
((x) == dns_trust_additional || (x) == dns_trust_pending_additional)
198+
#define DNS_TRUST_GLUE(x) ((x) == dns_trust_glue)
199+
#define DNS_TRUST_ANSWER(x) ((x) == dns_trust_answer)
200+
+#define DNS_TRUST_SECURE(x) ((x) >= dns_trust_secure)
201+
202+
/*%
203+
* Name checking severities.
204+
diff --git a/lib/dns/validator.c b/lib/dns/validator.c
205+
index 082db33..29585aa 100644
206+
--- a/lib/dns/validator.c
207+
+++ b/lib/dns/validator.c
208+
@@ -1508,6 +1508,13 @@ verify(dns_validator_t *val, dst_key_t *key, dns_rdata_t *rdata,
209+
bool ignore = false;
210+
dns_name_t *wild;
211+
212+
+ if (DNS_TRUST_SECURE(val->event->rdataset->trust)) {
213+
+ /*
214+
+ * This RRset was already verified before.
215+
+ */
216+
+ return ISC_R_SUCCESS;
217+
+ }
218+
+
219+
val->attributes |= VALATTR_TRIEDVERIFY;
220+
wild = dns_fixedname_initname(&fixed);
221+
again:
222+
--
223+
2.45.4
224+
225+
226+
From 447417e1964cfe78e6889b314a1507643c7fc326 Mon Sep 17 00:00:00 2001
227+
From: Matthijs Mekking <matthijs@isc.org>
228+
Date: Tue, 3 Mar 2026 11:43:23 +0100
229+
Subject: [PATCH 3/3] Check RRset trust in validate_neg_rrset()
230+
231+
In many places we only create a validator if the RRset has too low
232+
trust (the RRset is pending validation, or could not be validated
233+
before). This check was missing prior to validating negative response
234+
data.
235+
236+
(cherry picked from commit 6ca67f65cd685cf8699540a852c1e3775bd48d64)
237+
---
238+
lib/dns/validator.c | 17 +++++++++++++----
239+
1 file changed, 13 insertions(+), 4 deletions(-)
240+
241+
diff --git a/lib/dns/validator.c b/lib/dns/validator.c
242+
index 29585aa..c758384 100644
243+
--- a/lib/dns/validator.c
244+
+++ b/lib/dns/validator.c
245+
@@ -2439,6 +2439,17 @@ validate_neg_rrset(dns_validator_t *val, dns_name_t *name,
246+
}
247+
}
248+
249+
+ if (rdataset->type != dns_rdatatype_nsec &&
250+
+ DNS_TRUST_SECURE(rdataset->trust))
251+
+ {
252+
+ /*
253+
+ * The negative response data is already verified.
254+
+ * We skip NSEC records, because they require special
255+
+ * processing in validator_callback_nsec().
256+
+ */
257+
+ return DNS_R_CONTINUE;
258+
+ }
259+
+
260+
val->currentset = rdataset;
261+
result = create_validator(val, name, rdataset->type, rdataset,
262+
sigrdataset, validator_callback_nsec,
263+
@@ -2549,11 +2560,9 @@ validate_ncache(dns_validator_t *val, bool resume) {
264+
}
265+
266+
result = validate_neg_rrset(val, name, rdataset, sigrdataset);
267+
- if (result == DNS_R_CONTINUE) {
268+
- continue;
269+
+ if (result != DNS_R_CONTINUE) {
270+
+ return (result);
271+
}
272+
-
273+
- return (result);
274+
}
275+
if (result == ISC_R_NOMORE) {
276+
result = ISC_R_SUCCESS;
277+
--
278+
2.45.4
279+

SPECS/bind/bind.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
Summary: Domain Name System software
1111
Name: bind
1212
Version: 9.16.50
13-
Release: 3%{?dist}
13+
Release: 4%{?dist}
1414
License: ISC
1515
Vendor: Microsoft Corporation
1616
Distribution: Mariner
@@ -40,6 +40,7 @@ Patch14: CVE-2024-11187.patch
4040
Patch15: CVE-2025-8677.patch
4141
Patch16: CVE-2025-40778.patch
4242
Patch17: CVE-2025-40780.patch
43+
Patch18: CVE-2026-1519.patch
4344

4445
BuildRequires: gcc
4546
BuildRequires: json-c-devel
@@ -621,6 +622,9 @@ fi;
621622
%{_mandir}/man8/named-nzd2nzf.8*
622623

623624
%changelog
625+
* Thu Apr 02 2026 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 9.16.50-4
626+
- Patch for CVE-2026-1519
627+
624628
* Tue Oct 28 2025 Akhila Guruju <v-guakhila@microsoft.com> - 9.16.50-3
625629
- Patch CVE-2025-8677, CVE-2025-40778 & CVE-2025-40780
626630

0 commit comments

Comments
 (0)