]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 years agoDelete old TLS DNS and TCP DNS dead code
Artem Boldariev [Wed, 15 Mar 2023 15:08:11 +0000 (17:08 +0200)] 
Delete old TLS DNS and TCP DNS dead code

This commit removes old, unused TLS DNS and TCP DNS definitions from
the code. They should have been deleted earlier, but that was missed.

3 years agoMerge branch '3937-zone-sign-kasp' into 'main'
Mark Andrews [Tue, 14 Mar 2023 13:16:37 +0000 (13:16 +0000)] 
Merge branch '3937-zone-sign-kasp' into 'main'

Resolve "NSEC records aren't signed with both configured algorithms during NSEC3->NSEC transition"

Closes #3937

See merge request isc-projects/bind9!7682

3 years agoAdd CHANGES for [GL #3937]
Mark Andrews [Tue, 14 Mar 2023 02:32:47 +0000 (13:32 +1100)] 
Add CHANGES for [GL #3937]

3 years agoWhen signing with a new algorithm preserve NSEC/NSEC3 chains
Mark Andrews [Tue, 14 Mar 2023 02:13:14 +0000 (13:13 +1100)] 
When signing with a new algorithm preserve NSEC/NSEC3 chains

If the zone already has existing NSEC/NSEC3 chains then zone_sign
needs to continue to use them.  If there are no chains then use
kasp setting otherwise generate an NSEC chain.

3 years agoMerge branch '3928-placeholder' into 'main'
Arаm Sаrgsyаn [Tue, 14 Mar 2023 09:58:24 +0000 (09:58 +0000)] 
Merge branch '3928-placeholder' into 'main'

Add a CHANGES placeholder for [GL #3928]

See merge request isc-projects/bind9!7684

3 years agoAdd a CHANGES placeholder for [GL #3928]
Aram Sargsyan [Mon, 13 Mar 2023 13:39:02 +0000 (13:39 +0000)] 
Add a CHANGES placeholder for [GL #3928]

3 years agoMerge branch '3939-insufficient-information-to-identify-key' into 'main'
Mark Andrews [Tue, 14 Mar 2023 03:09:25 +0000 (03:09 +0000)] 
Merge branch '3939-insufficient-information-to-identify-key' into 'main'

Resolve "Insufficient information to identify key"

Closes #3939

See merge request isc-projects/bind9!7676

3 years agoReport key name when removing it
Mark Andrews [Mon, 13 Mar 2023 02:56:42 +0000 (13:56 +1100)] 
Report key name when removing it

3 years agoAdd ISC_FORMAT_PRINTF to report's declaration
Mark Andrews [Mon, 13 Mar 2023 02:48:20 +0000 (13:48 +1100)] 
Add ISC_FORMAT_PRINTF to report's declaration

dns_dnssec_updatekeys's 'report' could be called with invalid arguments
which the compiler should be be able to detect.

3 years agoMerge branch '3924-dnstap-test-timing-issue' into 'main'
Arаm Sаrgsyаn [Mon, 13 Mar 2023 11:48:19 +0000 (11:48 +0000)] 
Merge branch '3924-dnstap-test-timing-issue' into 'main'

Resolve "missing messages in `dnstap` system test after query failure"

Closes #3924

See merge request isc-projects/bind9!7674

3 years agoImprove dnstap system test reliability
Aram Sargsyan [Fri, 10 Mar 2023 11:07:13 +0000 (11:07 +0000)] 
Improve dnstap system test reliability

The dnstap system test fails intermittently, and it appears to be
a timing issue - adding a short delay after running 'fstrm_capture',
and before running 'dnstap -reopen' improves the situation from
50% failures (5 out of 10 times) to 0% failures (0 out of 20 times),
tested locally.

The reason is that 'fstrm_capture' is executed in the background,
and due to OS scheduling and other factors, the listener socket
may not be ready when the following command runs and tells 'named'
to (re)open it.

3 years agoMerge branch 'ondrej-userspace-rcu-github-actions' into 'main'
Ondřej Surý [Sat, 11 Mar 2023 04:05:57 +0000 (04:05 +0000)] 
Merge branch 'ondrej-userspace-rcu-github-actions' into 'main'

Install liburcu-dev to GitHub Actions

See merge request isc-projects/bind9!7675

3 years agoInstall liburcu-dev to GitHub Actions
Ondřej Surý [Sat, 11 Mar 2023 04:03:54 +0000 (05:03 +0100)] 
Install liburcu-dev to GitHub Actions

The CodeQL and SonarCloud GitHub Actions would FTBFS because of missing
liburcu-dev package resulting.  Install the required package to both
GitHub Action files.

3 years agoMerge branch 'fanf-urcu' into 'main'
Ondřej Surý [Fri, 10 Mar 2023 19:21:45 +0000 (19:21 +0000)] 
Merge branch 'fanf-urcu' into 'main'

Build with liburcu, userspace RCU

Closes #3935

See merge request isc-projects/bind9!7662

3 years agoCHANGES and release notes for [GL #3935]
Tony Finch [Wed, 8 Mar 2023 19:22:27 +0000 (19:22 +0000)] 
CHANGES and release notes for [GL #3935]

[func] BIND now requires liburcu for lock-free data structures
and concurrent safe memory reclamation. It replaces the
home-grown lock-free linked list and QSBR machinery
added in changes 6108 and 6109. The qp-trie code has
been adjusted to use liburcu.

3 years agoApply adjusted clang-format
Tony Finch [Wed, 8 Mar 2023 19:25:34 +0000 (19:25 +0000)] 
Apply adjusted clang-format

The headers were slightly reordered when liburcu was added.

3 years agoBuild with liburcu, Userspace RCU
Ondřej Surý [Tue, 7 Mar 2023 14:13:03 +0000 (15:13 +0100)] 
Build with liburcu, Userspace RCU

BIND needs a collection of standard lock-free data structures,
which we can find in liburcu, along with its RCU safe memory
reclamation machinery. We will use liburcu's QSBR variant instead
of the home-grown isc_qsbr.

3 years agoMerge branch 'aram/fix-ISC_REFCOUNT_TRACE_IMPL-usage' into 'main'
Arаm Sаrgsyаn [Thu, 9 Mar 2023 22:40:44 +0000 (22:40 +0000)] 
Merge branch 'aram/fix-ISC_REFCOUNT_TRACE_IMPL-usage' into 'main'

Fix ISC_REFCOUNT_TRACE_IMPL usage

See merge request isc-projects/bind9!7673

3 years agoFix ISC_REFCOUNT_TRACE_IMPL usage
Aram Sargsyan [Thu, 9 Mar 2023 21:38:04 +0000 (21:38 +0000)] 
Fix ISC_REFCOUNT_TRACE_IMPL usage

ISC_REFCOUNT_TRACE_IMPL uses isc_tid(), but the corresponding header
file is not included, which breaks, for example, compiling BIND with
DNS_CATZ_TRACE defined in lib/dns/include/dns/catz.h.

Add '#include <isc/tid.h>' in lib/isc/include/isc/refcount.h.

3 years agoMerge branch 'mnowak/stress-test-drop-parallel-build' into 'main'
Michal Nowak [Thu, 9 Mar 2023 17:31:33 +0000 (17:31 +0000)] 
Merge branch 'mnowak/stress-test-drop-parallel-build' into 'main'

Drop parallel build from stress tests

See merge request isc-projects/bind9!7669

3 years agoDrop parallel build from stress tests
Michal Nowak [Thu, 9 Mar 2023 10:10:53 +0000 (11:10 +0100)] 
Drop parallel build from stress tests

BUILD_PARALLEL_JOBS environmental variable is set to 6, which does not
align well with 4 and 8 CPU core systems dedicated to CI "stress" tests.
When multiple parallel jobs run on the host, they compete for resources
with an undesirable result: 6 compiler processes of one job may starve
named, resulting in lower-than-expected throughput and minutes-long
query response latency spikes.

Better drop the build parallelism of BIND-under-test. About 1-2 minutes
are added to the 60-65 minutes long job duration.

3 years agoMerge branch 'mnowak/update-release-tarball-comparison.sh' into 'main'
Michal Nowak [Thu, 9 Mar 2023 16:05:20 +0000 (16:05 +0000)] 
Merge branch 'mnowak/update-release-tarball-comparison.sh' into 'main'

Adapt tarball comparison to dropped pregenerated man pages

See merge request isc-projects/bind9!7661

3 years agoAdapt tarball comparison to dropped pregenerated man pages
Michal Nowak [Tue, 7 Mar 2023 18:42:19 +0000 (19:42 +0100)] 
Adapt tarball comparison to dropped pregenerated man pages

Since pregenerated manual pages were removed from the BIND 9 repository,
Sphinx must be present in the build environment for manual pages to be
created and placed to release tarball. release-tarball-comparison.sh
script needs to be adapted to keep up with how to release tarballs are
prepared.

3 years agoMerge branch '3923-doth-system-test-timing-issue' into 'main'
Arаm Sаrgsyаn [Thu, 9 Mar 2023 10:39:14 +0000 (10:39 +0000)] 
Merge branch '3923-doth-system-test-timing-issue' into 'main'

Resolve "timing issue with incoming XoT check in `doth` system test"

Closes #3923

See merge request isc-projects/bind9!7653

3 years agoRetry multiple times in doth test when checking if the zone file exists
Aram Sargsyan [Tue, 7 Mar 2023 14:12:10 +0000 (14:12 +0000)] 
Retry multiple times in doth test when checking if the zone file exists

Dumping of the freshly transferred zone file can take some time.

Retry 5 times before failing.

The log excerpt below shows such a case, when dumping lasted more than
two seconds.

    06-Mar-2023 09:32:09.973 zone example6/IN: Transfer started.
    06-Mar-2023 09:32:10.301 zone example6/IN: zone transfer finished: success
    06-Mar-2023 09:32:10.301 zone_dump: zone example6/IN: enter
    06-Mar-2023 09:32:11.789 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): AXFR request
    06-Mar-2023 09:32:11.801 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): transfer of 'example6/IN': AXFR ended: 5 messages, 2676 records, 55815 bytes, 0.011 secs (5074090 bytes/sec) (serial 1397051952)
    06-Mar-2023 09:32:12.409 zone_gotwritehandle: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 dump_done: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 zone_journal_compact: zone example6/IN: target journal size 53044

3 years agoFix the placement of printing dig output comments in doth system test
Aram Sargsyan [Tue, 7 Mar 2023 14:08:52 +0000 (14:08 +0000)] 
Fix the placement of printing dig output comments in doth system test

There can be comments in dig output for a zone transfer only in case
of an error, so we should print those errors not when wait_for_tls_xfer
succeeds, but when it fails.

Also, there is no point in printing those comments when a failure was
indeed expected.

3 years agoFail early in doth system test when the expected failure doesn't happen
Aram Sargsyan [Tue, 7 Mar 2023 14:03:35 +0000 (14:03 +0000)] 
Fail early in doth system test when the expected failure doesn't happen

If wait_for_tls_xfer succeeds, while a failure was being expected,
set ret=1 to fail without further checking if the zone file exists.

3 years agoMerge branch 'mnowak/stress-test-build-with-default-CFLAGS' into 'main'
Michal Nowak [Thu, 9 Mar 2023 09:58:05 +0000 (09:58 +0000)] 
Merge branch 'mnowak/stress-test-build-with-default-CFLAGS' into 'main'

Build BIND in stress test jobs with common CFLAGS

See merge request isc-projects/bind9!7627

3 years agoBuild BIND in stress test jobs with common CFLAGS
Michal Nowak [Tue, 28 Feb 2023 16:49:43 +0000 (17:49 +0100)] 
Build BIND in stress test jobs with common CFLAGS

By omission, BIND was not built with common CFLAGS in the stress test
jobs. Building with common CFLAGS and -Og should help GDB produce a
backtrace with more information.

3 years agoMerge branch '3929-gcc-12-static-analyzer-use-of-uninitialized-value-ctx-val-1-in...
Mark Andrews [Wed, 8 Mar 2023 23:01:12 +0000 (23:01 +0000)] 
Merge branch '3929-gcc-12-static-analyzer-use-of-uninitialized-value-ctx-val-1-in-base32-c' into 'main'

Resolve "GCC 12 static analyzer: use of uninitialized value '*ctx.val[1]' in base32.c"

Closes #3929

See merge request isc-projects/bind9!7655

3 years agoSilence uninitialized value false positives
Mark Andrews [Wed, 8 Mar 2023 04:16:44 +0000 (15:16 +1100)] 
Silence uninitialized value false positives

In base32_decode_char the GCC 12 static analyser fails to determine
that ctx->val[1], ctx->val[3], ctx->val[4] and ctx->val[6] are
assigned values by the previous call to base32_decode_char.  Initialise
ctx->val to zeros when initalising the rest of ctx to silence the
false positive.

3 years agoMerge branch '3932-gcc-12-static-analyzer-warning-use-of-null-_frm-where-non-null...
Mark Andrews [Wed, 8 Mar 2023 22:36:19 +0000 (22:36 +0000)] 
Merge branch '3932-gcc-12-static-analyzer-warning-use-of-null-_frm-where-non-null-expected-in-cc-c' into 'main'

Resolve "GCC 12 static analyzer: warning: use of NULL '_frm' where non-null expected in cc.c"

Closes #3932

See merge request isc-projects/bind9!7658

3 years agoSilence GCC 12 NULL pointer dereference warnings
Mark Andrews [Wed, 8 Mar 2023 05:53:37 +0000 (16:53 +1100)] 
Silence GCC 12 NULL pointer dereference warnings

When isccc_cc_lookupstring returns ISC_R_SUCCESS the returned pointer
is non NULL.  Add INSISTS do that GCC 12 can determine this.

3 years agoMerge branch '3931-gcc-12-static-analyzer-warning-use-of-uninitialized-value-svcb...
Mark Andrews [Wed, 8 Mar 2023 22:07:46 +0000 (22:07 +0000)] 
Merge branch '3931-gcc-12-static-analyzer-warning-use-of-uninitialized-value-svcb-svclen-in-rdata-c' into 'main'

Resolve "GCC 12 static analyzer: warning: use of uninitialized value 'svcb.svclen' in rdata.c"

Closes #3931

See merge request isc-projects/bind9!7657

3 years agoAdd additional contraints to dns_rdata_checksvcb
Mark Andrews [Wed, 8 Mar 2023 05:38:11 +0000 (16:38 +1100)] 
Add additional contraints to dns_rdata_checksvcb

REQUIRE that rdata->type is dns_rdatatype_svcb to detect when
dns_rdata_checksvcb is called with the wrong rdata type.  There are
no code paths that currently pass the wrong rdata to dns_rdata_checksvcb.

This was found by GCC 12 static analysis.

3 years agoMerge branch '3925-serve-stale-system-test-failure' into 'main'
Matthijs Mekking [Wed, 8 Mar 2023 16:34:46 +0000 (16:34 +0000)] 
Merge branch '3925-serve-stale-system-test-failure' into 'main'

Lower chance of intermittent serve-stale system test failure

Closes #3925

See merge request isc-projects/bind9!7659

3 years agoUpdate serve-stale system test
Matthijs Mekking [Wed, 8 Mar 2023 08:11:19 +0000 (09:11 +0100)] 
Update serve-stale system test

The serve-stale system test was intermittently failing due to a timing
issue:

    I:serve-stale:check stale data.example TXT was refreshed...
    I:serve-stale:failed

The RRset is refreshed, however, it first checks for an expected log
line, prior checking that the stale data.example TXT was refreshed
(using dig). This log line is there to ensure the record is actually
refreshed before we start querying again. Alternatively we could just
retry_quiet 10 <wait for dig output matches expectations>. It would
lower the chances for intermittent test failures, since there is no
longer a "check for log line, sleep one second if check fails, check
for log line, ...", prior to the check.

3 years agoMerge branch 'tt-openssl-dh-refactoring' into 'main'
Ondřej Surý [Wed, 8 Mar 2023 15:13:20 +0000 (15:13 +0000)] 
Merge branch 'tt-openssl-dh-refactoring' into 'main'

Refactor OpenSSL EDDSA code

See merge request isc-projects/bind9!7429

3 years agoConvert OpenSSL EDDSA glue to pkeypair
Timo Teräs [Sat, 28 Jan 2023 19:14:39 +0000 (21:14 +0200)] 
Convert OpenSSL EDDSA glue to pkeypair

Finish the OpenSSL EDSSA glue refactoring to use pkeypair - this is the
same change that has been already applied to RSA and ECDSA glues.

3 years agoOpenSSL EDDSA introduce and use openssleddsa_alg_info()
Timo Teräs [Sat, 28 Jan 2023 10:53:14 +0000 (12:53 +0200)] 
OpenSSL EDDSA introduce and use openssleddsa_alg_info()

Move the common code into a helper function that returns the EDDSA
parameters (pkey type, nid, keysize, sigsize).

3 years agoRemove redundant NULL checks in OpenSSL RSA glue
Timo Teräs [Thu, 26 Jan 2023 14:21:00 +0000 (16:21 +0200)] 
Remove redundant NULL checks in OpenSSL RSA glue

The OpenSSL free functions are no-op when called with NULL argument,
thus remove the extra checks around *_free() calls in the OpenSSL RSA
glue.

3 years agoIntroduce dst__openssl_keypair_{compare,isprivate,destroy}
Timo Teräs [Thu, 26 Jan 2023 14:11:07 +0000 (16:11 +0200)] 
Introduce dst__openssl_keypair_{compare,isprivate,destroy}

Rename and simplify dst__openssl_compare_keypair() to
dst__openssl_keypair_compare(), and introduce two additional functions
dst__openssl_keypair_isprivate and dst__openssl_keypair_destroy.

Use those to de-duplicated openssl{rsa,ecdsa}_isprivate, and
openssl{rsa,ecdsa}_destroy.

3 years agoMerge branch 'fanf-libbind9-remnants' into 'main'
Tony Finch [Wed, 8 Mar 2023 12:04:35 +0000 (12:04 +0000)] 
Merge branch 'fanf-libbind9-remnants' into 'main'

Remove some lingering references to libbind9

See merge request isc-projects/bind9!7660

3 years agoRemove some lingering references to libbind9
Tony Finch [Wed, 8 Mar 2023 10:06:22 +0000 (10:06 +0000)] 
Remove some lingering references to libbind9

Clean up the `.clang-format` #include priority list and
the `\file` declaration in `isc/getaddresses.h`.

3 years agoMerge branch '3905-remove-TKEY-Diffie-Hellman-exchange' into 'main'
Ondřej Surý [Wed, 8 Mar 2023 07:57:52 +0000 (07:57 +0000)] 
Merge branch '3905-remove-TKEY-Diffie-Hellman-exchange' into 'main'

Remove TKEY Mode 2 (Diffie-Hellman)

Closes #3905

See merge request isc-projects/bind9!7626

3 years agoAdd CHANGES and release note for [GL #3905]
Ondřej Surý [Tue, 28 Feb 2023 15:26:31 +0000 (16:26 +0100)] 
Add CHANGES and release note for [GL #3905]

3 years agofurther cleanup after removing diffie-hellman TKEY mode
Evan Hunt [Tue, 28 Feb 2023 23:28:29 +0000 (15:28 -0800)] 
further cleanup after removing diffie-hellman TKEY mode

without diffie-hellman TKEY negotiation, some other code is
now effectively dead or unnecessary, and can be cleaned up:

- the rndc tsig-list and tsig-delete commands.
- a nonoperational command-line option to dnssec-keygen that
  was documented as being specific to DH.
- the section of the ARM that discussed TKEY/DH.
- the functions dns_tkey_builddeletequery(), processdeleteresponse(),
  and tkey_processgssresponse(), which are unused.

3 years agoRemove TKEY Mode 2 (Diffie-Hellman)
Ondřej Surý [Tue, 28 Feb 2023 15:05:34 +0000 (16:05 +0100)] 
Remove TKEY Mode 2 (Diffie-Hellman)

Completely remove the TKEY Mode 2 (Diffie-Hellman Exchanged Keying) from
BIND 9 (from named, named.conf and all the tools).  The TKEY usage is
fringe at best and in all known cases, GSSAPI is being used as it should.

The draft-eastlake-dnsop-rfc2930bis-tkey specifies that:

    4.2 Diffie-Hellman Exchanged Keying (Deprecated)

       The use of this mode (#2) is NOT RECOMMENDED for the following two
       reasons but the specification is still included in Appendix A in case
       an implementation is needed for compatibility with old TKEY
       implementations. See Section 4.6 on ECDH Exchanged Keying.

          The mixing function used does not meet current cryptographic
          standards because it uses MD5 [RFC6151].

          RSA keys must be excessively long to achieve levels of security
          required by current standards.

We might optionally implement Elliptic Curve Diffie-Hellman (ECDH) key
exchange mode 6 if the draft ever reaches the RFC status.  Meanwhile the
insecure DH mode needs to be removed.

3 years agoMerge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.19.12' into 'main'
Tom Krizek [Tue, 7 Mar 2023 16:35:33 +0000 (16:35 +0000)] 
Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.19.12' into 'main'

Set up version and release notes for BIND 9.19.12

See merge request isc-projects/bind9!7650

3 years agoSet up release notes for BIND 9.19.12
Tom Krizek [Tue, 7 Mar 2023 13:10:26 +0000 (14:10 +0100)] 
Set up release notes for BIND 9.19.12

3 years agoUpdate BIND version to 9.19.12-dev
Tom Krizek [Tue, 7 Mar 2023 13:09:54 +0000 (14:09 +0100)] 
Update BIND version to 9.19.12-dev

3 years agoUpdate BIND version for release v9.19.11
Tom Krizek [Fri, 3 Mar 2023 14:10:56 +0000 (15:10 +0100)] 
Update BIND version for release

3 years agoAdd a CHANGES marker
Tom Krizek [Fri, 3 Mar 2023 14:10:10 +0000 (15:10 +0100)] 
Add a CHANGES marker

3 years agoMerge branch 'tkrizek/prepare-documentation-for-bind-9.19.11' into 'v9_19_11-release'
Tom Krizek [Fri, 3 Mar 2023 14:05:21 +0000 (14:05 +0000)] 
Merge branch 'tkrizek/prepare-documentation-for-bind-9.19.11' into 'v9_19_11-release'

Prepare documentation for BIND 9.19.11

See merge request isc-private/bind9!500

3 years agoAdd release note for GL #3673
Tom Krizek [Thu, 2 Mar 2023 09:43:07 +0000 (10:43 +0100)] 
Add release note for GL #3673

3 years agoReorder release notes
Tom Krizek [Thu, 2 Mar 2023 09:41:54 +0000 (10:41 +0100)] 
Reorder release notes

3 years agoTweak and reword release notes
Tom Krizek [Thu, 2 Mar 2023 09:23:12 +0000 (10:23 +0100)] 
Tweak and reword release notes

3 years agoPrepare release notes for BIND 9.19.11
Tom Krizek [Thu, 2 Mar 2023 09:19:08 +0000 (10:19 +0100)] 
Prepare release notes for BIND 9.19.11

3 years agoAdd release metadata update to release checklist
Tom Krizek [Thu, 2 Mar 2023 12:02:48 +0000 (13:02 +0100)] 
Add release metadata update to release checklist

The release engineering automation we have relies on up-to-date
information about our upcoming release plans. Ensure these are updated
at the end of each release cycle.

3 years agoMove "disallow merging to maintained branches" closer to tagging
Michal Nowak [Thu, 2 Mar 2023 10:42:45 +0000 (11:42 +0100)] 
Move "disallow merging to maintained branches" closer to tagging

Updating GitLab settings for all maintained branches to disallow merging
to them has an unfortunate consequence: daily scheduled pipelines won't
be executed anymore. This is a problem because we need the pipelines to
ensure no new bugs were introduced just before a code freeze.

The "Announce (on Mattermost) that the code freeze is in effect" item is
still in place but is now more of a social "disallow merging to
maintained branches".

3 years agoMerge branch '3917-named-should-log-uv-version-when-starting-up' into 'main'
Tom Krizek [Fri, 3 Mar 2023 08:30:14 +0000 (08:30 +0000)] 
Merge branch '3917-named-should-log-uv-version-when-starting-up' into 'main'

Resolve "Named should log UV version when starting up"

Closes #3917

See merge request isc-projects/bind9!7642

3 years agoNow logs UV versions when starting up
Mark Andrews [Fri, 3 Mar 2023 03:04:34 +0000 (14:04 +1100)] 
Now logs UV versions when starting up

Named now logs both compile time and run time UV versions when
starting up.  This is useful information to have when debugging
network issues involving named.

3 years agoMerge branch '3907-data-race-in-rbtdb' into 'main'
Arаm Sаrgsyаn [Thu, 2 Mar 2023 18:36:01 +0000 (18:36 +0000)] 
Merge branch '3907-data-race-in-rbtdb' into 'main'

Resolve "ThreadSanitizer: data race lib/dns/rbtdb.c:1365 in newversion"

Closes #3907

See merge request isc-projects/bind9!7637

3 years agoCheck if catz is active in dns__catz_update_cb()
Aram Sargsyan [Thu, 2 Mar 2023 13:32:21 +0000 (13:32 +0000)] 
Check if catz is active in dns__catz_update_cb()

A reconfiguration can deactivate the catalog zone, while the
offloaded update process was preparing to run.

3 years agoCheck if catz is active in dns__catz_timer_cb()
Aram Sargsyan [Thu, 2 Mar 2023 13:19:53 +0000 (13:19 +0000)] 
Check if catz is active in dns__catz_timer_cb()

A reconfiguration can deactivate the catalog zone, while the
update process was deferred using a timer.

3 years agoUse catzs->lock in dns_catz_prereconfig()
Aram Sargsyan [Thu, 2 Mar 2023 13:19:09 +0000 (13:19 +0000)] 
Use catzs->lock in dns_catz_prereconfig()

There can be an update running in another thread, so use a lock,
like it's done in dns_catz_postreconfig().

3 years agoAdd a CHANGES note for [GL #3907]
Aram Sargsyan [Thu, 2 Mar 2023 09:43:01 +0000 (09:43 +0000)] 
Add a CHANGES note for [GL #3907]

3 years agocatz: protect db_registered and db callback (un)registration with a lock
Aram Sargsyan [Thu, 2 Mar 2023 10:18:11 +0000 (10:18 +0000)] 
catz: protect db_registered and db callback (un)registration with a lock

Doing this to avoid a race between the 'dns__catz_update_cb()' and
'dns_catz_dbupdate_callback()' functions.

3 years agocatz: use two pairs of dns_db_t and dns_dbversion_t in a catalog zone
Aram Sargsyan [Thu, 2 Mar 2023 08:52:25 +0000 (08:52 +0000)] 
catz: use two pairs of dns_db_t and dns_dbversion_t in a catalog zone

As it is done in the RPZ module, use 'db' and 'dbversion' for the
database we are going to update to, and 'updb' and 'updbversion' for
the database we are working on.

Doing this should avoid a race between the 'dns__catz_update_cb()' and
'dns_catz_dbupdate_callback()' functions.

3 years agoUpdate the CHANGES note for [GL #3777]
Aram Sargsyan [Thu, 2 Mar 2023 09:39:32 +0000 (09:39 +0000)] 
Update the CHANGES note for [GL #3777]

Remove the part which is no longer true after reverting the commit
in question.

The CHANGES entry was never part of a released BIND 9 version.

3 years agoRevert "Process db callbacks in zone_loaddone() after zone_postload()"
Aram Sargsyan [Wed, 1 Mar 2023 17:26:41 +0000 (17:26 +0000)] 
Revert "Process db callbacks in zone_loaddone() after zone_postload()"

This reverts commit ed268b46f11706bde3da68bd2a4b45752350f736.

The commit introduced a data race, because dns_db_endload() is called
after unfreezing the zone.

3 years agoMerge branch 'aram/catz-add-lock-for-dns_catz_zone_t' into 'main'
Arаm Sаrgsyаn [Wed, 1 Mar 2023 16:59:37 +0000 (16:59 +0000)] 
Merge branch 'aram/catz-add-lock-for-dns_catz_zone_t' into 'main'

Add a lock for dns_catz_zone_t

See merge request isc-projects/bind9!7633

3 years agoAdd a lock for dns_catz_zone_t
Aram Sargsyan [Wed, 1 Mar 2023 14:41:59 +0000 (14:41 +0000)] 
Add a lock for dns_catz_zone_t

Use a lock for the catalog zones during dns__catz_zones_merge() to
avoid races between 'catz' and 'parentcatz'.

3 years agoMerge branch '3911-reconfig-zone-view-revert-bugfix' into 'main'
Arаm Sаrgsyаn [Wed, 1 Mar 2023 15:35:27 +0000 (15:35 +0000)] 
Merge branch '3911-reconfig-zone-view-revert-bugfix' into 'main'

Fix view's zones reverting bug during reconfiguration

Closes #3911

See merge request isc-projects/bind9!7632

3 years agoAdd CHANGES and release notes for [GL #3911]
Aram Sargsyan [Wed, 1 Mar 2023 13:45:03 +0000 (13:45 +0000)] 
Add CHANGES and release notes for [GL #3911]

3 years agoFix view's zones reverting bug during reconfiguration
Aram Sargsyan [Wed, 1 Mar 2023 12:30:46 +0000 (12:30 +0000)] 
Fix view's zones reverting bug during reconfiguration

During reconfiguration, the configure_view() function reverts the
configured zones to the previous view in case if there is an error.

It uses the 'zones_configured' boolean variable to decide whether
it is required to revert the zones, i.e. the error happened after
all the zones were successfully configured.

The problem is that it does not account for the case when an error
happens during the configuration of one of the zones (not the first),
in which case there are zones that are already configured for the
new view (and they need to be reverted), and there are zones that
are not (starting from the failed one).

Since 'zones_configured' remains 'false', the configured zones are
not reverted.

Replace the 'zones_configured' variable with a pointer to the latest
successfully configured zone configuration element, and when reverting,
revert up to and including that zone.

3 years agoAdd a catz system test check for [GL #3911]
Aram Sargsyan [Wed, 1 Mar 2023 12:47:25 +0000 (12:47 +0000)] 
Add a catz system test check for [GL #3911]

The trick is to configure a duplicate zone, which comes after the
catalog zone, where the duplicate zone is an existing member zone.

In that scenario, all the zones which come before the "faulty" zone
in the configuration file will fail to be reverted to the previous
version of the view after a reconfiguration error, and in this
particular case that will result in an assertion failure when the
catalog zone update is initiated, because it will be still tied to
the new version of the view, which was dismissed.

3 years agoMerge branch '3894-emit-coverage-summary-for-the-coverage-badge' into 'main'
Mark Andrews [Tue, 28 Feb 2023 22:43:14 +0000 (22:43 +0000)] 
Merge branch '3894-emit-coverage-summary-for-the-coverage-badge' into 'main'

Resolve "Emit coverage summary for the coverage badge"

Closes #3894

See merge request isc-projects/bind9!7587

3 years agoExtract test coverage statistics from the gcov job
Mark Andrews [Thu, 23 Feb 2023 22:39:34 +0000 (09:39 +1100)] 
Extract test coverage statistics from the gcov job

In older GitLab versions, the regular expression used for extracting
test coverage statistics from the output of GitLab CI jobs was
configured in the project's settings, using GitLab's web interface.
That changed in recent GitLab versions [1]; the previous configuration
method was removed from the web interface altogether as of GitLab 15.0.
The relevant regular expression is now supposed to be set in the
relevant job's definition in .gitlab-ci.yml.

Set the regular expression used for extracting test coverage
statistics in the definition of the "gcov" GitLab CI job.  Use the
regular expression suggested in GitLab's documentation [2].

[1] https://docs.gitlab.com/ee/update/deprecations.html#test-coverage-project-cicd-setting
[2] https://docs.gitlab.com/ee/ci/pipelines/settings.html#test-coverage-examples

3 years agoMerge branch '3898-shutdown-then-detach' into 'main'
Ondřej Surý [Tue, 28 Feb 2023 15:32:40 +0000 (15:32 +0000)] 
Merge branch '3898-shutdown-then-detach' into 'main'

Decouple view->resolver and friends shutdown and detach

Closes #3898

See merge request isc-projects/bind9!7623

3 years agoDecouple view->resolver and friends shutdown and detach
Ondřej Surý [Tue, 28 Feb 2023 13:14:06 +0000 (14:14 +0100)] 
Decouple view->resolver and friends shutdown and detach

In !7538, the shutdown procedure was simplified, but the ordering was
wrong, we need to shutdown the resolver, adb and requestmgr before
detaching those objects from the view, because there are cross
dependencies between at least the resolver and the adb.

Execute the shutdown(s) first, only when all three shutdowns have been
executed, detach those objects from the view.

3 years agoRemove unused .loop member from dns_view
Ondřej Surý [Tue, 28 Feb 2023 13:25:39 +0000 (14:25 +0100)] 
Remove unused .loop member from dns_view

After the last round of refactoring, the .loop member of dns_view
structure was unused, remove it.

3 years agoMerge branch 'aram/catz-refactor-renaming-leftovers-finish' into 'main'
Arаm Sаrgsyаn [Tue, 28 Feb 2023 15:19:05 +0000 (15:19 +0000)] 
Merge branch 'aram/catz-refactor-renaming-leftovers-finish' into 'main'

Finish catalog zone 'zone' and 'zones' to 'catz' and 'catzs' renaming

See merge request isc-projects/bind9!7611

3 years agoFinish catalog zone 'zone' and 'zones' to 'catz' and 'catzs' renaming
Aram Sargsyan [Mon, 27 Feb 2023 19:45:09 +0000 (19:45 +0000)] 
Finish catalog zone 'zone' and 'zones' to 'catz' and 'catzs' renaming

There are leftovers from the previous refactoring effort, which left
some function declarations and comments in the header file unchanged.

Finish the renaming.

3 years agoMerge branch 'aram/catz-remove-redundant-declaration' into 'main'
Arаm Sаrgsyаn [Tue, 28 Feb 2023 14:42:45 +0000 (14:42 +0000)] 
Merge branch 'aram/catz-remove-redundant-declaration' into 'main'

Remove a redundant ISC_REFCOUNT_DECL in catz.h

See merge request isc-projects/bind9!7612

3 years agoRemove a redundant ISC_REFCOUNT_DECL in catz.h
Aram Sargsyan [Mon, 27 Feb 2023 19:48:53 +0000 (19:48 +0000)] 
Remove a redundant ISC_REFCOUNT_DECL in catz.h

The 'ISC_REFCOUNT_DECL(dns_catz_zone)' declaration was provided twice.

3 years agoMerge branch 'michal/add-a-dnsrps-enabled-build-to-regular-ci-pipelines' into 'main'
Michał Kępień [Tue, 28 Feb 2023 11:56:27 +0000 (11:56 +0000)] 
Merge branch 'michal/add-a-dnsrps-enabled-build-to-regular-ci-pipelines' into 'main'

Add a DNSRPS-enabled build to regular CI pipelines

See merge request isc-projects/bind9!7601

3 years agoAdd a DNSRPS-enabled build to regular CI pipelines
Michał Kępień [Tue, 28 Feb 2023 11:54:02 +0000 (12:54 +0100)] 
Add a DNSRPS-enabled build to regular CI pipelines

DNSRPS-enabled builds have recently been silently broken a few times due
to that feature not being tested in regular CI pipelines.  Add the
--enable-dnsrps --enable-dnsrps-dl switches to the ./configure
invocation in one of the CI jobs run for all merge requests so that
DNSRPS-related build issues can be detected in advance.

It is important to note that this change by itself does NOT enable
actual testing of the DNSRPS feature as doing that requires a DNSRPS
provider library to be present on the test host.

3 years ago(Mostly) fix building bin/tests/system/rpz/dnsrps
Michał Kępień [Tue, 28 Feb 2023 11:54:02 +0000 (12:54 +0100)] 
(Mostly) fix building bin/tests/system/rpz/dnsrps

Building the bin/tests/system/rpz/dnsrps helper binary is currently not
possible at all as the necessary compiler and linker flag definitions
are missing from bin/tests/system/Makefile.am.  Add these as a basis for
addressing the problem.

Unfortunately, this is where the "mostly" bit mentioned in this commit's
subject line comes into play.  The dlopen() parts of DNSRPS code have
not yet been reworked to use libuv's dlopen() API (uv_dlopen() etc.)
(See commit 37b9511ce1dd9ba66a6620c5ff617016eb81188f for prior work in
this area.)  While it is certainly possible to do that, implementing
such a change without testing it in practice against a usable librpz.so
(i.e. a DNSRPS provider library) is bound to cause more trouble and
confusion than keeping the code the way it is right now.  However,
making that code buildable as-is requires linking against a C standard
library that exports the dlopen(), dlsym(), and dlclose() symbols used
by the DNSRPS dynamic loading code.  glibc 2.34+ satisfies that
requirement, but older glibc versions do not (these come with a separate
libdl shared library that would need to be linked in as well).  (Other
C standard library implementations have not been examined.)  Since the
long-term plan is to rely on libuv's dlopen() API exclusively and
detecting the shared object containing dlopen() & friends would only
pull in build system complexity for no good reason, assume for now that
the target system provides the dlopen() API in its C standard library.

This change enables the system test suite to be run for a BIND 9 build
prepared using --enable-dnsrps --enable-dnsrps-dl (on systems satisfying
the requirement explained above).  However, it is important to note that
this change by itself does NOT enable actual testing of the DNSRPS
feature as doing that requires a DNSRPS provider library to be present
on the test host.

3 years agoMerge branch 'ondrej/implement-dns_rbtnode_t-reference-tracing' into 'main'
Ondřej Surý [Tue, 28 Feb 2023 10:45:01 +0000 (10:45 +0000)] 
Merge branch 'ondrej/implement-dns_rbtnode_t-reference-tracing' into 'main'

Implement dns_db node tracing

See merge request isc-projects/bind9!7313

3 years agoImplement dns_db node tracing
Ondřej Surý [Thu, 5 Jan 2023 08:12:35 +0000 (09:12 +0100)] 
Implement dns_db node tracing

This implements node reference tracing that passes all the internal
layers from dns_db API (and friends) to increment_reference() and
decrement_reference().

It can be enabled by #defining DNS_DB_NODETRACE in <dns/trace.h> header.

The output then looks like this:

    incr:node:check_address_records:rootns.c:409:0x7f67f5a55a40->references = 1
    decr:node:check_address_records:rootns.c:449:0x7f67f5a55a40->references = 0

    incr:nodelock:check_address_records:rootns.c:409:0x7f67f5a55a40:0x7f68304d7040->references = 1
    decr:nodelock:check_address_records:rootns.c:449:0x7f67f5a55a40:0x7f68304d7040->references = 0

There's associated python script to find the missing detach located at:
https://gitlab.isc.org/isc-projects/bind9/-/snippets/1038

3 years agoMerge branch 'mnowak/make-openbsd-allow_failure-true' into 'main'
Michal Nowak [Tue, 28 Feb 2023 10:27:17 +0000 (10:27 +0000)] 
Merge branch 'mnowak/make-openbsd-allow_failure-true' into 'main'

Do not fail pipeline because of failed OpenBSD system test

See merge request isc-projects/bind9!7609

3 years agoDo not fail pipeline because of failed OpenBSD system test
Michal Nowak [Mon, 27 Feb 2023 18:22:52 +0000 (19:22 +0100)] 
Do not fail pipeline because of failed OpenBSD system test

System test on OpenBSD is unstable even when test parallelism is
disabled.

3 years agoRevert "Disable OpenBSD system test parallelism in CI"
Michal Nowak [Mon, 27 Feb 2023 18:21:58 +0000 (19:21 +0100)] 
Revert "Disable OpenBSD system test parallelism in CI"

This reverts commit d73eba57bd03dce575f4cf4e42c80e1bced08bed.

3 years agoMerge branch '3837-cds-digest-type' into 'main'
Matthijs Mekking [Tue, 28 Feb 2023 10:01:50 +0000 (10:01 +0000)] 
Merge branch '3837-cds-digest-type' into 'main'

Add cds-digest-type configuration option

Closes #3837

See merge request isc-projects/bind9!7457

3 years agoTest dnssec-signzone -G digests
Matthijs Mekking [Mon, 27 Feb 2023 12:40:01 +0000 (13:40 +0100)] 
Test dnssec-signzone -G digests

Add test cases for the new dnssec-signzone -G option.

3 years agoRequire to be dereferenced arguments are non-NULL
Matthijs Mekking [Wed, 22 Feb 2023 11:12:15 +0000 (12:12 +0100)] 
Require to be dereferenced arguments are non-NULL

The function 'dns_dnssec_syncupdate()' is dereferencing arguments
'keys' and 'rmkeys'. There should be a REQUIRE that those are not
null pointers.

3 years agodnssec-signzone can now create multiple CDS RRs
Matthijs Mekking [Tue, 21 Feb 2023 07:50:04 +0000 (08:50 +0100)] 
dnssec-signzone can now create multiple CDS RRs

Change the commandline option -G to take a string that determines what
sync records should be published. It is a comma-separated string with
each element being either "cdnskey", or "cds:<algorithm>", where
<algorithm> is a valid digest type. Duplicates are suppressed.

3 years agoUpdate syncupdate() function to disable CDNSKEY
Matthijs Mekking [Tue, 21 Feb 2023 07:46:43 +0000 (08:46 +0100)] 
Update syncupdate() function to disable CDNSKEY

Add a new function argument so you can choose whether the CDNSKEY
record should be published or not.

3 years agoFix dns_kasp_attach / dns_kasp_detach usage
Mark Andrews [Tue, 21 Feb 2023 01:15:01 +0000 (12:15 +1100)] 
Fix dns_kasp_attach / dns_kasp_detach usage

The kasp pointers in dns_zone_t should consistently be changed by
dns_kasp_attach and dns_kasp_detach so the usage is balanced.