Debian Codegraph @

doc/changelog/changelog-9.20.22.rst

raw
1 .. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
2 ..
3 .. SPDX-License-Identifier: MPL-2.0
4 ..
5 .. This Source Code Form is subject to the terms of the Mozilla Public
6 .. License, v. 2.0. If a copy of the MPL was not distributed with this
7 .. file, you can obtain one at https://mozilla.org/MPL/2.0/.
8 ..
9 .. See the COPYRIGHT file distributed with this work for additional
10 .. information regarding copyright ownership.
11
12 BIND 9.20.22
13 ------------
14
15 Security Fixes
16 ~~~~~~~~~~~~~~
17
18 - Fix crash when reconfiguring zone update policy during active updates.
19 ``ee7832ae583``
20
21 Fixed a crash that could occur when running rndc reconfig to change a
22 zone's update policy (e.g., from allow-update to update-policy) while
23 DNS UPDATE requests were being processed for that zone.
24
25 ISC would like to thank Vitaly Simonovich for bringing this issue to
26 our attention. :gl:`#5817` :gl:`!11738`
27
28 New Features
29 ~~~~~~~~~~~~
30
31 - Add MOVE_OWNERSHIP() macro for transferring pointer ownership.
32 ``13a656f79aa``
33
34 A helper macro that returns the current value of a pointer and sets it
35 to NULL in one expression, useful for transferring ownership in
36 designated initializers. :gl:`!11736`
37
38 Feature Changes
39 ~~~~~~~~~~~~~~~
40
41 - Exclude named.args.j2 and system test README files from license header
42 checks. ``d65e3922bbb``
43
44 Exclude named.args.j2 files from license header checks so named.args
45 can be generated from Jinja templates. Also exclude system test README
46 files from the license header checks. :gl:`!11696`
47
48 - Skip cache flush ordering on NTA expiry. ``5f97f5b0501``
49
50 dns_view_flushnode() was called in the delete_expired() async
51 callback, which runs after the query that detected the NTA expiry.
52 This created a race: the query would proceed with stale cached data
53 from the NTA period before the flush had a chance to run, resulting in
54 transient SERVFAIL with EDE 22 (No Reachable Authority).
55
56 Skip dns_view_flushnode() in the older branches as the solutions for
57 older branches are too complicated and this was not a critical bug.
58
59 Also simplify the expiry comparison in delete_expired() to a direct
60 pointer comparison (nta == pval) instead of comparing expiry
61 timestamps. :gl:`!11730`
62
63 - Use underscore for system test names. ``d270709b499``
64
65 Change the convention for system test directory names to always use an
66 underscore rather than a hyphen. Names using underscore are valid
67 python package names and can be used with standard `import` facilities
68 in python, which allows easier code reuse. :gl:`!11711`
69
70 Bug Fixes
71 ~~~~~~~~~
72
73 - Fix intermittent named crashes during asynchronous zone operations.
74 ``ac042af5766``
75
76 Asynchronous zone loading and dumping operations occasionally
77 dispatched tasks to the wrong internal event loop. This threading
78 violation triggered internal safety assertions that abruptly
79 terminated named. Strict loop affinity is now enforced for these
80 tasks, ensuring they execute on their designated threads and
81 preventing the crashes. :gl:`#4882` :gl:`!11684`
82
83 - Count temporal problems with DNSSEC validation as attempts.
84 ``e4399fc6b26``
85
86 After KeyTrap, the temporal DNSSEC were originally hard errors that
87 caused validation failures even if the records had another valid
88 signature. This has been changed and the RRSIGs outside of the
89 inception and expiration time are not counted as hard errors.
90 However, these errors are not even counted as validation attempts, so
91 excessive number of expired RRSIGs would cause some non-cryptograhic
92 extra work for the validator. This has been fixed and the temporal
93 errors are correctly counted as validation attempts. :gl:`#5760`
94 :gl:`!11763`
95
96 - Clear errno correctly. ``0de8a660117``
97
98 Zero errno before calling strtol. :gl:`#5773` :gl:`!11703`
99
100 - Fix a possible deadlock in RPZ processing. ``a2bedda1321``
101
102 The :iscman:`named` process could hang when processing a maliciously
103 crafted update for a response policy zone (RPZ). This has been fixed.
104 :gl:`#5775` :gl:`!11687`
105
106 - Fix use-after-free in xfrin_recv_done. ``46099d2d9af``
107
108 Move the LIBDNS_XFRIN_RECV_DONE probe execution before
109 dns_xfrin_detach in xfrin_recv_done.
110
111 Previously, dns_xfrin_detach was called before the trace probe, which
112 could free the xfr object. Because the accessed member xfr->info is
113 an embedded array, the expression evaluates via pointer arithmetic
114 rather than a direct memory dereference. Although this prevents a
115 reliable crash in practice, it technically remains a use-after-free
116 issue. Reorder the statements to ensure the transfer context is fully
117 valid when the probe executes. :gl:`#5786` :gl:`!11694`
118
119 - Backport test for update-policy per-type max quota bypass via crafted
120 UPDATE messages. ``545ce3ae224``
121
122 An authenticated DDNS client could bypass update-policy per-type
123 record limits (e.g. TXT(3)) by including padding records in the UPDATE
124 message that are silently skipped during processing in the main
125 branch.
126
127 As BIND 9.20 is not affected, only backport the test. :gl:`#5799`
128 :gl:`!11760`
129
130 - Fix a crash triggered by rndc modzone on zone from configuration file.
131 ``6d9482bd6b8``
132
133 Calling `rndc modzone` on a zone that was configured in the
134 configuration file caused a crash. This has been fixed.
135
136 ISC would like to thank Nathan Reilly for reporting this. :gl:`#5800`
137 :gl:`!11698`
138
139 - Fix the processing of empty catalog zone ACLs. ``ce365083d9d``
140
141 The :iscman:`named` process could terminate unexpectedly when
142 processing a catalog zone ACL in an APL resource record that was
143 completely empty. This has been fixed. :gl:`#5801` :gl:`!11759`
144
145 - Fix OpenSSL 4 compatibility issue when calling X509_get_subject_name()
146 ``1d43bf8263f``
147
148 Starting from OpenSSL 4 the the X509_get_subject_name() function
149 returns a 'const' pointer to a name instead of a regular pointer.
150 Duplicate the name before operating on it, then free it. :gl:`#5807`
151 :gl:`!11692`
152
153 - Take dns_dtenv_t reference before an async function call.
154 ``be7b811fffc``
155
156 A 'dns_dtenv_t' pointer is passed to an async function without taking
157 a reference first, which can potentially cause a use-after-free error.
158 Take a reference, then detach in the async function. :gl:`#5820`
159 :gl:`!11714`
160
161 - Fix a crash triggered by rndc modzone on zone that already existed in
162 NZF file. ``46dbcd7c9a5``
163
164 Calling `rndc modzone` didn't work properly for a zone hat was
165 configured in the configuration file. It could crash if BIND 9 was
166 built without LMDB or if there was already an NZF file for the zone.
167 In addition, `rndc modzone` failed in subsequent attempts. These
168 problems are now fixed. :gl:`#5826` :gl:`!11743`
169
170 - Fix couple of reference counting bugs. ``fc5e26cfc9f``
171
172 Fix missing detach/free on error paths. :gl:`!11691`
173
174 - Fix data race in server round-trip time tracking. ``31cbfc9fb36``
175
176 The SRTT (Smoothed Round-Trip Time) update for remote servers was not
177 atomic — concurrent callers could each read the same value and one
178 update would be silently lost. Additionally, the aging decay applied
179 once per second could run multiple times if several threads entered
180 the function simultaneously.
181
182 Use compare-and-swap loops for the SRTT update and for the aging
183 timestamp to ensure no updates are lost. :gl:`!11723`
184
185 - Fix data race on fctx->vresult in validated() ``996c66aee7a``
186
187 Move the write to fctx->vresult after LOCK(&fctx->lock). The field
188 was being set before acquiring the lock, but dns_resolver_logfetch()
189 reads it under the same lock from another thread. :gl:`!11721`
190
191 - Fix isc_buffer_init capacity mismatch in DoH data chunk callback.
192 ``f0a2b07359c``
193
194 isc_buffer_init() is given MAX_DNS_MESSAGE_SIZE (65535) as capacity
195 but only h2->content_length bytes are allocated. This makes the
196 buffer believe it has more space than actually allocated. A secondary
197 bounds check (new_bufsize <= h2->content_length) prevents actual
198 overflow, but the buffer invariant is violated.
199
200 Pass h2->content_length as the capacity to match the allocation.
201 :gl:`!11709`
202
203 - Fix memory leak in dns_catz_options_setdefault() for zonedir.
204 ``1844afec7ba``
205
206 When defaults->zonedir is set, opts->zonedir is unconditionally
207 overwritten without freeing the previous value. This leaks memory on
208 every catalog zone update when zonedir defaults are configured.
209
210 Free the existing opts->zonedir before replacing it. :gl:`!11685`
211
212 - Fix potential resource during resolver error handling. ``6a32c1acdc7``
213
214 Under specific error conditions during query processing, resources
215 were not being properly released, which could eventually lead to
216 unnecessary memory consumption for the server. The a potential
217 resource leak in the resolver has been fixed. :gl:`!11706`
218
219 - Fix resquery reference imbalance on TCP connect failure.
220 ``b69bbf2e0ed``
221
222 In fctx_query(), resquery_ref(query) is called before
223 dns_dispatch_connect() in anticipation of the resquery_connected()
224 callback consuming the reference. When dns_dispatch_connect() fails
225 synchronously on TCP (e.g. from dns_transport_get_tlsctx() failing in
226 tcp_dispatch_connect()), the connect callback is never scheduled, so
227 the extra reference is never consumed. This has been fixed.
228 :gl:`!11656`
229
230