]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
2 years agoUpdate release notes [GL #4518] [GL #4528]
Artem Boldariev [Thu, 11 Jan 2024 14:39:59 +0000 (16:39 +0200)] 
Update release notes [GL #4518] [GL #4528]

Mentioned that all changes to listen-on statements are now applied on
reconfiguration.

2 years agoUpdate CHANGES [GL #4518] [GL #4528]
Artem Boldariev [Thu, 11 Jan 2024 14:30:17 +0000 (16:30 +0200)] 
Update CHANGES [GL #4518] [GL #4528]

Mentioned that all changes to listen-on statements are now applied on
reconfiguration.

2 years agoAdd a system test to verify listener transport change functionality
Artem Boldariev [Wed, 10 Jan 2024 17:24:46 +0000 (19:24 +0200)] 
Add a system test to verify listener transport change functionality

This commit adds a system test that helps to verify that changing a
listener transport by editing "listen-on" statements before
reconfiguration works as expected.

2 years agoRecreate listeners on DNS transport change
Artem Boldariev [Tue, 9 Jan 2024 17:16:26 +0000 (19:16 +0200)] 
Recreate listeners on DNS transport change

This commit ensures that listeners are recreated on reconfiguration in
the case when their type changes (or when PROXY protocol type changes,
too).

Previously, if a "listen-on" statement was modified to represent a
different transport, BIND would not pick-up the change on
reconfiguration if listener type changes (e.g. DoH -> DoT) for a given
interface address and port combination. This commit fixes that by
recreating the listener.

Initially, that worked for most of the new transports as we would
recreate listeners on each reconfiguration for DoH and DoT. But at
some point we changed that in such a way that listeners were not
recreated to avoid rebinding a port as on some platforms only root can
do that for port numbers <1000, making some ports binding possible
only on start-up. We chose to asynchronously update listener socket
settings (like TLS contexts, HTTP settings) instead.

Now, we both avoid recreating the sockets if unnecessary and recreate
listeners when listener type changes.

2 years agoMerge branch '3504-tls-cipher-suites' into 'main'
Artem Boldariev [Fri, 12 Jan 2024 12:35:21 +0000 (12:35 +0000)] 
Merge branch '3504-tls-cipher-suites' into 'main'

Add "cipher-suites" option to the "tls" block

Closes #3504

See merge request isc-projects/bind9!8576

2 years agoUpdate the release notes [GL #3504]
Artem Boldariev [Thu, 14 Dec 2023 13:57:55 +0000 (15:57 +0200)] 
Update the release notes [GL #3504]

Mention that the 'tls' block was extended with a new 'cipher-suites'
option.

2 years agoUpdate CHANGES [GL #3504]
Artem Boldariev [Thu, 14 Dec 2023 13:34:30 +0000 (15:34 +0200)] 
Update CHANGES [GL #3504]

Mention that the 'tls' block was extended with a new 'cipher-suites'
option.

2 years agoUpdate the options reference to document 'cipher-suites'
Artem Boldariev [Wed, 13 Dec 2023 16:14:32 +0000 (18:14 +0200)] 
Update the options reference to document 'cipher-suites'

This commit documents the new 'cipher-suites' options of the 'tls'
statement.

2 years agoUpdate the documentation for the 'ciphers' option
Artem Boldariev [Wed, 13 Dec 2023 15:29:47 +0000 (17:29 +0200)] 
Update the documentation for the 'ciphers' option

We need to mention that the 'ciphers' option works only for TLSv1.2
because that is known to cause confusion for some of our users.

2 years agoAdd TLS 'cipher-suites' checkconf test
Artem Boldariev [Tue, 12 Dec 2023 16:37:30 +0000 (18:37 +0200)] 
Add TLS 'cipher-suites' checkconf test

This commit adds a set of valid and invalid configuration files
samples that use the new 'cipher-suites' option of the 'tls'
statement.

2 years agoAdd a 'cipher-suites' option system test
Artem Boldariev [Fri, 1 Dec 2023 19:11:22 +0000 (21:11 +0200)] 
Add a 'cipher-suites' option system test

This commit adds a new system test which verifies that using the
'cipher-suites' option actually works as expected (as well as adds
first TLSv1.3 specific tests).

2 years agoIntegrate TLS cipher suites support into BIND
Artem Boldariev [Thu, 30 Nov 2023 20:26:53 +0000 (22:26 +0200)] 
Integrate TLS cipher suites support into BIND

This commit makes BIND use the new 'cipher-suites' option from the
'tls' statement.

2 years agoAdd TLS cipher suites configuration option to BIND
Artem Boldariev [Thu, 30 Nov 2023 19:35:20 +0000 (21:35 +0200)] 
Add TLS cipher suites configuration option to BIND

This commit extends the 'tls' statement with 'cipher-suites' option.

2 years agoAdd TLS cipher-suites related low-level functionality
Artem Boldariev [Thu, 30 Nov 2023 18:57:07 +0000 (20:57 +0200)] 
Add TLS cipher-suites related low-level functionality

This commits adds low-level wrappers on top of
'SSL_CTX_set_ciphersuites()'. These are going to be a foundation
behind the 'cipher-suites' option of the 'tls' statement.

2 years agoMerge branch '4508-crash-in-host' into 'main'
Arаm Sаrgsyаn [Thu, 11 Jan 2024 09:54:01 +0000 (09:54 +0000)] 
Merge branch '4508-crash-in-host' into 'main'

Fix a possible dig/host crash in "NS search" mode

Closes #4508

See merge request isc-projects/bind9!8635

2 years agoAdd a CHANGES note for [GL #4508]
Aram Sargsyan [Tue, 9 Jan 2024 12:01:14 +0000 (12:01 +0000)] 
Add a CHANGES note for [GL #4508]

2 years agoPrint a dig comment about the failed query consistently
Aram Sargsyan [Tue, 9 Jan 2024 11:51:34 +0000 (11:51 +0000)] 
Print a dig comment about the failed query consistently

Dig failed to print a comment about the reason of the unacceptable
query reply got from a server when there was no other query to
start in the lookup's chain.

Add an "else" block to print out the comment even when not starting
up the next query.

2 years agoFix a possible dig/host crash in "NS search" mode
Aram Sargsyan [Tue, 9 Jan 2024 11:35:11 +0000 (11:35 +0000)] 
Fix a possible dig/host crash in "NS search" mode

When getting a SERVFAIL reply from a query, 'host' tries to start
the next query in the lookup's list (also true for 'dig  +nofail').
However, when running with the '-C' switch (or +nssearch for 'dig'),
all the queries in the lookup start from the beginning, so that logic
brings to a crash because of the attempted start of the query which
was already started.

Don't start the next query in the affected code path when in +nssearch
mode.

2 years agoMerge branch '4501-defer-control-channel-message-invalidation' into 'main'
Mark Andrews [Wed, 10 Jan 2024 21:52:03 +0000 (21:52 +0000)] 
Merge branch '4501-defer-control-channel-message-invalidation' into 'main'

Defer control channel message invalidation

Closes #4501

See merge request isc-projects/bind9!8641

2 years agoDefer control channel message invalidation
Mark Andrews [Wed, 10 Jan 2024 03:35:36 +0000 (14:35 +1100)] 
Defer control channel message invalidation

The conn_shutdown() function is called whenever a control channel
connection is supposed to be closed, e.g. after a response to the client
is sent or when named is being shut down.  That function calls
isccc_ccmsg_invalidate(), which resets the magic number in the structure
holding the messages exchanged over a given control channel connection
(isccc_ccmsg_t).  The expectation here is that all operations related to
the given control channel connection will have been completed by the
time the connection needs to be shut down.

However, if named shutdown is initiated while a control channel message
is still in flight, some netmgr callbacks might still be pending when
conn_shutdown() is called and isccc_ccmsg_t invalidated.  This causes
the REQUIRE assertion checking the magic number in ccmsg_senddone() to
fail when the latter function is eventually called, resulting in a
crash.

Fix by splitting up isccc_ccmsg_invalidate() into two separate
functions:

  - isccc_ccmsg_disconnect(), which initiates TCP connection shutdown,
  - isccc_ccmsg_invalidate(), which cleans up magic number and buffer,

and then:

  - replacing all existing uses of isccc_ccmsg_invalidate() with calls
    to isccc_ccmsg_disconnect(),

  - only calling isccc_ccmsg_invalidate() when all netmgr callbacks are
    guaranteed to have been run.

Adjust function comments accordingly.

2 years agoMerge branch '3535-fetchlimit-test-flaky' into 'main'
Tom Krizek [Wed, 10 Jan 2024 14:44:05 +0000 (14:44 +0000)] 
Merge branch '3535-fetchlimit-test-flaky' into 'main'

Allow the fetchlimit test to be re-run

Closes #3535

See merge request isc-projects/bind9!8612

2 years agoAllow the fetchlimit test to be re-run
Tom Krizek [Fri, 22 Dec 2023 14:58:27 +0000 (15:58 +0100)] 
Allow the fetchlimit test to be re-run

The test is known to be unstable due to timing issues. Prevent frequent
false positives by allowing the test to be re-run by the flaky pytest
plugin.

2 years agoDon't type-check the flaky plugin with mypy
Tom Krizek [Fri, 22 Dec 2023 15:11:21 +0000 (16:11 +0100)] 
Don't type-check the flaky plugin with mypy

Since we execute mypy for bin/tests/system/isctest package, this is now
needed because the flaky package doesn't have type hints.

2 years agoMove custom pytest markers into isctest module
Tom Krizek [Fri, 22 Dec 2023 14:56:58 +0000 (15:56 +0100)] 
Move custom pytest markers into isctest module

Keep our pytest code more organized by moving the shared code for custom
pytest markers into a dedicated isctest/mark.py module.

2 years agoMerge branch 'tkrizek/nsupdate-test-flaky-on-freebsd' into 'main'
Tom Krizek [Wed, 10 Jan 2024 13:43:08 +0000 (13:43 +0000)] 
Merge branch 'tkrizek/nsupdate-test-flaky-on-freebsd' into 'main'

Allow nsupdate test rerun on FreeBSD

See merge request isc-projects/bind9!8638

2 years agoAllow nsupdate test rerun on FreeBSD
Tom Krizek [Wed, 10 Jan 2024 09:53:18 +0000 (10:53 +0100)] 
Allow nsupdate test rerun on FreeBSD

The "exceeded time limit waiting for literal 'too many DNS UPDATEs
queued' in ns1/named.run" is prone to fail due to a timing issue.
Despite out efforts to stabilize it, the check still often fails on
FreeBSD in our CI. Allow the test to be re-run on this platform.

2 years agoMerge branch '4522-dig-in-9-19-19-accept-weird-source-and-destination-ports-within...
Mark Andrews [Wed, 10 Jan 2024 00:05:24 +0000 (00:05 +0000)] 
Merge branch '4522-dig-in-9-19-19-accept-weird-source-and-destination-ports-within-the-proxy-statement' into 'main'

Resolve "Dig in 9.19.19 accept weird source- and destination-ports within the "proxy"-statement"

Closes #4522

See merge request isc-projects/bind9!8626

2 years agoError if proxy ports are too big
Mark Andrews [Mon, 8 Jan 2024 02:03:58 +0000 (13:03 +1100)] 
Error if proxy ports are too big

2 years agoMerge branch 'aram/tests-dighost-fix-intermittent-failure' into 'main'
Arаm Sаrgsyаn [Tue, 9 Jan 2024 14:33:22 +0000 (14:33 +0000)] 
Merge branch 'aram/tests-dighost-fix-intermittent-failure' into 'main'

Make digdelv test work in different network envs (continued)

See merge request isc-projects/bind9!8636

2 years agoMake digdelv test work in different network envs (continued)
Aram Sargsyan [Tue, 9 Jan 2024 13:29:32 +0000 (13:29 +0000)] 
Make digdelv test work in different network envs (continued)

This commit complements the 1e7d832342aa2aaaeb8ef1710ec095dfcade4c6d
commit.

2 years agoMerge branch 'tkrizek/xfer-test-dnssec-validation-no' into 'main'
Tom Krizek [Mon, 8 Jan 2024 18:49:17 +0000 (18:49 +0000)] 
Merge branch 'tkrizek/xfer-test-dnssec-validation-no' into 'main'

Add missing dnssec-validation to ns4 in xfer test

See merge request isc-projects/bind9!8630

2 years agoAdd missing dnssec-validation to ns4 in xfer test
Tom Krizek [Mon, 8 Jan 2024 17:30:47 +0000 (18:30 +0100)] 
Add missing dnssec-validation to ns4 in xfer test

This file was missing explicit dnssec-validation. Seems like it was
missed in our previous efforts, probably because of the different
filename / extension. Rename it to end with *.in to reflect that it is a
template file used by copy_setports.

2 years agoMerge branch '4521-timeout-in-dig-not-handled-in-rndc-system-test' into 'main'
Tom Krizek [Mon, 8 Jan 2024 17:39:03 +0000 (17:39 +0000)] 
Merge branch '4521-timeout-in-dig-not-handled-in-rndc-system-test' into 'main'

Resolve "Timeout in dig not handled in system tests"

Closes #4521

See merge request isc-projects/bind9!8623

2 years agoHandle dig timing out gracefully in upforwd
Tom Krizek [Fri, 5 Jan 2024 14:14:26 +0000 (15:14 +0100)] 
Handle dig timing out gracefully in upforwd

2 years agoHandle dig timing out gracefully in staticstub
Tom Krizek [Fri, 5 Jan 2024 14:13:56 +0000 (15:13 +0100)] 
Handle dig timing out gracefully in staticstub

2 years agoHandle dig timing out gracefully in sortlist
Tom Krizek [Fri, 5 Jan 2024 14:13:34 +0000 (15:13 +0100)] 
Handle dig timing out gracefully in sortlist

2 years agoHandle dig timing out gracefully in rpz
Tom Krizek [Fri, 5 Jan 2024 14:13:12 +0000 (15:13 +0100)] 
Handle dig timing out gracefully in rpz

2 years agoHandle dig timing out gracefully in rootkeysentinel
Tom Krizek [Fri, 5 Jan 2024 14:12:30 +0000 (15:12 +0100)] 
Handle dig timing out gracefully in rootkeysentinel

2 years agoHandle dig timing out gracefully in qmin
Tom Krizek [Fri, 5 Jan 2024 14:11:39 +0000 (15:11 +0100)] 
Handle dig timing out gracefully in qmin

2 years agoHandle dig timing out gracefully in padding
Tom Krizek [Fri, 5 Jan 2024 14:11:10 +0000 (15:11 +0100)] 
Handle dig timing out gracefully in padding

2 years agoHandle dig timing out gracefully in nsupdate
Tom Krizek [Fri, 5 Jan 2024 14:10:36 +0000 (15:10 +0100)] 
Handle dig timing out gracefully in nsupdate

2 years agoHandle dig timing out gracefully in names
Tom Krizek [Fri, 5 Jan 2024 14:09:33 +0000 (15:09 +0100)] 
Handle dig timing out gracefully in names

2 years agoHandle dig timing out gracefully in masterfile
Tom Krizek [Fri, 5 Jan 2024 14:08:44 +0000 (15:08 +0100)] 
Handle dig timing out gracefully in masterfile

2 years agoHandle dig timing out gracefully in logfileconfig
Tom Krizek [Fri, 5 Jan 2024 14:08:05 +0000 (15:08 +0100)] 
Handle dig timing out gracefully in logfileconfig

2 years agoHandle dig timing out gracefully in legacy
Tom Krizek [Fri, 5 Jan 2024 14:07:40 +0000 (15:07 +0100)] 
Handle dig timing out gracefully in legacy

2 years agoHandle dig timing out gracefully in keepalive
Tom Krizek [Fri, 5 Jan 2024 14:06:56 +0000 (15:06 +0100)] 
Handle dig timing out gracefully in keepalive

2 years agoHandle dig timing out gracefully in dnstap
Tom Krizek [Fri, 5 Jan 2024 14:06:17 +0000 (15:06 +0100)] 
Handle dig timing out gracefully in dnstap

2 years agoHandle dig timing out gracefully in cookie
Tom Krizek [Fri, 5 Jan 2024 14:05:22 +0000 (15:05 +0100)] 
Handle dig timing out gracefully in cookie

2 years agoHandle dig timing out gracefully in autosign
Tom Krizek [Fri, 5 Jan 2024 14:04:48 +0000 (15:04 +0100)] 
Handle dig timing out gracefully in autosign

2 years agoHandle dig timing out gracefully in auth
Tom Krizek [Fri, 5 Jan 2024 14:04:17 +0000 (15:04 +0100)] 
Handle dig timing out gracefully in auth

2 years agoHandle dig timing out gracefully in allow-query
Tom Krizek [Fri, 5 Jan 2024 14:03:26 +0000 (15:03 +0100)] 
Handle dig timing out gracefully in allow-query

2 years agoHandle dig timing out gracefully in serve-stale
Mark Andrews [Fri, 5 Jan 2024 04:06:45 +0000 (15:06 +1100)] 
Handle dig timing out gracefully in serve-stale

2 years agoHandle dig timing out gracefully in rndc
Mark Andrews [Fri, 5 Jan 2024 03:53:42 +0000 (14:53 +1100)] 
Handle dig timing out gracefully in rndc

2 years agoMerge branch 'mnowak/set-up-version-and-release-notes-for-bind-9.19.21' into 'main'
Michal Nowak [Mon, 8 Jan 2024 11:57:10 +0000 (11:57 +0000)] 
Merge branch 'mnowak/set-up-version-and-release-notes-for-bind-9.19.21' into 'main'

Set up version and release notes for BIND 9.19.21

See merge request isc-projects/bind9!8627

2 years agoSet up release notes for BIND 9.19.21
Michal Nowak [Mon, 8 Jan 2024 11:40:52 +0000 (12:40 +0100)] 
Set up release notes for BIND 9.19.21

2 years agoUpdate BIND version to 9.19.21-dev
Michal Nowak [Mon, 8 Jan 2024 11:40:52 +0000 (12:40 +0100)] 
Update BIND version to 9.19.21-dev

2 years agoUpdate BIND version for release
Michal Nowak [Fri, 5 Jan 2024 13:20:36 +0000 (14:20 +0100)] 
Update BIND version for release

2 years agoAdd a CHANGES marker
Michal Nowak [Fri, 5 Jan 2024 13:19:30 +0000 (14:19 +0100)] 
Add a CHANGES marker

2 years agoMerge branch 'michal/prepare-documentation-for-bind-9.19.20' into 'v9.19.20-release'
Michal Nowak [Fri, 5 Jan 2024 13:17:42 +0000 (13:17 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.19.20' into 'v9.19.20-release'

Prepare documentation for BIND 9.19.20

See merge request isc-private/bind9!624

2 years agoFix Danger rules for flagging release note issues
Michał Kępień [Fri, 5 Jan 2024 11:51:13 +0000 (12:51 +0100)] 
Fix Danger rules for flagging release note issues

The logic contained in dangerfile.py incorrectly warns about missing
release note changes for merge requests preparing release documentation
as such merge requests rename files in the doc/notes/ directory.  This
(correctly) causes these files to be passed to dangerfile.py via
danger.git.created_files and danger.git.deleted_files rather than via
danger.git.modified_files, which in turn causes the logic checking the
use of the "Release Notes" label to assume that no release notes are
added, removed, or modified by a given merge request.

Fix by considering all types of file changes (modifications, additions,
and removals - which also covers file renaming) when checking whether a
given merge request modifies release notes.  Update the warning messages
accordingly.

However, when trying to find release notes added by a given merge
request, deleted files must not be considered.  Tweak the logic looking
for GitLab identifiers in the release notes added by a given merge
request so that it only scans modified and added (or renamed) files.

2 years agoTweak and reword release notes
Michał Kępień [Fri, 5 Jan 2024 11:51:13 +0000 (12:51 +0100)] 
Tweak and reword release notes

2 years agoPrepare release notes for BIND 9.19.20
Michał Kępień [Fri, 5 Jan 2024 11:51:13 +0000 (12:51 +0100)] 
Prepare release notes for BIND 9.19.20

2 years agoMerge branch '4383-limit-tree-pruning-overhead' into 'v9.19.20-release'
Michał Kępień [Fri, 5 Jan 2024 11:39:08 +0000 (11:39 +0000)] 
Merge branch '4383-limit-tree-pruning-overhead' into 'v9.19.20-release'

Limit isc_async_run() overhead for tree pruning

See merge request isc-private/bind9!619

2 years agoAdd CHANGES entry for GL #4383
Michał Kępień [Thu, 4 Jan 2024 12:39:27 +0000 (13:39 +0100)] 
Add CHANGES entry for GL #4383

2 years agoLimit isc_async_run() overhead for tree pruning
Michał Kępień [Thu, 4 Jan 2024 12:39:27 +0000 (13:39 +0100)] 
Limit isc_async_run() overhead for tree pruning

Instead of issuing a separate isc_async_run() call for every RBTDB node
that triggers tree pruning, maintain a list of nodes from which tree
pruning can be started from and only issue an isc_async_run() call if
pruning has not yet been triggered by another RBTDB node.

In some older BIND 9 branches, the extra queuing overhead eliminated by
this change could be remotely exploited to cause excessive memory use.
Due to architectural shift, this branch is not vulnerable to that issue,
but applying the fix to the latter is nevertheless deemed prudent for
consistency and to make the code future-proof.

2 years agoMerge branch '4334-confidential-dns64-and-serve-stale' into 'v9.19.20-release'
Michał Kępień [Fri, 5 Jan 2024 11:22:24 +0000 (11:22 +0000)] 
Merge branch '4334-confidential-dns64-and-serve-stale' into 'v9.19.20-release'

[CVE-2023-5679] Fix a bad interaction between DNS64 and serve-stale

See merge request isc-private/bind9!588

2 years agoAdd release note for [GL #4334]
Mark Andrews [Thu, 12 Oct 2023 02:42:38 +0000 (13:42 +1100)] 
Add release note for [GL #4334]

2 years agoAdd CHANGES note for [GL #4334]
Mark Andrews [Thu, 12 Oct 2023 02:39:57 +0000 (13:39 +1100)] 
Add CHANGES note for [GL #4334]

2 years agoRestore dns64 state during serve-stale processing
Mark Andrews [Thu, 12 Oct 2023 01:01:46 +0000 (12:01 +1100)] 
Restore dns64 state during serve-stale processing

If we are in the process of looking for the A records as part of
dns64 processing and the server-stale timeout triggers, redo the
dns64 changes that had been made to the orignal qctx.

2 years agoMerge branch '4281-confidential-redirect-rfc1918-check-failure' into 'v9.19.20-release'
Michał Kępień [Fri, 5 Jan 2024 11:09:29 +0000 (11:09 +0000)] 
Merge branch '4281-confidential-redirect-rfc1918-check-failure' into 'v9.19.20-release'

[CVE-2023-5517] Fix handling of RFC 1918 reverse queries with "nxdomain-redirect" enabled

See merge request isc-private/bind9!584

2 years agoAdd release note for [GL #4281]
Mark Andrews [Tue, 10 Oct 2023 00:12:24 +0000 (11:12 +1100)] 
Add release note for [GL #4281]

2 years agoAdd CHANGES note for [GL #4281]
Mark Andrews [Tue, 10 Oct 2023 00:09:11 +0000 (11:09 +1100)] 
Add CHANGES note for [GL #4281]

2 years agoSave the correct result value to resume with nxdomain-redirect
Mark Andrews [Mon, 9 Oct 2023 23:58:18 +0000 (10:58 +1100)] 
Save the correct result value to resume with nxdomain-redirect

The wrong result value was being saved for resumption with
nxdomain-redirect when performing the fetch.  This lead to an assert
when checking that RFC 1918 reverse queries where not leaking to
the global internet.

2 years agoMerge branch '4234-confidential-use-hashmap-when-parsing' into 'v9.19.20-release'
Michał Kępień [Fri, 5 Jan 2024 10:43:31 +0000 (10:43 +0000)] 
Merge branch '4234-confidential-use-hashmap-when-parsing' into 'v9.19.20-release'

[CVE-2023-4408] Use hashmap when parsing DNS messages

See merge request isc-private/bind9!560

2 years agoAdd CHANGES and release note for [GL #4234]
Ondřej Surý [Wed, 11 Oct 2023 07:15:13 +0000 (09:15 +0200)] 
Add CHANGES and release note for [GL #4234]

2 years agoUse hashmap when parsing a message
Ondřej Surý [Mon, 11 Sep 2023 08:35:28 +0000 (10:35 +0200)] 
Use hashmap when parsing a message

When parsing messages use a hashmap instead of a linear search to reduce
the amount of work done in findname when there's more than one name in
the section.

There are two hashmaps:

1) hashmap for owner names - that's constructed for each section when we
hit the second name in the section and destroyed right after parsing
that section;

2) per-name hashmap - for each name in the section, we construct a new
hashmap for that name if there are more than one rdataset for that
particular name.

2 years agoMerge branch '4182-confidential-fix-races-in-dns-tsigkey-find' into 'v9.19.20-release'
Michał Kępień [Fri, 5 Jan 2024 10:18:28 +0000 (10:18 +0000)] 
Merge branch '4182-confidential-fix-races-in-dns-tsigkey-find' into 'v9.19.20-release'

Address races in dns_tsigkey_find()

See merge request isc-private/bind9!548

2 years agoAdd CHANGES note for [GL #4182]
Mark Andrews [Wed, 28 Jun 2023 23:27:29 +0000 (09:27 +1000)] 
Add CHANGES note for [GL #4182]

2 years agoAddress races in dns_tsigkey_find()
Mark Andrews [Wed, 28 Jun 2023 23:15:38 +0000 (09:15 +1000)] 
Address races in dns_tsigkey_find()

1) Restart the process with a write lock if we discover an expired key
while holding the read lock.

2) Move incrementing the key reference inside the lock block of code.

2 years agoMerge branch 'michal/add-placeholder-entries-to-CHANGES' into 'main'
Michał Kępień [Fri, 5 Jan 2024 09:05:44 +0000 (09:05 +0000)] 
Merge branch 'michal/add-placeholder-entries-to-CHANGES' into 'main'

Add placeholder entries to CHANGES

See merge request isc-projects/bind9!8625

2 years agoAdd placeholder entries to CHANGES
Michał Kępień [Fri, 5 Jan 2024 08:22:39 +0000 (09:22 +0100)] 
Add placeholder entries to CHANGES

Add placeholders for the following issues:

  - [GL #4182]
  - [GL #4234]
  - [GL #4281]
  - [GL #4334]
  - [GL #4356]
  - [GL #4383]

2 years agoMerge branch 'aydin/isc_header_atomic_fix' into 'main'
Aydın Mercan [Wed, 3 Jan 2024 17:47:53 +0000 (17:47 +0000)] 
Merge branch 'aydin/isc_header_atomic_fix' into 'main'

Use and check for <isc/atomic.h> instead of <stdatomic.h> directly

See merge request isc-projects/bind9!8582

2 years agoCheck for atomic operations consistency in checklibs.sh
Aydın Mercan [Mon, 18 Dec 2023 08:38:59 +0000 (11:38 +0300)] 
Check for atomic operations consistency in checklibs.sh

isc/atomic.h and its defined macros should be preferred over
stdatomic.h and explicit atomic operations.

Fix the redundant stdatomic.h header in histo.c found by the introduced
check.

2 years agoUse <isc/atomic.h> instead of <stdatomic.h> directly in <isc/types.h>
Aydın Mercan [Mon, 18 Dec 2023 06:50:27 +0000 (09:50 +0300)] 
Use <isc/atomic.h> instead of <stdatomic.h> directly in <isc/types.h>

2 years agoMerge branch '4466-cds-is-stuck-on-an-old-key' into 'main'
Mark Andrews [Wed, 3 Jan 2024 01:47:52 +0000 (01:47 +0000)] 
Merge branch '4466-cds-is-stuck-on-an-old-key' into 'main'

Resolve "CDS is stuck on an old key."

Closes #4466

See merge request isc-projects/bind9!8565

2 years agoAdd CHANGES note for [GL #4466]
Mark Andrews [Tue, 19 Dec 2023 08:01:22 +0000 (19:01 +1100)] 
Add CHANGES note for [GL #4466]

2 years agoSet the DNSKEY TTLs to match the dnssec policy
Mark Andrews [Tue, 12 Dec 2023 14:05:54 +0000 (01:05 +1100)] 
Set the DNSKEY TTLs to match the dnssec policy

This prevents the DNSKEY records being updated and the statistics
not matching as a consequence

2 years agoCreate keys with TTLs that match the policies TTL
Mark Andrews [Tue, 12 Dec 2023 13:43:15 +0000 (00:43 +1100)] 
Create keys with TTLs that match the policies TTL

2 years agoMake $TTL match dnskey-ttl
Mark Andrews [Tue, 12 Dec 2023 05:20:53 +0000 (16:20 +1100)] 
Make $TTL match dnskey-ttl

2 years agoWrite new DNSKEY TTL to key file
Matthijs Mekking [Fri, 22 Dec 2023 14:08:45 +0000 (15:08 +0100)] 
Write new DNSKEY TTL to key file

When the current DNSKEY TTL does not match the one from the policy,
write the new TTL to disk.

2 years agoOnly create private records for DNSKEYs that have changed
Mark Andrews [Tue, 19 Dec 2023 04:58:49 +0000 (15:58 +1100)] 
Only create private records for DNSKEYs that have changed

We don't need to create private records for DNSKEY records that
have only had their TTL's changed.

2 years agosync_secure_db failed to handle some TTL changes
Mark Andrews [Thu, 14 Dec 2023 04:02:22 +0000 (15:02 +1100)] 
sync_secure_db failed to handle some TTL changes

If the DNSKEY, CDNSKEY or CDS RRset had different TTLs then the
filtering of these RRset resulted in dns_diff_apply failing with
"not exact". Identify tuple pairs that are just TTL changes and
allow them through the filter.

2 years agoUse the current CDS and CDNSKEY TTLs
Mark Andrews [Tue, 12 Dec 2023 02:51:19 +0000 (13:51 +1100)] 
Use the current CDS and CDNSKEY TTLs

When adding new CDS and CDNSKEY records use the existing RRset
TTL if they already exist.

2 years agoUpdate the DNSKEY, CDNSKEY and CDS TTLs to match dnskey-ttl
Mark Andrews [Tue, 12 Dec 2023 02:47:30 +0000 (13:47 +1100)] 
Update the DNSKEY, CDNSKEY and CDS TTLs to match dnskey-ttl

If the TTLs of the DNSKEY, CDNSKEY and CDS do not match the
dnskey-ttl update them by removing all records and re-adding
them with the correct TTL.

2 years agoTest dnssec-policy dnskey-ttl behaviour
Mark Andrews [Tue, 12 Dec 2023 02:47:30 +0000 (13:47 +1100)] 
Test dnssec-policy dnskey-ttl behaviour

If the dnskey-ttl in the dnssec-policy doesn't match the DNSKEY's
ttl then the DNSKEY, CDNSKEY and CDS rrset should be updated by
named to reflect the expressed policy.  Check that named does this
by creating a zone with a TTL that does not match the policy's TTL
and check that it is correctly updated.

2 years agoMerge branch '4513-system-tests-fail-with-net-dns-1-42' into 'main'
Mark Andrews [Wed, 3 Jan 2024 00:07:07 +0000 (00:07 +0000)] 
Merge branch '4513-system-tests-fail-with-net-dns-1-42' into 'main'

Resolve "System tests fail with Net::DNS 1.42"

Closes #4513

See merge request isc-projects/bind9!8615

2 years agoSupport Net::DNS::Nameserver 1.42
Mark Andrews [Tue, 2 Jan 2024 04:39:58 +0000 (15:39 +1100)] 
Support Net::DNS::Nameserver 1.42

In Net::DNS 1.42 $ns->main_loop no longer loops.  Use current methods
for starting the server, wait for SIGTERM then cleanup child processes
using $ns->stop_server(), then remove the pid file.

2 years agoMerge branch 'michal/silence-a-scan-build-warning-in-dns_rbt_addname' into 'main'
Michał Kępień [Tue, 2 Jan 2024 13:51:18 +0000 (13:51 +0000)] 
Merge branch 'michal/silence-a-scan-build-warning-in-dns_rbt_addname' into 'main'

Silence a scan-build warning in dns_rbt_addname()

See merge request isc-projects/bind9!8614

2 years agoSilence a scan-build warning in dns_rbt_addname()
Michał Kępień [Fri, 22 Dec 2023 18:27:37 +0000 (19:27 +0100)] 
Silence a scan-build warning in dns_rbt_addname()

Clang Static Analyzer is unable to grasp that when dns_rbt_addnode()
returns ISC_R_EXISTS, it always sets the pointer passed to it via its
'nodep' parameter to a non-NULL value.  Add an extra safety check in the
conditional expression used in dns_rbt_addname() to silence that
warning.

2 years agoMerge branch 'mnowak/pytest_rewrite_spf' into 'main'
Michal Nowak [Fri, 22 Dec 2023 15:07:13 +0000 (15:07 +0000)] 
Merge branch 'mnowak/pytest_rewrite_spf' into 'main'

Rewrite spf system test to pytest

See merge request isc-projects/bind9!8572