]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
14 months agoAllow pushing branches and tags to customer git repos
Nicki Křížek [Tue, 25 Mar 2025 15:51:24 +0000 (16:51 +0100)] 
Allow pushing branches and tags to customer git repos

For pipelines in the private repository, add an optional manual job,
which allows the current branch to be pushed into the specified
customer's git repository. This can be useful to provide patch previews
for early testing.

For tags created in a private repository, add a manual job which pushes
the created tag to all entitled customers.

(cherry picked from commit 378b412e94a40ee74ab5c9edfb3a2059612a59ff)

14 months ago[9.18] fix: usr: Fix resolver statistics counters for timed out responses
Arаm Sаrgsyаn [Mon, 31 Mar 2025 19:56:10 +0000 (19:56 +0000)] 
[9.18] fix: usr: Fix resolver statistics counters for timed out responses

When query responses timed out, the resolver could incorrectly increase the regular responses counters, even if no response was received. This has been fixed.

Closes #5193

Backport of MR !10227

Merge branch 'backport-5193-resolver-statistics-counters-fix-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10288

14 months agoTest resolver statistics when responses time out
Aram Sargsyan [Thu, 6 Mar 2025 14:37:09 +0000 (14:37 +0000)] 
Test resolver statistics when responses time out

Add a test to check that the timed out responses do not skew the
normal responses statistics counters, and that they do update the
timeouts counter.

(cherry picked from commit 0c7fa8d572bf3e742a627ff660175683e131908b)

14 months agoFix the resolvers RTT-ranged responses statistics counters
Aram Sargsyan [Thu, 6 Mar 2025 14:28:48 +0000 (14:28 +0000)] 
Fix the resolvers RTT-ranged responses statistics counters

When a response times out the fctx_cancelquery() function
incorrectly calculates it in the 'dns_resstatscounter_queryrtt5'
counter (i.e. >=1600 ms). To avoid this, the rctx_timedout()
function should make sure that 'rctx->finish' is NULL. And in order
to adjust the RTT values for the timed out server, 'rctx->no_response'
should be true. Update the rctx_timedout() function to make those
changes.

(cherry picked from commit 830e54811168bc3e69db93baf6132c18f3452f92)

14 months agoFix resolver responses statistics counter
Aram Sargsyan [Thu, 6 Mar 2025 14:26:23 +0000 (14:26 +0000)] 
Fix resolver responses statistics counter

The resquery_response() function increases the response counter without
checking if the response was successful. Increase the counter only when
the result indicates success.

(cherry picked from commit 12e7dfa397c92807bdc4e6f55918d46eb15e0600)

14 months ago[9.18] chg: doc: Remove -S changelog templates from open-source edition
Nicki Křížek [Fri, 28 Mar 2025 12:22:51 +0000 (12:22 +0000)] 
[9.18] chg: doc: Remove -S changelog templates from open-source edition

These changelogs meant for -S edition were introduced to avoid rebase
conflicts. However, the same result can be achieved by linking the -S
changelogs directly from their open-source variants, rather than
including the -S changelogs directly in changelog.rst.

Mattermost discussion: https://mattermost.isc.org/isc/pl/1gioy1gatifttborqx5qhc9paw

Merge branch 'nicki/remove-s-specific-changelog-files-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10337

14 months agoRemove -S changelog templates from open-source edition
Nicki Křížek [Thu, 27 Mar 2025 12:51:29 +0000 (13:51 +0100)] 
Remove -S changelog templates from open-source edition

These changelogs meant for -S edition were introduced to avoid rebase
conflicts. However, the same result can be achieved by linking the -S
changelogs directly from their open-source variants, rather than
including the -S changelogs directly in changelog.rst.

14 months ago[9.18] fix: dev: Validating ADB fetches could cause a crash in import_rdataset()
Ondřej Surý [Wed, 26 Mar 2025 12:09:19 +0000 (12:09 +0000)] 
[9.18] fix: dev: Validating ADB fetches could cause a crash in import_rdataset()

Previously, in some cases, the resolver could return rdatasets of type CNAME or DNAME without the result code being set to `DNS_R_CNAME` or `DNS_R_DNAME`. This could trigger an assertion failure in the ADB. The resolver error has been fixed.

Closes #5201

Backport of MR !10172

Backport of MR !10178

Merge branch 'backport-5201-adb-cname-error-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10330

14 months agofix the fetchresponse result for CNAME/DNAME
Evan Hunt [Wed, 26 Feb 2025 22:56:46 +0000 (14:56 -0800)] 
fix the fetchresponse result for CNAME/DNAME

the fix in commit 1edbbc32b4 was incomplete; the wrong
event result could also be set in cache_name() and validated().

(cherry picked from commit 9ebeb60174f3074f96b7c00dcda852a5bd61bad6)

14 months agoset eresult based on the type in ncache_adderesult()
Evan Hunt [Tue, 25 Feb 2025 22:41:41 +0000 (14:41 -0800)] 
set eresult based on the type in ncache_adderesult()

when the caching of a negative record failed because of the
presence of a positive one, ncache_adderesult() could override
this to ISC_R_SUCCESS. this could cause CNAME and DNAME responses
to be handled incorrectly.  ncache_adderesult() now sets the result
code correctly in such cases.

(cherry picked from commit 1edbbc32b4cca228e05cb9646ad623cf31027a95)

14 months ago[9.18] fix: test: Limit X-Bloat header size to 100KB
Michal Nowak [Tue, 25 Mar 2025 16:51:00 +0000 (16:51 +0000)] 
[9.18] fix: test: Limit X-Bloat header size to 100KB

Otherwise curl 8.13 rejects the line with:

    I:Check HTTP/1.1 keep-alive with truncated stream (21)
    curl: option --header: error encountered when reading a file
    curl: try 'curl --help' or 'curl --manual' for more information

Also, see https://github.com/curl/curl/pull/16572.

Closes #5249

Backport of MR !10319

Merge branch 'backport-5249-statschannel-limit-http-header-size-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10322

14 months agoLimit X-Bloat header size to 100KB
Michal Nowak [Tue, 25 Mar 2025 13:14:52 +0000 (14:14 +0100)] 
Limit X-Bloat header size to 100KB

Otherwise curl 8.13 rejects the line with:

    I:Check HTTP/1.1 keep-alive with truncated stream (21)
    curl: option --header: error encountered when reading a file
    curl: try 'curl --help' or 'curl --manual' for more information

Also, see https://github.com/curl/curl/pull/16572.

(cherry picked from commit bcb931f4a8f91a5bcae5d13a0fb809feff767b63)

14 months ago[9.18] fix: usr: Don't enforce NOAUTH/NOCONF flags in DNSKEYs
Evan Hunt [Tue, 25 Mar 2025 07:34:26 +0000 (07:34 +0000)] 
[9.18] fix: usr: Don't enforce NOAUTH/NOCONF flags in DNSKEYs

All DNSKEY keys are able to authenticate. The `DNS_KEYTYPE_NOAUTH` (and `DNS_KEYTYPE_NOCONF`) flags were defined for the KEY rdata type, and are not applicable to DNSKEY. Previously, however, because the DNSKEY implementation was built on top of KEY, the `_NOAUTH` flag prevented authentication in DNSKEYs as well. This has been corrected.

Closes #5240

Backport of MR !10261

Merge branch 'backport-5240-ignore-noauth-flag-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10316

14 months agoDNS_KEYTYPE_NOKEY is only applicable to KEY
Mark Andrews [Tue, 25 Mar 2025 03:15:37 +0000 (14:15 +1100)] 
DNS_KEYTYPE_NOKEY is only applicable to KEY

(cherry picked from commit 53c6721abc49746d91e61a5bb2cbbea24d64dd72)

14 months agoDon't check DNS_KEYFLAG_NOAUTH
Evan Hunt [Fri, 14 Mar 2025 00:44:49 +0000 (17:44 -0700)] 
Don't check DNS_KEYFLAG_NOAUTH

All DNSKEY keys are able to authenticate. The DNS_KEYTYPE_NOAUTH
(and DNS_KEYTYPE_NOCONF) flags were defined for the KEY rdata type,
and are not applicable to DNSKEY.

Previously, because the DNSKEY implementation was built on top of
KEY, the NOAUTH flag prevented authentication in DNSKEYs as well.
This has been corrected.

(cherry picked from commit 5c21576f82f9f62c2e22aac920a37a4013ac3a80)

14 months agoTidy up keyvalue.h definitions
Evan Hunt [Thu, 13 Mar 2025 19:20:40 +0000 (12:20 -0700)] 
Tidy up keyvalue.h definitions

Use enums for DNS_KEYFLAG_, DNS_KEYTYPE_, DNS_KEYOWNER_, DNS_KEYALG_,
and DNS_KEYPROTO_ values.

Remove values that are never used.

Eliminate the obsolete DNS_KEYFLAG_SIGNATORYMASK. Instead, add three
more RESERVED bits for the key flag values that it covered but which
were never used.

(cherry picked from commit fee1ba40df939f25fc9258b2681a1a2bd7965f5d)

14 months agochg: usr: Fix network manager issue when both success and timeout callbacks can be...
Artem Boldariev [Mon, 24 Mar 2025 09:34:21 +0000 (09:34 +0000)] 
chg: usr: Fix network manager issue when both success and timeout callbacks can be called for the same read request

This commit simplifies code flow in the tls_cycle_input() and makes
the incoming data processing similar to that in TCP DNS. In
particular, now we decipher all the the incoming data before making a
single isc__nm_process_sock_buffer() call. Previously we would try to
decipher data bit-by-bit before trying to process the deciphered bit
via isc__nm_process_sock_buffer(). Doing like before made the code
much less predictable, in particular in the areas like when reading is
paused or resumed.

The newer approach also allowed us to get rid of some old kludges.

Closes #5247

Merge branch '5247-unexpected-callbacks' into 'bind-9.18'

See merge request isc-projects/bind9!10294

14 months agoTLS DNS: Simplify tls_cycle_input()
Artem Boldariev [Wed, 19 Mar 2025 13:11:26 +0000 (15:11 +0200)] 
TLS DNS: Simplify tls_cycle_input()

This commit simplifies code flow in the tls_cycle_input() and makes
the incoming data processing similar to that in TCP DNS. In
particular, now we decipher all the the incoming data before making a
single isc__nm_process_sock_buffer() call. Previously we would try to
decipher data bit-by-bit before trying to process the deciphered bit
via isc__nm_process_sock_buffer(). Doing like before made the code
much less predictable, in particular in the areas like when reading is
paused or resumed.

The newer approach also allowed us to get rid of some old kludges.

14 months agoMerge tag 'v9.18.35' into bind-9.18
Andoni Duarte Pintado [Wed, 19 Mar 2025 16:32:17 +0000 (17:32 +0100)] 
Merge tag 'v9.18.35' into bind-9.18

14 months ago[9.18] chg: ci: Allow re-run of the shotgun jobs to reduce false positives
Nicki Křížek [Tue, 18 Mar 2025 13:20:06 +0000 (13:20 +0000)] 
[9.18] chg: ci: Allow re-run of the shotgun jobs to reduce false positives

The false positive rate is about 10-20 % when evaluating shotgun results
from a single run. Attempt to reduce the false positive rate by allowing
a re-run of failed jobs.

Backport of MR !10271

Merge branch 'backport-nicki/ci-shotgun-reduce-false-positives-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10280

14 months agoAllow re-run of the shotgun jobs to reduce false positive
Nicki Křížek [Wed, 12 Mar 2025 16:24:05 +0000 (17:24 +0100)] 
Allow re-run of the shotgun jobs to reduce false positive

The false positive rate is about 10-20 % when evaluating shotgun results
from a single run. Attempt to reduce the false positive rate by allowing
a re-run of failed jobs.

While there is a slight risk that barely noticable decreases in
performance might slip by more easily in MRs, they'd still likely pop up
during nightly or pre-release testing.

Also increase the tolerance threshold for DoH latency comparisons, as
those tests often experience increased jitter in the tail end latencies.

(cherry picked from commit 5eab352478623eef57008a274c3a6505d9c76390)

14 months agoAdjust the load factor for shotgun:dot test
Nicki Křížek [Tue, 18 Mar 2025 12:25:03 +0000 (13:25 +0100)] 
Adjust the load factor for shotgun:dot test

With the slightly increased load for the DoT test, the results appear to
be a little bit more stable.

14 months ago[9.18] chg: ci: Disable linkcheck on dl.acm.org
Michal Nowak [Mon, 17 Mar 2025 17:26:19 +0000 (17:26 +0000)] 
[9.18] chg: ci: Disable linkcheck on dl.acm.org

The check fails with the following error for some time:

    403 Client Error: Forbidden for url: https://dl.acm.org/doi/10.1145/1315245.1315298

Backport of MR !10272

Merge branch 'backport-mnowak/linkcheck-disable-dl-acm-org-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10274

14 months agoDisable linkcheck on dl.acm.org
Michal Nowak [Mon, 17 Mar 2025 16:39:36 +0000 (17:39 +0100)] 
Disable linkcheck on dl.acm.org

The check fails with the following error for some time:

    403 Client Error: Forbidden for url: https://dl.acm.org/doi/10.1145/1315245.1315298

(cherry picked from commit 1ab889ee21c6b39b12a80a7637c7081817a365b1)

14 months ago[9.18] new: dev: Implement -T cookiealwaysvalid
Arаm Sаrgsyаn [Mon, 17 Mar 2025 13:32:04 +0000 (13:32 +0000)] 
[9.18] new: dev: Implement -T cookiealwaysvalid

When `-T cookiealwaysvalid` is passed to `named`, DNS cookie checks for
the incoming queries always pass, given they are structurally correct.

Backport of MR !10232

Merge branch 'backport-aram/new-named-minus-T-option-of-cookiealwaysvalid-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10265

14 months agoTest -T cookiealwaysvalid
Aram Sargsyan [Tue, 11 Mar 2025 14:29:22 +0000 (14:29 +0000)] 
Test -T cookiealwaysvalid

Add a check in the "cookie" system test to make sure that the new
'-T cookiealwaysvalid' option works.

(cherry picked from commit 4e75a20b6a63c3840559accc9df2af2d50a747f6)

14 months agoImplement -T cookiealwaysvalid
Aram Sargsyan [Tue, 11 Mar 2025 14:03:56 +0000 (14:03 +0000)] 
Implement -T cookiealwaysvalid

When -T cookiealwaysvalid is passed to named, DNS cookie checks for
the incoming queries always pass, given they are structurally correct.

(cherry picked from commit 807ef8545d2e06c77826f3b2ac3f1cb7a7413dad)

14 months ago[9.18] fix: dev: Add missing locks when returning addresses
Mark Andrews [Sun, 16 Mar 2025 08:04:33 +0000 (08:04 +0000)] 
[9.18] fix: dev: Add missing locks when returning addresses

Add missing locks in dns_zone_getxfrsource4 et al.  Addresses CID 468706, 468708, 468741, 468742, 468785, and 468778.

Cleanup dns_zone_setxfrsource4 et al to now return void.

Remove double copies with dns_zone_getprimaryaddr and dns_zone_getsourceaddr.

Closes #4933

Backport of MR !9485

Merge branch 'backport-4933-add-missing-locks-when-returning-addresses-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10260

14 months agoAdd missing locks when returning addresses
Mark Andrews [Thu, 12 Sep 2024 02:54:25 +0000 (12:54 +1000)] 
Add missing locks when returning addresses

Add missing locks in dns_zone_getxfrsource4 et al. Addresses CID
468706, 468708, 468741, 468742, 468785 and 468778.

Cleanup dns_zone_setxfrsource4 et al to now return void.

Remove double copies with dns_zone_getprimaryaddr and dns_zone_getsourceaddr.

(cherry picked from commit d0a59277fb13023d3aff5c1d4d91506a850365ee)

14 months ago[9.18] fix: test: Tune many types tests in reclimit test
Mark Andrews [Sat, 15 Mar 2025 00:33:04 +0000 (00:33 +0000)] 
[9.18] fix:  test:  Tune many types tests in reclimit test

The `I:checking that lifting the limit will allow everything to get
cached (20)` test was failing due to the TTL of the records being
too short for the elapsed time of the test.  Raise the TTL to fix
this and adjust other tests as needed.

Closes #5206

Backport of MR !10177

Merge branch 'backport-5206-tune-last-sub-test-of-reclimit-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10250

14 months agoTune many types tests in reclimit test
Mark Andrews [Wed, 26 Feb 2025 21:36:54 +0000 (08:36 +1100)] 
Tune many types tests in reclimit test

The 'I:checking that lifting the limit will allow everything to get
cached (20)' test was failing due to the TTL of the records being
too short for the elapsed time of the test.  Raise the TTL to fix
this and adjust other tests as needed.

(cherry picked from commit 1a58bd211357ccd366b70e51d3cadaa7fc5aad15)

14 months agochg: doc: Set up version for BIND 9.18.36
Andoni Duarte [Wed, 12 Mar 2025 13:07:06 +0000 (13:07 +0000)] 
chg: doc: Set up version for BIND 9.18.36

Merge branch 'andoni/set-up-version-for-bind-9.18.36' into 'bind-9.18'

See merge request isc-projects/bind9!10235

14 months agoUpdate BIND version to 9.18.36-dev
Andoni Duarte Pintado [Wed, 12 Mar 2025 11:07:23 +0000 (12:07 +0100)] 
Update BIND version to 9.18.36-dev

14 months agoUpdate BIND version for release v9.18.35
Andoni Duarte Pintado [Tue, 11 Mar 2025 10:38:57 +0000 (11:38 +0100)] 
Update BIND version for release

14 months agonew: doc: Prepare documentation for BIND 9.18.35
Andoni Duarte [Tue, 11 Mar 2025 10:13:01 +0000 (10:13 +0000)] 
new: doc: Prepare documentation for BIND 9.18.35

Merge branch 'andoni/prepare-documentation-for-bind-9.18.35' into 'v9.18.35-release'

See merge request isc-private/bind9!786

14 months agoTweak and reword relase notes
Andoni Duarte Pintado [Tue, 11 Mar 2025 09:39:11 +0000 (10:39 +0100)] 
Tweak and reword relase notes

14 months agoPrepare release notes for BIND 9.18.35
Andoni Duarte Pintado [Fri, 7 Mar 2025 19:38:43 +0000 (20:38 +0100)] 
Prepare release notes for BIND 9.18.35

14 months agoGenerate changelog for BIND 9.18.35
Andoni Duarte Pintado [Fri, 7 Mar 2025 19:38:25 +0000 (20:38 +0100)] 
Generate changelog for BIND 9.18.35

14 months ago[9.18] chg: ci: Move FreeBSD jobs to AWS autoscalers
Michal Nowak [Wed, 5 Mar 2025 11:25:37 +0000 (11:25 +0000)] 
[9.18] chg: ci: Move FreeBSD jobs to AWS autoscalers

Backport of MR !10214

Merge branch 'backport-mnowak/freebsd-aws-autoscaling-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10221

14 months agoMove FreeBSD jobs to AWS autoscalers
Michal Nowak [Mon, 17 Feb 2025 14:31:56 +0000 (15:31 +0100)] 
Move FreeBSD jobs to AWS autoscalers

From technical reasons --with-readline=libedit is not being tested on
FreeBSD anymore as it's hard to have anchors both unified and specific.

(cherry picked from commit e0df774ca093bfc775232c5a543162de3c7245c2)

14 months ago[9.18] new: dev: Add digest methods for SIG and RRSIG
Mark Andrews [Wed, 5 Mar 2025 11:08:41 +0000 (11:08 +0000)] 
[9.18] new: dev: Add digest methods for SIG and RRSIG

ZONEMD digests RRSIG records and potentially digests SIG record. Add digests
methods for both record types.

Closes #5219

Backport of MR !10217

Merge branch 'backport-5219-add-digest-methods-for-sig-and-rrsig-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10219

14 months agoImplement digest_sig and digest_rrsig for ZONEMD
Mark Andrews [Wed, 23 Jun 2021 09:51:51 +0000 (19:51 +1000)] 
Implement digest_sig and digest_rrsig for ZONEMD

ZONEMD needs to be able to digest SIG and RRSIG records.  The signer
field can be compressed in SIG so we need to call dns_name_digest().
While for RRSIG the records the signer field is not compressed the
canonical form has the signer field downcased (RFC 4034, 6.2).  This
also implies that compare_rrsig needs to downcase the signer field
during comparison.

(cherry picked from commit 006c5990ce88aa5b5869a6140392ef80f38e415a)

14 months ago[9.18] fix: dev: Sync the TSAN CC, CFLAGS and LDFLAGS in the respdiff:tsan job
Ondřej Surý [Wed, 5 Mar 2025 09:59:20 +0000 (09:59 +0000)] 
[9.18] fix: dev: Sync the TSAN CC, CFLAGS and LDFLAGS in the respdiff:tsan job

Backport of MR !10209

Merge branch 'backport-ondrej/sync-tsan-options-in-gitlab-ci-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10213

14 months agoSync the TSAN CC, CFLAGS and LDFLAGS in the respdiff:tsan job
Ondřej Surý [Mon, 3 Mar 2025 22:05:15 +0000 (23:05 +0100)] 
Sync the TSAN CC, CFLAGS and LDFLAGS in the respdiff:tsan job

(cherry picked from commit 23394afa9ecf8ab0eeea1d5af5e7df8c52392538)

14 months ago[9.18] fix: dev: When recording an rr trace, use libtool
Evan Hunt [Wed, 5 Mar 2025 08:34:36 +0000 (08:34 +0000)] 
[9.18] fix: dev: When recording an rr trace, use libtool

When a system test is run with the `USE_RR` environment variable set to 1, an `rr` trace is now correctly generated for each instance of `named`.

Closes #5079

Backport of MR !10197

Merge branch 'backport-5079-fix-rr-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10208

14 months agowhen recording an rr trace, use libtool
Evan Hunt [Sun, 2 Mar 2025 05:03:51 +0000 (21:03 -0800)] 
when recording an rr trace, use libtool

when running a system test with the USE_RR environment
variable set to 1, an rr trace is generated for named.
because rr wasn't run using libtool --mode=execute, the
trace would actually be generated for the wrapper script
generated by libtool, not for the actual named binary.

(cherry picked from commit 00d7c7c3462dd13b0cf003ad825689c218624ff0)

14 months ago[9.18] fix: dev: Fix memory ordering issues with atomic operations in the quota.c...
Arаm Sаrgsyаn [Tue, 4 Mar 2025 10:49:30 +0000 (10:49 +0000)] 
[9.18] fix: dev: Fix memory ordering issues with atomic operations in the quota.c module

Change all the non-locked operations on `quota->used` and
`quota->waiting` to "acq/rel" for inter-thread synchronization. Some
loads are left as "relaxed", because they are under a locked mutex
which also provides protection.

Also use relaxed memory ordering for `quota->max` and `quota->soft`,
as done in the main branch; possible ordering issues for these
variables are acceptable.

Closes #5018

Merge branch '5018-quota-memory-ordering-fixes-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10203

14 months agoFix memory ordering for operations with quota->used and quota->waiting
Aram Sargsyan [Thu, 27 Feb 2025 16:48:52 +0000 (16:48 +0000)] 
Fix memory ordering for operations with quota->used and quota->waiting

Change all the non-locked operations on 'quota->used' and
'quota->waiting' to "acq/rel" for inter-thread synchronization. Some
loads are left as "relaxed", because they are under a locked mutex
which also provides protection.

14 months agoUse relaxed memory ordering for quota->max and quota->soft
Aram Sargsyan [Thu, 27 Feb 2025 16:14:55 +0000 (16:14 +0000)] 
Use relaxed memory ordering for quota->max and quota->soft

These variables are not critical for memory ordering issues
and we can use the relaxed memory ordering, as done in the
main branch.

15 months ago[9.18] fix: dev: Post [CVE-2024-12705] Performance Drop Fixes, Part 2
Artem Boldariev [Mon, 3 Mar 2025 10:43:50 +0000 (10:43 +0000)] 
[9.18] fix: dev: Post [CVE-2024-12705] Performance Drop Fixes, Part 2

Backport of !10192.

Merge branch 'artem-doh-performance-drop-post-fix-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10193

15 months agoDoH: Bump the active streams processing limit
Artem Boldariev [Tue, 25 Feb 2025 17:58:24 +0000 (19:58 +0200)] 
DoH: Bump the active streams processing limit

This commit bumps the total number of active streams (= the opened
streams for which a request is received, but response is not ready) to
60% of the total streams limit.

The previous limit turned out to be too tight as revealed by
longer (≥1h) runs of "stress:long:rpz:doh+udp:linux:*" tests.

(cherry picked from commit eaad0aefe668408d8ae0792796852cc7bccaff0f)

15 months agoDoH: remove obsolete INSIST() check
Artem Boldariev [Wed, 26 Feb 2025 12:43:34 +0000 (14:43 +0200)] 
DoH: remove obsolete INSIST() check

The check, while not active by default, is not valid since the commit
8b8f4d500d9c1d41d95d34a79c8935823978114c.

See 'if (total == 0) { ...' below branch to understand why.

(cherry picked from commit 217a1ebd79d90d2a3eebf44256fd15ab61a7d2a9)

15 months agoDoH: Flush HTTP write buffer on an outgoing DNS message
Artem Boldariev [Tue, 25 Feb 2025 07:52:19 +0000 (09:52 +0200)] 
DoH: Flush HTTP write buffer on an outgoing DNS message

Previously, the code would try to avoid sending any data regardless of
what it is unless:

a) The flush limit is reached;
b) There are no sends in flight.

This strategy is used to avoid too numerous send requests with little
amount of data. However, it has been proven to be too aggressive and,
in fact, harms performance in some cases (e.g., on longer (≥1h) runs
of "stress:long:rpz:doh+udp:linux:*").

Now, additionally to the listed cases, we also:

c) Flush the buffer and perform a send operation when there is an
outgoing DNS message passed to the code (which is indicated by the
presence of a send callback).

That helps improve performance for "stress:long:rpz:doh+udp:linux:*"
tests.

(cherry picked from commit c5f7968856f3d0cf37c5882ac19fa70333bae4cc)

15 months agoDoH: Limit the number of delayed IO processing requests
Artem Boldariev [Mon, 24 Feb 2025 16:32:23 +0000 (18:32 +0200)] 
DoH: Limit the number of delayed IO processing requests

Previously, a function for continuing IO processing on the next UV
tick was introduced (http_do_bio_async()). The intention behind this
function was to ensure that http_do_bio() is eventually called at
least once in the future. However, the current implementation allows
queueing multiple such delayed requests needlessly. There is currently
no need for these excessive requests as http_do_bio() can requeue them
if needed. At the same time, each such request can lead to a memory
allocation, particularly in BIND 9.18.

This commit ensures that the number of enqueued delayed IO processing
requests never exceeds one in order to avoid potentially bombarding IO
threads with the delayed requests needlessly.

(cherry picked from commit 0e1b02868a63d2c4f6f0c414b20d4b999adbcc46)

15 months agoDoH: Simplify http_do_bio()
Artem Boldariev [Thu, 20 Feb 2025 20:08:01 +0000 (22:08 +0200)] 
DoH: Simplify http_do_bio()

This commit significantly simplifies the code flow in the
http_do_bio() function, which is responsible for processing incoming
and outgoing HTTP/2 data. It seems that the way it was structured
before was indirectly caused by the presence of the missing callback
calls bug, fixed in 8b8f4d500d9c1d41d95d34a79c8935823978114c.

The change introduced by this commit is known to remove a bottleneck
and allows reproducible and measurable performance improvement for
long runs (>= 1h) of "stress:long:rpz:doh+udp:linux:*" tests.

Additionally, it fixes a similar issue with potentially missing send
callback calls processing and hardens the code against use-after-free
errors related to the session object (they can potentially occur).

(cherry picked from commit 0956fb9b9ec4d07f1b744a829dacfe7a1251a58e)

15 months ago[9.18] new: ci: Check dangling symlinks in the repository backport-artem-doh-performance-drop-post-fix-9.18
Michal Nowak [Fri, 28 Feb 2025 11:12:40 +0000 (11:12 +0000)] 
[9.18] new: ci: Check dangling symlinks in the repository

Backport of MR !10120

Merge branch 'backport-mnowak/check-dangling-symlinks-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10190

15 months agoLink ChangeLog to doc/arm/changelog.rst
Michal Nowak [Tue, 18 Feb 2025 10:52:41 +0000 (11:52 +0100)] 
Link ChangeLog to doc/arm/changelog.rst

Currently, the ChangeLog file is a dangling symlink pointing to the
removed CHANGES file. Fix the link by pointing to doc/arm/changelog.rst.

(cherry picked from commit de0598cbc3691e2443b6d9ac90b9ea464b7678e0)

15 months agoCheck dangling symlinks in the repository
Michal Nowak [Tue, 18 Feb 2025 10:42:03 +0000 (11:42 +0100)] 
Check dangling symlinks in the repository

(cherry picked from commit f3087f129986b4034ffe6949008a8738717ed6c4)

15 months ago[9.18] fix: ci: No need to delete the "only" keyword in generate-tsan-stress-jobs.py
Michal Nowak [Fri, 28 Feb 2025 10:50:43 +0000 (10:50 +0000)] 
[9.18] fix: ci: No need to delete the "only" keyword in generate-tsan-stress-jobs.py

29fd7564083731373bd132ec65ffc0a9072f8efc replaced "only" with "rules" in
.gitlab-ci.yml but forgot to drop the removal from here, hence the
script was broken.

(cherry picked from commit 6e2272d769a205e7ca98f698a578f9daf6d8d28d)

Backport of MR !10185

Merge branch 'mnowak/do-not-delete-only-keyword-in-generate-tsan-stress-jobs' into 'bind-9.18'

See merge request isc-projects/bind9!10188

15 months agoNo need to delete the "only" keyword in generate-tsan-stress-jobs.py
Michal Nowak [Thu, 27 Feb 2025 17:51:15 +0000 (18:51 +0100)] 
No need to delete the "only" keyword in generate-tsan-stress-jobs.py

29fd7564083731373bd132ec65ffc0a9072f8efc replaced "only" with "rules" in
.gitlab-ci.yml but forgot to drop the removal from here, hence the
script was broken.

(cherry picked from commit 6e2272d769a205e7ca98f698a578f9daf6d8d28d)

15 months ago[9.18] new: ci: Run shotgun tests on MRs
Nicki Křížek [Thu, 27 Feb 2025 14:30:05 +0000 (14:30 +0000)] 
[9.18] new: ci: Run shotgun tests on MRs

Execute DNS Shotgun performance tests on the regular MRs and compare the changes they introduce against the MR diff base. The results are evaluated automatically - the shotgun jobs will fail if thresholds for CPU/memory/latency difference is exceeded.

Backport of MR !10127

Merge branch 'backport-nicki/ci-shotgun-eval-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10184

15 months agoReplace deprecated only/except with rules in .gitlab-ci.yml
Nicki Křížek [Tue, 25 Feb 2025 16:48:05 +0000 (17:48 +0100)] 
Replace deprecated only/except with rules in .gitlab-ci.yml

The keyword rules allows more flexible and complex conditions when
deciding whether to create the job and also makes it possible run tweak
variables or job properties depending on arbitraty rules. Since it's
not possible to combine only/except and rules together, replace all
uses of only/except to avoid any potential future issues.

(cherry picked from commit 29fd7564083731373bd132ec65ffc0a9072f8efc)

15 months agoRun shotgun tests on MRs
Nicki Křížek [Wed, 19 Feb 2025 15:06:22 +0000 (16:06 +0100)] 
Run shotgun tests on MRs

If the shotgun tests are executed for MRs, compare it against the MR's
base rather than the previous release. Only fail the job in case the
performance drops (pass on performance improvements).

Note that start_in optimization was removed, since it isn't properly
supported with rules as of February 2025
(https://gitlab.com/gitlab-org/gitlab/-/issues/424203). Without this
optimization, container test images are likely to be re-built
unnecessarily when testing different protocols. A workaround for the
.gitlab-ci.yml exists, but the extra complexity doesn't seem justified.
The container image builds might change or be optimized in the future,
so let's just go with the build duplication for now.

(cherry picked from commit 4214c1e8a71d857fc8d602dc577260934c6342f5)

15 months ago[9.18] fix: dev: Prevent a reference leak when using plugins
Evan Hunt [Wed, 26 Feb 2025 00:59:10 +0000 (00:59 +0000)] 
[9.18] fix: dev: Prevent a reference leak when using plugins

The `NS_QUERY_DONE_BEGIN` and `NS_QUERY_DONE_SEND` plugin hooks could cause a reference leak if they returned `NS_HOOK_RETURN` without cleaning up the query context properly.

Closes #2094

Backport of MR !9971

Merge branch 'backport-2094-plugin-reference-leak-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10171

15 months agowrap ns_client_error() for unit testing
Evan Hunt [Wed, 26 Feb 2025 00:23:14 +0000 (16:23 -0800)] 
wrap ns_client_error() for unit testing

When testing, the client object doesn't have a proper
netmgr handle, so ns_client_error() needs to be a no-op.

(cherry picked from commit ae37ef45ff45db4919842ad29d3f8dfe0c77c76c)

15 months agoprevent a reference leak from the ns_query_done hooks
Evan Hunt [Wed, 22 Jan 2025 01:57:00 +0000 (17:57 -0800)] 
prevent a reference leak from the ns_query_done hooks

if the NS_QUERY_DONE_BEGIN or NS_QUERY_DONE_SEND hook is
used in a plugin and returns NS_HOOK_RETURN, some of the
cleanup in ns_query_done() can be skipped over, leading
to reference leaks that can cause named to hang on shut
down.

this has been addressed by adding more housekeeping
code after the cleanup: tag in ns_query_done().

(cherry picked from commit c2e43582678ec5d0c40e19c671d60012b36ac312)

15 months ago[9.18] fix: dev: Fix a logic error in cache_name()
Evan Hunt [Tue, 25 Feb 2025 00:23:37 +0000 (00:23 +0000)] 
[9.18] fix: dev: Fix a logic error in cache_name()

A change in 6aba56ae8 (checking whether a rejected RRset was identical
to the data it would have replaced, so that we could still cache a
signature) inadvertently introduced cases where processing of a
response would continue when previously it would have been skipped.

Closes #5197

Backport of MR !10157

Merge branch 'backport-5197-cache_name-logic-error-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10159

15 months agoFix a logic error in cache_name()
Evan Hunt [Mon, 24 Feb 2025 22:30:39 +0000 (14:30 -0800)] 
Fix a logic error in cache_name()

A change in 6aba56ae8 (checking whether a rejected RRset was identical
to the data it would have replaced, so that we could still cache a
signature) inadvertently introduced cases where processing of a
response would continue when previously it would have been skipped.

(cherry picked from commit d0fd9cbe3b0455d0db04b5afe67b7edc44e55965)

15 months ago[9.18] fix: usr: Fix RPZ race condition during a reconfiguration 10151/head
Arаm Sаrgsyаn [Fri, 21 Feb 2025 12:30:50 +0000 (12:30 +0000)] 
[9.18] fix: usr: Fix RPZ race condition during a reconfiguration

With RPZ in use, `named` could terminate unexpectedly because of a race condition when a reconfiguration command was received using `rndc`. This has been fixed.

Closes #5146

Backport of MR !10079

Merge branch 'backport-5146-rpz-reconfig-bug-fix-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10145

15 months agoFix RPZ bug when resuming a query during a reconfiguration
Aram Sargsyan [Wed, 5 Feb 2025 09:36:09 +0000 (09:36 +0000)] 
Fix RPZ bug when resuming a query during a reconfiguration

After a reconfiguration the old view can be left without a valid
'rpzs' member, because when the RPZ is not changed during the named
reconfiguration 'rpzs' "migrate" from the old view into the new
view, so when a query resumes it can find that 'qctx->view->rpzs'
is NULL which query_resume() currently doesn't expect to happen if
it's recursing and 'qctx->rpz_st' is not NULL.

Fix the issue by adding a NULL-check. In order to not split the log
message to two different log messages depending on whether
'qctx->view->rpzs' is NULL or not, change the message to not log
the RPZ policy's "version" which is just a runtime counter and is
most likely not very useful for the users.

(cherry picked from commit 3ea2fbc238e0d933b9f87dfd8fdab9233d978e33)

15 months ago[9.18] fix: usr: Remove NSEC/DS/NSEC3 RRSIG check from dns_message_parse
Mark Andrews [Fri, 21 Feb 2025 03:53:32 +0000 (03:53 +0000)] 
[9.18] fix: usr: Remove NSEC/DS/NSEC3 RRSIG check from dns_message_parse

Previously, when parsing responses, named incorrectly rejected responses without matching RRSIG records for NSEC/DS/NSEC3 records in the authority section. This rejection, if appropriate, should have been left for the validator to determine and has been fixed.

Closes #5185

Backport of MR !10125

Merge branch 'backport-5185-remove-rrsig-check-from-dns_message_parse-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10143

15 months agoCheck insecure response with missing RRSIG in authority
Mark Andrews [Wed, 19 Feb 2025 01:31:16 +0000 (12:31 +1100)] 
Check insecure response with missing RRSIG in authority

This scenario should succeed but wasn't due rejection of the
message at the message parsing stage.

(cherry picked from commit 4271d93f00909fad74d694121da970b1a633c495)

15 months agoRemove check for missing RRSIG records from getsection
Mark Andrews [Tue, 18 Feb 2025 23:34:47 +0000 (10:34 +1100)] 
Remove check for missing RRSIG records from getsection

Checking whether the authority section is properly signed should
be left to the validator.  Checking in getsection (dns_message_parse)
was way too early and resulted in resolution failures of lookups
that should have otherwise succeeded.

(cherry picked from commit 83159d0a545be2845f08386f5dffdc2ac3721ba5)

15 months ago[9.18] fix: dev: Do not cache signatures for rejected data
Evan Hunt [Thu, 20 Feb 2025 03:26:51 +0000 (03:26 +0000)] 
[9.18] fix: dev: Do not cache signatures for rejected data

The cache has been updated so that if new data is rejected - for example, because there was already existing data at a higher trust level - then its covering RRSIG will also be rejected.

Closes #5132

Backport of MR !9999

Merge branch 'backport-5132-improve-cd-behavior-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10135

15 months agoadd a test with an inconsistent NS RRset
Evan Hunt [Thu, 20 Feb 2025 02:22:35 +0000 (18:22 -0800)] 
add a test with an inconsistent NS RRset

add a zone with different NS RRsets in the parent and child,
and test resolver and forwarder behavior with and without +CD.

(cherry picked from commit e4652a0444a514773686e75752ad5c65daa753d5)

15 months agoCheck whether a rejected rrset is different
Evan Hunt [Thu, 20 Feb 2025 01:51:53 +0000 (17:51 -0800)] 
Check whether a rejected rrset is different

Add a new dns_rdataset_equals() function to check whether two
rdatasets are equal in DNSSEC terms.

When an rdataset being cached is rejected because its trust
level is lower than the existing rdataset, we now check to see
whether the rejected data was identical to the existing data.
This allows us to cache a potentially useful RRSIG when handling
CD=1 queries, while still rejecting RRSIGs that would definitely
have resulted in a validation failure.

(cherry picked from commit 6aba56ae89cde535fcc6fbee0366c843cdf47845)

15 months ago[9.18] fix: dev: Post [CVE-2024-12705] Performance Drop Fixes
Artem Boldariev [Wed, 19 Feb 2025 18:59:51 +0000 (18:59 +0000)] 
[9.18] fix: dev: Post [CVE-2024-12705] Performance Drop Fixes

Backport of !10109.

Merge branch 'artem-doh-performance-drop-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10128

15 months agoDoH: http_send_outgoing() return value is not used
Artem Boldariev [Wed, 19 Feb 2025 10:28:37 +0000 (12:28 +0200)] 
DoH: http_send_outgoing() return value is not used

The value returned by http_send_outgoing() is not used anywhere, so we
make it not return anything (void). Probably it is an omission from
older times.

(cherry picked from commit 2adabe835a290c021948a43a4c2c25ce2806aef2)

15 months agoDoH: Fix missing send callback calls
Artem Boldariev [Wed, 12 Feb 2025 20:58:42 +0000 (22:58 +0200)] 
DoH: Fix missing send callback calls

When handling outgoing data, there were a couple of rarely executed
code paths that would not take into account that the callback MUST be
called.

It could lead to potential memory leaks and consequent shutdown hangs.

(cherry picked from commit 8b8f4d500d9c1d41d95d34a79c8935823978114c)

15 months agoDoH: change how the active streams number is calculated
Artem Boldariev [Thu, 13 Feb 2025 13:05:10 +0000 (15:05 +0200)] 
DoH: change how the active streams number is calculated

This commit changes the way how the number of active HTTP streams is
calculated and allows it to scale with the values of the maximum
amount of streams per connection, instead of effectively capping at
STREAM_CLIENTS_PER_CONN.

The original limit, which is intended to define the pipelining limit
for TCP/DoT. However, it appeared to be too restrictive for DoH, as it
works quite differently and implements pipelining at protocol level by
the means of multiplexing multiple streams. That renders each stream
to be effectively a separate connection from the point of view of the
rest of the codebase.

(cherry picked from commit a22bc2d7d4974d730e4a7267d2f85e74db53c688)

15 months agoDoH: Track the amount of in flight outgoing data
Artem Boldariev [Thu, 13 Feb 2025 12:53:18 +0000 (14:53 +0200)] 
DoH: Track the amount of in flight outgoing data

Previously we would limit the amount of incoming data to process based
solely on the presence of not completed send requests. That worked,
however, it was found to severely degrade performance in certain
cases, as was revealed during extended testing.

Now we switch to keeping track of how much data is in flight (or ready
to be in flight) and limit the amount of processed incoming data when
the amount of in flight data surpasses the given threshold, similarly
to like we do in other transports.

(cherry picked from commit 05e8a508188116e8e367aaf5e68575c8cebb4207)

15 months agoMerge tag 'v9.18.34' into bind-9.18
Andoni Duarte Pintado [Wed, 19 Feb 2025 16:42:38 +0000 (17:42 +0100)] 
Merge tag 'v9.18.34' into bind-9.18

15 months ago[9.18] fix: usr: Fix deferred validation of unsigned DS and DNSKEY records
Mark Andrews [Wed, 19 Feb 2025 01:57:40 +0000 (01:57 +0000)] 
[9.18] fix: usr: Fix deferred validation of unsigned DS and DNSKEY records

When processing a query with the "checking disabled" bit set (CD=1), `named` stores the unvalidated result in the cache, marked "pending". When the same query is sent with CD=0, the cached data is validated, and either accepted as an answer, or ejected from the cache as invalid. This deferred validation was not attempted for DS and DNSKEY records if they had no cached signatures, causing spurious validation failures. We now complete the deferred validation in this scenario.

Also, if deferred validation fails, we now re-query the data to find out whether the zone has been corrected since the invalid data was cached.

Closes #5066

Backport of MR !10104

Merge branch 'backport-5066-fix-strip-dnssec-rrsigs-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10106

15 months agoRe-fetch pending records that failed validation
Mark Andrews [Fri, 20 Dec 2024 09:24:05 +0000 (20:24 +1100)] 
Re-fetch pending records that failed validation

If a deferred validation on data that was originally queried with
CD=1 fails, we now repeat the query, since the zone data may have
changed in the meantime.

(cherry picked from commit 04b1484ed8308baede372e642d1ed7c05c523a94)

15 months agoComplete the deferred validation if there are no RRSIGs
Mark Andrews [Fri, 20 Dec 2024 09:24:05 +0000 (20:24 +1100)] 
Complete the deferred validation if there are no RRSIGs

When a query is made with CD=1, we store the result in the
cache marked pending so that it can be validated later, at
which time it will either be accepted as an answer or removed
from the cache as invalid.  Deferred validation was not
attempted when there were no cached RRSIGs for DNSKEY and
DS.  We now complete the deferred validation in this scenario.

(cherry picked from commit 8b900d180886ca333d94c87c782619dbedc775b5)

15 months agoAdd stripped DS RRSIG senario
Mark Andrews [Mon, 23 Dec 2024 00:12:56 +0000 (11:12 +1100)] 
Add stripped DS RRSIG senario

(cherry picked from commit 66f293a9529dc4b80fd89126e36abd9dccef7649)

15 months agoAdd stripped DNSKEY RRSIG senario
Mark Andrews [Fri, 20 Dec 2024 09:24:05 +0000 (20:24 +1100)] 
Add stripped DNSKEY RRSIG senario

(cherry picked from commit a71b61756650b0e1849d9e074c5f370a3067780b)

15 months ago[9.18] chg: test: Rewrite keyfromlabel system test to pytest
Michal Nowak [Tue, 18 Feb 2025 09:47:50 +0000 (09:47 +0000)] 
[9.18] chg: test: Rewrite keyfromlabel system test to pytest

Backport of MR !9188

Merge branch 'backport-mnowak/pytest_rewrite_keyfromlabel-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10113

15 months agoRewrite keyfromlabel system test to pytest
Michal Nowak [Tue, 23 Jul 2024 14:17:40 +0000 (16:17 +0200)] 
Rewrite keyfromlabel system test to pytest

(cherry picked from commit 409f394d6eb5352f1f7ca38af43b166bc4a1a3bd)

15 months ago[9.18] fix: doc: Fix typo in ARM related to max-stale-ttl
Matthijs Mekking [Tue, 18 Feb 2025 08:24:01 +0000 (08:24 +0000)] 
[9.18] fix: doc: Fix typo in ARM related to max-stale-ttl

The text that stale-cache-enable is set to no has no effect on
max-cache-ttl, but on max-stale-ttl.

Closes #5181

Backport of MR !10108

Merge branch 'backport-5181-max-stale-ttl-typo-arm-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10116

15 months agoFix typo in ARM related to max-stale-ttl
Matthijs Mekking [Mon, 17 Feb 2025 15:24:00 +0000 (16:24 +0100)] 
Fix typo in ARM related to max-stale-ttl

The text that stale-cache-enable is set to no has no effect on
max-cache-ttl, but on max-stale-ttl.

(cherry picked from commit b017d9fe6715c8eee3a0344395c81136d4dde8c8)

15 months ago[9.18] chg: test: Rewrite keepalive system test to pytest
Michal Nowak [Mon, 17 Feb 2025 20:01:04 +0000 (20:01 +0000)] 
[9.18] chg: test: Rewrite keepalive system test to pytest

Backport of MR !9202

Merge branch 'backport-mnowak/pytest_rewrite_keepalive-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10111

15 months agoRewrite keepalive system test to pytest
Michal Nowak [Thu, 7 Mar 2024 11:37:10 +0000 (12:37 +0100)] 
Rewrite keepalive system test to pytest

(cherry picked from commit b804a70fac2afe5ea17d83cf7c129a44cc281b9c)

15 months agoAdd Dig interface
Michal Nowak [Fri, 7 Feb 2025 10:26:04 +0000 (11:26 +0100)] 
Add Dig interface

(cherry picked from commit 7347abd01f38ac77916c1ce8fb1cfff91d32aa94)

15 months ago[9.18] fix: dev: Fix a race issue in dns_view_addzone()
Arаm Sаrgsyаn [Mon, 17 Feb 2025 17:23:38 +0000 (17:23 +0000)] 
[9.18] fix: dev: Fix a race issue in dns_view_addzone()

Views use two types of reference counting - regular and weak, and
when there are no more regular references, the `view_flushanddetach()`
function destroys or detaches some parts of the view, including
`view->zonetable`, while other parts are freed by `destroy()` when
the last weak reference is detached. Since catalog zones use weak
references to attach a view, it's currently possible that during
shutdown catalog zone processing will try to add a new zone into
an otherwise unused view (because it's shutting down) which doesn't
have an attached zonetable any more. This could cause an assertion
failure. Fix this issue by modifying the `dns_view_addzone()` function
to expect that `view->zonetable` can be `NULL`, and in that case just
return `ISC_R_SHUTTINGDOWN`.

Closes #5138

Merge branch '5138-fix-dns_view_addzone-race-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10086

15 months agoFix a race issue in dns_view_addzone()
Aram Sargsyan [Tue, 11 Feb 2025 10:22:35 +0000 (10:22 +0000)] 
Fix a race issue in dns_view_addzone()

Views use two types of reference counting - regular and weak, and
when there are no more regular references, the view_flushanddetach()
function destroys or detaches some parts of the view, including
'view->zonetable', while other parts are freed by destroy() when
the last weak reference is detached. Since catalog zones use weak
references to attach a view, it's currently possible that during
shutdown catalog zone processing will try to add a new zone into
an otherwise unused view (because it's shutting down) which doesn't
have an attached zonetable any more. This could cause an assertion
failure. Fix this issue by modifying the dns_view_addzone() function
to expect that 'view->zonetable' can be NULL, and in that case just
return ISC_R_SHUTTINGDOWN.

15 months agofix: dev: Finalize removal of memory debug flags size and mctx [9.18]
Petr Špaček [Mon, 17 Feb 2025 16:49:43 +0000 (16:49 +0000)] 
fix: dev: Finalize removal of memory debug flags size and mctx [9.18]

Backport of !9606

Merge branch 'bind-9.18-memory-flags-size-mctx' into 'bind-9.18'

See merge request isc-projects/bind9!9607

15 months agoFinalize removal of memory debug flags size and mctx
Petr Menšík [Wed, 9 Oct 2024 13:32:07 +0000 (15:32 +0200)] 
Finalize removal of memory debug flags size and mctx

Commit 4b3d0c66009d30f5c0bc12ee128fc59f1d853f44 has removed them, but
did not remove few traces in documentation and help. Remove them from
remaining places.

15 months ago[9.18] fix: usr: "CNAME and other data check" not applied to all types
Mark Andrews [Fri, 14 Feb 2025 03:18:41 +0000 (03:18 +0000)] 
[9.18] fix: usr:  "CNAME and other data check" not applied to all types

An incorrect optimization caused "CNAME and other data" errors not to be detected if certain types were at the same node as a CNAME.  This has been fixed.

Closes #5150

Backport of MR !10033

Merge branch 'backport-5150-cname-and-other-data-check-not-applied-to-all-types-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10101

15 months agoMove SVCB and HTTPS to be in type code order
Mark Andrews [Wed, 5 Feb 2025 00:35:11 +0000 (11:35 +1100)] 
Move SVCB and HTTPS to be in type code order

(cherry picked from commit 559fac329a2f9c839673a928ba3b8caf6b245655)