]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
21 months agofix: Address potential TSAN issue with find->status
Mark Andrews [Thu, 29 Aug 2024 03:58:50 +0000 (03:58 +0000)] 
fix: Address potential TSAN issue with find->status

find->status is a private field of dns_adbfind_t so it now has an accessor function and has been made atomic.

Closes #4802

Merge branch '4802-address-potential-tsan-issue-with-find-status' into 'main'

Closes #4802

See merge request isc-projects/bind9!9137

21 months agoUse atomics to access find->status
Mark Andrews [Tue, 16 Jul 2024 03:36:54 +0000 (13:36 +1000)] 
Use atomics to access find->status

21 months agoUse an accessor fuction to access find->status
Mark Andrews [Wed, 28 Aug 2024 01:37:05 +0000 (11:37 +1000)] 
Use an accessor fuction to access find->status

find->status is marked as private and access is controlled
by find->lock.

21 months agochg: ci: Generate TSAN stress test
Michal Nowak [Wed, 28 Aug 2024 09:39:32 +0000 (09:39 +0000)] 
chg: ci: Generate TSAN stress test

Merge branch 'mnowak/generate-tsan-stress-jobs' into 'main'

See merge request isc-projects/bind9!9334

21 months agoGenerate TSAN stress test
Michal Nowak [Fri, 16 Aug 2024 16:13:46 +0000 (18:13 +0200)] 
Generate TSAN stress test

21 months agochg: ci: Cleanup stress test artifacts
Michal Nowak [Wed, 28 Aug 2024 07:58:03 +0000 (07:58 +0000)] 
chg: ci: Cleanup stress test artifacts

Merge branch 'mnowak/avoid-some-artifacts-in-stress-tests' into 'main'

See merge request isc-projects/bind9!9424

21 months agoSome stress test artifacts should not be saved in CI artifact
Michal Nowak [Tue, 27 Aug 2024 10:12:50 +0000 (12:12 +0200)] 
Some stress test artifacts should not be saved in CI artifact

21 months agochg: usr: Exempt prefetches from the fetches-per-zone and fetches-per-server quotas
Arаm Sаrgsyаn [Mon, 26 Aug 2024 15:50:50 +0000 (15:50 +0000)] 
chg: usr: Exempt prefetches from the fetches-per-zone and fetches-per-server quotas

Fetches generated automatically as a result of 'prefetch' are now
exempt from the 'fetches-per-zone' and 'fetches-per-server' quotas.
This should help in maintaining the cache from which query responses
can be given.

Closes #4219

Merge branch '4219-exempt-good-queries-from-fetch-limits' into 'main'

Closes #4219

See merge request isc-projects/bind9!9095

21 months agoDocument that prefeteches are exempt from select quotas
Aram Sargsyan [Fri, 7 Jun 2024 16:31:07 +0000 (16:31 +0000)] 
Document that prefeteches are exempt from select quotas

Add notes to the 'fetches-per-zone' and 'fetches-per-server' clauses
documentation to document that prefetches are exempted.

21 months agoExempt prefetches from the fetches-per-server quota
Aram Sargsyan [Fri, 7 Jun 2024 16:24:00 +0000 (16:24 +0000)] 
Exempt prefetches from the fetches-per-server quota

Give prefetches a free pass through the quota so that the cache
entries for popular zones could be updated successfully even if the
quota for is already reached.

21 months agoExempt prefetches from the fetches-per-zone quota
Aram Sargsyan [Fri, 7 Jun 2024 16:19:40 +0000 (16:19 +0000)] 
Exempt prefetches from the fetches-per-zone quota

Give prefetches a free pass through the quota so that the cache entry
for a popular zone could be updated successfully even if the quota for
it is already reached.

21 months agofix: dev: Stop using malloc_usable_size and malloc_size
Ondřej Surý [Mon, 26 Aug 2024 15:01:03 +0000 (15:01 +0000)] 
fix: dev: Stop using malloc_usable_size and malloc_size

The `malloc_usable_size()` can return size larger than originally allocated and when these sizes disagree the fortifier enabled by `_FORTIFY_SOURCE=3` detects overflow and stops the `named` execution abruptly.  Stop using these convenience functions as they are primary used for introspection-only.

Closes #4880

Merge branch '4880-dont-use-malloc_usable_size' into 'main'

Closes #4880

See merge request isc-projects/bind9!9400

21 months agoStop using malloc_usable_size and malloc_size
Ondřej Surý [Fri, 23 Aug 2024 04:02:00 +0000 (06:02 +0200)] 
Stop using malloc_usable_size and malloc_size

Although the nanual page of malloc_usable_size says:

    Although the excess bytes can be over‐written by the application
    without ill effects, this is not good programming practice: the
    number of excess bytes in an allocation depends on the underlying
    implementation.

it looks like the premise is broken with _FORTIFY_SOURCE=3 on newer
systems and it might return a value that causes program to stop with
"buffer overflow" detected from the _FORTIFY_SOURCE.  As we do have own
implementation that tracks the allocation size that we can use to track
the allocation size, we can stop relying on this introspection function.

Also the newer manual page for malloc_usable_size changed the NOTES to:

    The value returned by malloc_usable_size() may be greater than the
    requested size of the allocation because of various internal
    implementation details, none of which the programmer should rely on.
    This function is intended to only be used for diagnostics and
    statistics; writing to the excess memory without first calling
    realloc(3) to resize the allocation is not supported.  The returned
    value is only valid at the time of the call.

Remove usage of both malloc_usable_size() and malloc_size() to be on the
safe size and only use the internal size tracking mechanism when
jemalloc is not available.

21 months agochg: ci: Drop removed system tests from cross-version-config-tests
Michal Nowak [Mon, 26 Aug 2024 14:28:47 +0000 (14:28 +0000)] 
chg: ci: Drop removed system tests from cross-version-config-tests

The cross-version-config-tests job fails when a system test is removed
from the upcoming release. To avoid this, remove the system test also
from the $BIND_BASELINE_VERSION.

See the failure mode at https://gitlab.isc.org/isc-projects/bind9/-/jobs/4668947.

Merge branch 'mnowak/remove-dialup-from-cross-version-config-tests-job' into 'main'

See merge request isc-projects/bind9!9413

21 months agoDrop removed system tests from $BIND_BASELINE_VERSION
Michal Nowak [Mon, 26 Aug 2024 11:41:47 +0000 (13:41 +0200)] 
Drop removed system tests from $BIND_BASELINE_VERSION

The cross-version-config-tests job fails when a system test is removed
from the upcoming release. To avoid this, remove the system test also
from the $BIND_BASELINE_VERSION.

22 months agofix: dev: Preserve statement tag order in documentation
Petr Špaček [Fri, 23 Aug 2024 13:57:31 +0000 (13:57 +0000)] 
fix: dev: Preserve statement tag order in documentation

This supports bit-for-bit reproducibility of built documentation.

Closes #4886

Merge branch 'issue-4886/order-preserving-documentation-tags' into 'main'

Closes #4886

See merge request isc-projects/bind9!9399

22 months agoDisallow duplicate statement tags in docs
Petr Špaček [Fri, 23 Aug 2024 13:23:10 +0000 (15:23 +0200)] 
Disallow duplicate statement tags in docs

I can't think of a use-case for them, so let's simplify code and treat
them as an invalid input.

22 months agoPreserve de-duplicated tag order in documentation
James Addison [Sun, 25 Feb 2024 21:10:36 +0000 (21:10 +0000)] 
Preserve de-duplicated tag order in documentation

The 'set' datatype in Python does not provide iteration-order
guarantees related to insertion-order.  That means that its
usage in the 'split_csv' helper function during documentation
build can produce nondeterministic results.

That is non-desirable for two reasons: it means that the
documentation output may appear to vary unnecessarily between
builds, and secondly there could be loss-of-information in cases
where tag order in the source documentation is significant.

This patch implements order-preserving de-duplication of tags,
allowing authors to specify tags using intentional priority
ordering, while also removing tags that appear more than once.

22 months agonew: ci: Automate parts of MR workflow
Petr Špaček [Fri, 23 Aug 2024 07:50:22 +0000 (07:50 +0000)] 
new: ci: Automate parts of MR workflow

Merge branch 'pspacek/post-merge-ci' into 'main'

See merge request isc-projects/bind9!9244

22 months agoRemove milestone check from dangerfile
Petr Špaček [Fri, 23 Aug 2024 07:34:20 +0000 (09:34 +0200)] 
Remove milestone check from dangerfile

Milestone is automatically set by 'merged-metadata' CI job to 'Not
released yet' so it does not matter what the original value was.

22 months agoRemove 'Release notes' label check from dangerfile
Petr Špaček [Thu, 22 Aug 2024 15:21:43 +0000 (17:21 +0200)] 
Remove 'Release notes' label check from dangerfile

This label is now handled automatically by 'merged-metadata' CI job.

22 months agoRemove 'No CHANGES' check from dangerfile
Petr Špaček [Thu, 22 Aug 2024 15:17:15 +0000 (17:17 +0200)] 
Remove 'No CHANGES' check from dangerfile

This label is now handled automatically by 'merged-metadata' CI job.

22 months agoAutomatically adjust MR metadata after merge
Petr Špaček [Mon, 5 Aug 2024 08:48:34 +0000 (10:48 +0200)] 
Automatically adjust MR metadata after merge

1. Set milestone to 'Not released yet' after merge
   We will set milestone to actual version number when we actually tag a
   particular version. This will get rid of mass MR reassignment when we
   do last minute changes to a release plan etc.

2. Adjust No CHANGES and Release Notes MR labels to match gitchangelog
   workflow.

22 months agoMark backports CI job as non-interruptible
Petr Špaček [Mon, 5 Aug 2024 08:21:46 +0000 (10:21 +0200)] 
Mark backports CI job as non-interruptible

Previously CI job for the autobackport bot inherited "interruptible:
true" global configuration. This caused premature termination of the job
when another merge was finished before the autobackport job ran to
completion.

22 months agorem: usr: Remove the 'dialup' and 'heartbeat-interval' options
Evan Hunt [Thu, 22 Aug 2024 19:43:49 +0000 (19:43 +0000)] 
rem: usr: Remove the 'dialup' and 'heartbeat-interval' options

The `dialup` and `heartbeat-interval` options have been removed, along with all code implementing them. Using these options is now a fatal error.

Closes #4237

Merge branch '4237-remove-dialup' into 'main'

Closes #4237

See merge request isc-projects/bind9!8160

22 months agoremove the "dialup" and "heartbeat-interval" options
Evan Hunt [Mon, 3 Jul 2023 23:22:04 +0000 (16:22 -0700)] 
remove the "dialup" and "heartbeat-interval" options

mark "dialup" and "heartbeat-interval" options as ancient and
remove the documentation and the code implementing them.

22 months agonew: usr: implement the 'request-ixfr-max-diffs' configuration option
Arаm Sаrgsyаn [Thu, 22 Aug 2024 15:33:17 +0000 (15:33 +0000)] 
new: usr: implement the 'request-ixfr-max-diffs' configuration option

The new 'request-ixfr-max-diffs' configuration option sets the
maximum number of incoming incremental zone transfer (IXFR) differences,
exceeding which triggers a full zone transfer (AXFR).

Closes #4389

Merge branch '4389-request-ixfr-max-diffs' into 'main'

Closes #4389

See merge request isc-projects/bind9!9094

22 months agoDocument the 'request-ixfr-max-diffs' configuration option
Aram Sargsyan [Fri, 7 Jun 2024 14:51:51 +0000 (14:51 +0000)] 
Document the 'request-ixfr-max-diffs' configuration option

Document the new configuration option and its default value.

22 months agoTest the 'request-ixfr-max-diffs' configuration option
Aram Sargsyan [Fri, 7 Jun 2024 14:49:59 +0000 (14:49 +0000)] 
Test the 'request-ixfr-max-diffs' configuration option

Configure a maximum of 3 allowed differences and add 5 new records.
Check that named detected that the differences exceed the allowed
limit and successfully retries with AXFR.

22 months agoImplement the 'request-ixfr-max-diffs' configuration option
Aram Sargsyan [Fri, 7 Jun 2024 14:47:55 +0000 (14:47 +0000)] 
Implement the 'request-ixfr-max-diffs' configuration option

This limits the maximum number of received incremental zone
transfer differences for a secondary server. Upon reaching the
confgiured limit, the secondary aborts IXFR and initiates a full
zone transfer (AXFR).

22 months agonew: usr: Support restricted key tag range when generating new keys
Mark Andrews [Thu, 22 Aug 2024 12:55:46 +0000 (12:55 +0000)] 
new: usr: Support restricted key tag range when generating new keys

It is useful when multiple signers are being used
to sign a zone to able to specify a restricted
range of range of key tags that will be used by an
operator to sign the zone.  This adds controls to
named (dnssec-policy), dnssec-signzone, dnssec-keyfromlabel and
dnssec-ksr (dnssec-policy) to specify such ranges.

Closes #4830

Merge branch '4830-support-restricted-key-tag-range-when-generating-new-keys' into 'main'

Closes #4830

See merge request isc-projects/bind9!9258

22 months agoAdd bad dnssec-policy range variants test examples
Mark Andrews [Tue, 13 Aug 2024 00:32:19 +0000 (10:32 +1000)] 
Add bad dnssec-policy range variants test examples

22 months agoAdd a multi-signer where the key tag range changes
Mark Andrews [Mon, 12 Aug 2024 09:29:10 +0000 (19:29 +1000)] 
Add a multi-signer where the key tag range changes

22 months agoUse key tag ranges when generating multisigner keys
Mark Andrews [Mon, 12 Aug 2024 03:23:03 +0000 (13:23 +1000)] 
Use key tag ranges when generating multisigner keys

22 months agoCheck that dnssec-keygen honours key tag ranges
Mark Andrews [Thu, 8 Aug 2024 06:01:36 +0000 (16:01 +1000)] 
Check that dnssec-keygen honours key tag ranges

22 months agoDocument dnssec-policy keys range directive
Mark Andrews [Thu, 8 Aug 2024 03:11:40 +0000 (13:11 +1000)] 
Document dnssec-policy keys range directive

Co-authored-by: Suzanne Goldlust <sgoldlust@isc.org>
22 months agoAdd good dnssec-policy tag-range variants test examples
Mark Andrews [Thu, 8 Aug 2024 02:31:23 +0000 (12:31 +1000)] 
Add good dnssec-policy tag-range variants test examples

22 months agoCheck key tag range when matching dnssec keys to kasp keys
Mark Andrews [Wed, 7 Aug 2024 06:57:45 +0000 (16:57 +1000)] 
Check key tag range when matching dnssec keys to kasp keys

22 months agoAdd optional range directive to keys in dnssec-policy
Mark Andrews [Tue, 6 Aug 2024 04:41:50 +0000 (14:41 +1000)] 
Add optional range directive to keys in dnssec-policy

22 months agoAdd the concept of allowed key tag ranges to kasp
Mark Andrews [Tue, 6 Aug 2024 04:41:50 +0000 (14:41 +1000)] 
Add the concept of allowed key tag ranges to kasp

22 months agoDocument -M tag_min:tag_max
Mark Andrews [Wed, 7 Aug 2024 05:47:05 +0000 (15:47 +1000)] 
Document -M tag_min:tag_max

A new argument has been added to dnssec-keygen and dnssec-keyfromlabel
to restrict the tag value of key generated / imported to a particular
range.  This is intended to be used by multi-signers.

Co-authored-by: Suzanne Goldlust <sgoldlust@isc.org>
22 months agoAdd restrict key tag range support
Mark Andrews [Tue, 6 Aug 2024 04:28:08 +0000 (14:28 +1000)] 
Add restrict key tag range support

to dnssec-keygen and dnssec-keyfromlabel.

22 months agochg: ci: Revert "Workaround temporary cross-version-config-tests limitation"
Michal Nowak [Thu, 22 Aug 2024 10:20:04 +0000 (10:20 +0000)] 
chg: ci: Revert "Workaround temporary cross-version-config-tests limitation"

With the release of BIND 9.19.25 this workaround is not needed anymore.

This reverts commit c58dd6e78f9c69667f0abb71d4c162a479a87029.

Merge branch 'mnowak/revert-workaround-temporary-cross-version-config-tests-limitation' into 'main'

See merge request isc-projects/bind9!9065

22 months agoRevert "Workaround temporary cross-version-config-tests limitation"
Michal Nowak [Fri, 24 May 2024 11:39:44 +0000 (13:39 +0200)] 
Revert "Workaround temporary cross-version-config-tests limitation"

With the release of BIND 9.19.25 this workaround is not needed anymore.

This reverts commit c58dd6e78f9c69667f0abb71d4c162a479a87029.

22 months agofix: usr: Fix algoritm rollover bug when there are two keys with the same keytag
Matthijs Mekking [Thu, 22 Aug 2024 10:11:29 +0000 (10:11 +0000)] 
fix: usr: Fix algoritm rollover bug when there are two keys with the same keytag

If there is an algorithm rollover and two keys of different algorithm share the same keytags, then there is a possibility that if we check that a key matches a specific state, we are checking against the wrong key. This has been fixed by not only checking for matching key tag but also key algorithm.

Closes #4878

Merge branch '4878-fix-algorithm-rollover-keytag-conflict-bug' into 'main'

Closes #4878

See merge request isc-projects/bind9!9381

22 months agoFix algorithm rollover bug wrt keytag conflicts
Matthijs Mekking [Wed, 21 Aug 2024 15:14:48 +0000 (17:14 +0200)] 
Fix algorithm rollover bug wrt keytag conflicts

If there is an algorithm rollover and two keys of different algorithm
share the same keytags, then there is a possibility that if we check
that a key matches a specific state, we are checking against the wrong
key.

Fix this by not only checking for matching key id but also key
algorithm.

22 months agoAdjust kasp system test to get keys which signed
Matthijs Mekking [Wed, 21 Aug 2024 15:12:30 +0000 (17:12 +0200)] 
Adjust kasp system test to get keys which signed

If there is a keytag conflict between keys with different algorithms,
we need to supply what key algorithm is used so we can get the right
public key.

For clarity, print the algorithm on the found keys after 'check_keys'.

22 months agochg: ci: Update Clang to version 19
Michal Nowak [Thu, 22 Aug 2024 08:06:56 +0000 (08:06 +0000)] 
chg: ci: Update Clang to version 19

These Clang 19-identified issues need to be addressed first:
- [x] isc-projects/bind9!9313
- [x] isc-projects/bind9!9317
- [x] isc-projects/bind9!9316
- [x] isc-projects/bind9!9315

Validation pipelines for backports:
- [x] ~"v9.21" - https://gitlab.isc.org/isc-projects/bind9/-/pipelines/191211
- [x] ~"v9.20" - https://gitlab.isc.org/isc-projects/bind9/-/pipelines/191512
- [x] ~"v9.18" - https://gitlab.isc.org/isc-projects/bind9/-/pipelines/191904

Prereq: isc-projects/images!328

Merge branch 'mnowak/llvm-19' into 'main'

See merge request isc-projects/bind9!9296

22 months agoUse clang-format-19 to update formatting
Ondřej Surý [Thu, 15 Aug 2024 07:36:53 +0000 (09:36 +0200)] 
Use clang-format-19 to update formatting

This is purely result of running:

    git-clang-format-19 --binary clang-format-19 origin/main

22 months agoUpdate Clang to version 19
Michal Nowak [Tue, 13 Aug 2024 09:28:41 +0000 (11:28 +0200)] 
Update Clang to version 19

22 months agonew: usr: Support for Offline KSK implemented
Matthijs Mekking [Thu, 22 Aug 2024 07:15:00 +0000 (07:15 +0000)] 
new: usr: Support for Offline KSK implemented

Add a new configuration option `offline-ksk` to enable Offline KSK key management. Signed Key Response (SKR) files created with `dnssec-ksr` (or other program) can now be imported into `named` with the new `rndc skr -import` command. Rather than creating new DNSKEY, CDS and CDNSKEY records and generating signatures covering these types, these records are loaded from the currently active bundle from the imported SKR.

The implementation is loosely based on: https://www.iana.org/dnssec/archive/files/draft-icann-dnssec-keymgmt-01.txt

Closes #1128

Merge branch '1128-offline-ksk-rndc-import-skr' into 'main'

Closes #1128

See merge request isc-projects/bind9!9119

22 months agoAdd a section for Offline KSK to the DNSSEC Guide
Matthijs Mekking [Tue, 13 Aug 2024 13:55:25 +0000 (15:55 +0200)] 
Add a section for Offline KSK to the DNSSEC Guide

This will describe in more detail the operational practices of
Offline KSK.

22 months agoAdd skr unit test
Matthijs Mekking [Tue, 13 Aug 2024 10:25:39 +0000 (12:25 +0200)] 
Add skr unit test

Add a test file for testing the skr related code.

22 months agoDisable some behavior in offline-ksk mode
Matthijs Mekking [Wed, 19 Jun 2024 12:48:04 +0000 (14:48 +0200)] 
Disable some behavior in offline-ksk mode

Some things we no longer want to do when we are in offline-ksk mode.

1. Don't check for inactive and private keys if the key is a KSK.
2. Don't update the TTL of DNSKEY, CDS and CDNSKEY RRset, these come
   from the SKR.

22 months agoRetrieve RRSIG from SKR
Matthijs Mekking [Wed, 19 Jun 2024 12:33:07 +0000 (14:33 +0200)] 
Retrieve RRSIG from SKR

When it is time to generate a new signature (dns_dnssec_sign), rather
than create a new one, retrieve it from the SKR.

22 months agoDon't read private key files for offline KSKs
Matthijs Mekking [Wed, 19 Jun 2024 12:07:06 +0000 (14:07 +0200)] 
Don't read private key files for offline KSKs

When we are appending contents of a DNSKEY rdataset to a keylist,
don't attempt to read the private key file of a KSK when we are in
offline-ksk mode.

22 months agoUpdate key states in offline-ksk mode
Matthijs Mekking [Wed, 19 Jun 2024 11:41:07 +0000 (13:41 +0200)] 
Update key states in offline-ksk mode

With offline-ksk enabled, we don't run the keymgr because the key
timings are determined by the SKR. We do update the key states but
we derive them from the timing metadata.

Then, we can skip a other tasks in offline-ksk mode, like DS checking
at the parent and CDS synchronization, because the CDS and CDNSKEY
RRsets also come from the SKR.

22 months agoApply SKR bundle on rekey
Matthijs Mekking [Wed, 19 Jun 2024 10:27:58 +0000 (12:27 +0200)] 
Apply SKR bundle on rekey

When a zone has a skr structure, lookup the currently active bundle
that contains the right key and signature material.

22 months agoImplement SKR import
Matthijs Mekking [Wed, 19 Jun 2024 10:17:31 +0000 (12:17 +0200)] 
Implement SKR import

When 'rndc skr import' is called, read the file contents and store the
data in the zone's skr structure.

22 months agoAdd code to store SKR
Matthijs Mekking [Wed, 19 Jun 2024 09:09:29 +0000 (11:09 +0200)] 
Add code to store SKR

This added source code stores SKR data. It is loosely based on:
https://www.iana.org/dnssec/archive/files/draft-icann-dnssec-keymgmt-01.txt

A SKR contains a list of signed DNSKEY RRsets. Each change in data
should be stored in a separate bundle. So if the RRSIG is refreshed that
means it is stored in the next bundle. Likewise, if there is a new ZSK
pre-published, it is in the next bundle.

In addition (not mentioned in the draft), each bundle may contain
signed CDS and CDNSKEY RRsets.

Each bundle has an inception time. These will determine when we need
to re-sign or re-key the zone.

22 months agoTest rndc skr import
Matthijs Mekking [Wed, 22 May 2024 09:19:20 +0000 (11:19 +0200)] 
Test rndc skr import

Test importing a Signed Key Response. Files should be loaded and once
loaded the correct bundle should be used. Alsoe test cases where the
bundle is not the first bundle in the SKR.

22 months agoAdd option to kasp.sh check_keys to retain found keys
Matthijs Mekking [Wed, 19 Jun 2024 13:58:19 +0000 (15:58 +0200)] 
Add option to kasp.sh check_keys to retain found keys

This will come in handy when we are testing offline-ksk where first
we check for ZSKs and then the KSK.

22 months agoImplement dummy 'rndc skr -import' command
Matthijs Mekking [Fri, 19 Apr 2024 12:41:41 +0000 (14:41 +0200)] 
Implement dummy 'rndc skr -import' command

Add the code and documentation required to provide KSR import using
rndc.  This is just the command, and the feature is at this point in
time still not implemented.

22 months agoAdd a common setup script for ksr
Matthijs Mekking [Tue, 7 May 2024 09:53:07 +0000 (11:53 +0200)] 
Add a common setup script for ksr

The previous setup.sh has been moved to ns1/setup.sh, we need a common
setup script to invoke ns1/setup.sh.

22 months agoUpdate ksr system test to include server
Matthijs Mekking [Tue, 7 May 2024 09:51:55 +0000 (11:51 +0200)] 
Update ksr system test to include server

Prepare the system test for tests that require a server to import
created SKR files. This means the test script needs adjustments to
take into account the directory test files are located.

In addition, the check_keys function is renamed to ksr_check_keys
because the name clashes with check_keys from kasp.sh. It also has an
extra parameter added, offset, that can be used to check ksr files that
are created in the past or future.

22 months agoAdd offline-ksk option
Matthijs Mekking [Fri, 22 Mar 2024 10:48:53 +0000 (11:48 +0100)] 
Add offline-ksk option

Add a new configuration option to enable Offline KSK key management.

Offline KSK cannot work with CSK because it splits how keys with the
KSK and ZSK role operate. Therefore, one key cannot have both roles.
Add a configuration check to ensure this.

22 months agochg: dev: Restore the ability to select individual unit tests
Mark Andrews [Thu, 22 Aug 2024 00:54:13 +0000 (00:54 +0000)] 
chg: dev: Restore the ability to select individual unit tests

This add the command line arguments: `-d` (debug), `-l` (list tests) and `-t test` (run this test) to the unit tests.

Closes #4579

Merge branch '4579-restore-the-ability-to-select-individual-unit-tests' into 'main'

Closes #4579

See merge request isc-projects/bind9!9384

22 months agoExtend ISC_TEST_MAIN for debugging
Mark Andrews [Fri, 7 Oct 2022 05:13:32 +0000 (16:13 +1100)] 
Extend ISC_TEST_MAIN for debugging

ISC_TEST_MAIN now supports turning on/off debugging and
running individual tests.

22 months agochg: ci: Add FreeBSD 14.1
Michal Nowak [Wed, 21 Aug 2024 16:28:48 +0000 (16:28 +0000)] 
chg: ci: Add FreeBSD 14.1

Prereq: https://gitlab.isc.org/isc-projects/images/-/merge_requests/323

Merge branch 'mnowak/freebsd-14.1' into 'main'

See merge request isc-projects/bind9!9116

22 months agoAdd FreeBSD 14.1
Michal Nowak [Thu, 20 Jun 2024 18:42:32 +0000 (20:42 +0200)] 
Add FreeBSD 14.1

22 months agochg: Merge 9.21.0 release branch
Nicki Křížek [Wed, 21 Aug 2024 15:10:37 +0000 (15:10 +0000)] 
chg: Merge 9.21.0 release branch

Merge branch 'main-merge-v9.21.0' into 'main'

Closes #4733

See merge request isc-projects/bind9!9378

22 months agoMerge tag 'v9.21.0'
Nicki Křížek [Wed, 21 Aug 2024 14:22:41 +0000 (16:22 +0200)] 
Merge tag 'v9.21.0'

22 months agofix: usr: Fix rare assertion failure when shutting down incoming transfer
Ondřej Surý [Wed, 21 Aug 2024 11:56:10 +0000 (11:56 +0000)] 
fix: usr: Fix rare assertion failure when shutting down incoming transfer

A very rare assertion failure can be triggered when the incoming transfer is either forcefully shut down or it is finished during printing the details about the statistics channel.  This has been fixed.

Closes #4860

Merge branch '4860-destroy-xfrin-timers-on-the-loop' into 'main'

Closes #4860

See merge request isc-projects/bind9!9336

22 months agoDestroy the dns_xfrin isc_timers on the correct loop
Ondřej Surý [Mon, 19 Aug 2024 08:14:19 +0000 (10:14 +0200)] 
Destroy the dns_xfrin isc_timers on the correct loop

There are few places where we attach/detach from the dns_xfrin object
while running on a different thread than the zone's assigned thread -
xfrin_xmlrender() in the statschannel and dns_zone_stopxfr() to name the
two places where it happens now.  In the rare case, when the incoming
transfer completes (or shuts down) in the brief period between the other
thread attaches and detaches from the dns_xfrin, the isc_timer_destroy()
calls would be called by the last thread calling the xfrin_detach().
In the worst case, it would be this other thread causing assertion
failure.  Move the isc_timer_destroy() call to xfrin_end() function
which is always called on the right thread and to match this move
isc_timer_create() to xfrin_start() - although this other change makes
no difference.

22 months agonew: usr: Print the full path of the working directory in startup log messages
Arаm Sаrgsyаn [Tue, 20 Aug 2024 17:30:26 +0000 (17:30 +0000)] 
new: usr: Print the full path of the working directory in startup log messages

named now prints its initial working directory during startup and the
changed working directory when loading or reloading its configuration
file if it has a valid 'directory' option defined.

Closes #4731

Merge branch '4731-log-workdir-full-path' into 'main'

Closes #4731

See merge request isc-projects/bind9!9362

22 months agoPrint the full path of the working directory in startup log messages
Aram Sargsyan [Tue, 20 Aug 2024 11:30:13 +0000 (11:30 +0000)] 
Print the full path of the working directory in startup log messages

named now prints its initial working directory during startup and the
changed working directory when loading or reloading its configuration
file if it has a valid 'directory' option defined.

22 months agochg: dev: Use seteuid()/setegid() instead of setreseuid()/setresgid()
Ondřej Surý [Tue, 20 Aug 2024 14:58:39 +0000 (14:58 +0000)] 
chg: dev: Use seteuid()/setegid() instead of setreseuid()/setresgid()

It looks like that all supported systems now have support for
_POSIX_SAVED_IDS, so it's safe to use setegid() and setegid() because
those will not change saved used/group IDs.

Closes #4862

Merge branch '4862-just-use-seteuid-and-setegid' into 'main'

Closes #4862

See merge request isc-projects/bind9!9363

22 months agoUse seteuid()/setegid() instead of setreseuid()/setresgid()
Ondřej Surý [Tue, 20 Aug 2024 11:44:06 +0000 (13:44 +0200)] 
Use seteuid()/setegid() instead of setreseuid()/setresgid()

It looks like that all supported systems now have support for
_POSIX_SAVED_IDS, so it's safe to use setegid() and setegid() because
those will not change saved used/group IDs.

22 months agofix: test: Allow TTL skew in the badcache print unit test
Ondřej Surý [Tue, 20 Aug 2024 13:57:57 +0000 (13:57 +0000)] 
fix: test: Allow TTL skew in the badcache print unit test

If the machine running the job is extra loaded (or extra slow), the
print test in the badcache unit test would fail because the TTL would be
59 (possibly even lower) and the test expects the badcache.out to only
have TTL 60.  Refactor the test to check for the expected strings and
check whether the TTL is in the expected range.

Closes #4861

Merge branch '4861-allow-TTL-skew-in-badcache_test' into 'main'

Closes #4861

See merge request isc-projects/bind9!9338

22 months agoAllow TTL skew in the badcache print unit test
Ondřej Surý [Mon, 19 Aug 2024 09:01:08 +0000 (11:01 +0200)] 
Allow TTL skew in the badcache print unit test

If the machine running the job is extra loaded (or extra slow), the
print test in the badcache unit test would fail because the TTL would be
59 (possibly even lower) and the test expects the badcache.out to only
have TTL 60.  Refactor the test to check for the expected strings and
check whether the TTL is in the expected range.

22 months agochg: dev: Use single logging context for everything
Ondřej Surý [Tue, 20 Aug 2024 12:56:04 +0000 (12:56 +0000)] 
chg: dev: Use single logging context for everything

Instead of juggling different logging context, use one single logging
context that gets initialized in the libisc constructor and destroyed in
the libisc destructor.

Closes #4848

Merge branch '4848-refactor-isc_log-api-to-use-single-global-logging-context' into 'main'

Closes #4848

See merge request isc-projects/bind9!9301

22 months agopause to let reloading complete
Evan Hunt [Mon, 19 Aug 2024 22:59:28 +0000 (15:59 -0700)] 
pause to let reloading complete

the rpz test frequently failed in DNSRPS mode and sometimes in native
mode as well because of an 'rndc reload' not being complete.

22 months agoAdd isc_log_createandusechannel() function to simplify usage
Ondřej Surý [Wed, 14 Aug 2024 12:38:07 +0000 (14:38 +0200)] 
Add isc_log_createandusechannel() function to simplify usage

The new
isc_log_createandusechannel() function combines following calls:

    isc_log_createchannel()
    isc_log_usechannel()

calls into a single call that cannot fail and therefore can be used in
places where we know this cannot fail thus simplifying the error
handling.

22 months agoConvert all categories and modules into static lists
Ondřej Surý [Wed, 14 Aug 2024 11:25:50 +0000 (13:25 +0200)] 
Convert all categories and modules into static lists

Remove the complicated mechanism that could be (in theory) used by
external libraries to register new categories and modules with
statically defined lists in <isc/log.h>.  This is similar to what we
have done for <isc/result.h> result codes.  All the libraries are now
internal to BIND 9, so we don't need to provide a mechanism to register
extra categories and modules.

22 months agoRemove logging context (isc_log_t) from the public namespace
Ondřej Surý [Tue, 13 Aug 2024 16:20:26 +0000 (18:20 +0200)] 
Remove logging context (isc_log_t) from the public namespace

Now that the logging uses single global context, remove the isc_log_t
from the public namespace.

22 months agoRemove isc_log_write1() and isc_log_vwrite1() functions
Ondřej Surý [Tue, 13 Aug 2024 15:16:57 +0000 (17:16 +0200)] 
Remove isc_log_write1() and isc_log_vwrite1() functions

The isc_log_write1() and isc_log_vwrite1() functions were meant to
de-duplicate the messages sent to the isc_log subsystem.  However, they
were never used in an entire code base and the whole mechanism around it
was complicated and very inefficient.  Just remove those, there are
better ways to deduplicate syslog messages inside syslog daemons now.

22 months agoReplace isc_log_create/destroy with isc_logconfig_get()
Ondřej Surý [Tue, 13 Aug 2024 13:52:51 +0000 (15:52 +0200)] 
Replace isc_log_create/destroy with isc_logconfig_get()

Add isc_logconfig_get() function to get the current logconfig and use
the getter to replace most of the little dancing around setting up
logging in the tools. Thus:

    isc_log_create(mctx, &lctx, &logconfig);
    isc_log_setcontext(lctx);
    dns_log_setcontext(lctx);
    ...
    ...use lcfg...
    ...
    isc_log_destroy();

is now only:

    logconfig = isc_logconfig_get(lctx);
    ...use lcfg...

For thread-safety, isc_logconfig_get() should be surrounded by RCU read
lock, but since we never use isc_logconfig_get() in threaded context,
the only place where it is actually used (but not really needed) is
named_log_init().

22 months agoUse single logging context for everything
Ondřej Surý [Tue, 13 Aug 2024 12:46:42 +0000 (14:46 +0200)] 
Use single logging context for everything

Instead of juggling different logging context, use one single logging
context that gets initialized in the libisc constructor and destroyed in
the libisc destructor.

The application is still responsible for creating the logging
configuration before using the isc_log API.

This patch is first in the series in a way that it is transparent for
the users of the isc_log API as the isc_log_create() and
isc_log_destroy() are now thin shims that emulate the previous
functionality, but it isc_log_create() will always return internal
isc__lctx pointer and isc_log_destroy() will actually not destroy the
internal isc__lctx context.

Signed-off-by: Ondřej Surý <ondrej@isc.org>
22 months agofix: test: Ignore ISC_R_CONNECTIONRESET in the TCP tests
Ondřej Surý [Tue, 20 Aug 2024 12:46:09 +0000 (12:46 +0000)] 
fix: test: Ignore ISC_R_CONNECTIONRESET in the TCP tests

On FreeBSD, the TCP connection callback could spuriously receive
ISC_R_CONNECTIONRESET even when connection to the loopback interface.
Skip the other checks in such case and graciously shutdown the TCP
connection.

Closes #4849

Merge branch '4849-dispatch_test-fails-in-connected_shutdown-on-freebsd' into 'main'

Closes #4849

See merge request isc-projects/bind9!9303

22 months agoIgnore ISC_R_CONNECTIONRESET in the TCP tests
Ondřej Surý [Wed, 14 Aug 2024 08:01:33 +0000 (10:01 +0200)] 
Ignore ISC_R_CONNECTIONRESET in the TCP tests

On FreeBSD, the TCP connection callback could spuriously receive
ISC_R_CONNECTIONRESET even when connection to the loopback interface.
Skip the other checks in such case and graciously shutdown the TCP
connection.

22 months agochg: Update Internal_use_only-CVE.md checklist changing some tasks
Petr Špaček [Tue, 20 Aug 2024 12:36:36 +0000 (12:36 +0000)] 
chg: Update Internal_use_only-CVE.md checklist changing some tasks

Update Internal_use_only-CVE.md checklist changing some tasks and responsibilities reflecting the new ASN process with RT vs SF. Support will now be sending ASNs to customers, although Marketing will announce the new releases (both publicly and to support customers).

Merge branch 'vicky-main-patch-57381' into 'main'

See merge request isc-projects/bind9!9307

22 months agoApply 1 suggestion(s) to 1 file(s)
Vicky Risk [Wed, 14 Aug 2024 17:32:12 +0000 (17:32 +0000)] 
Apply 1 suggestion(s) to 1 file(s)

Co-authored-by: Darren Ankney <dankney@isc.org>
22 months agoApply 1 suggestion(s) to 1 file(s)
Vicky Risk [Wed, 14 Aug 2024 17:32:00 +0000 (17:32 +0000)] 
Apply 1 suggestion(s) to 1 file(s)

Co-authored-by: Darren Ankney <dankney@isc.org>
22 months agoApply 1 suggestion(s) to 1 file(s)
Vicky Risk [Wed, 14 Aug 2024 17:30:07 +0000 (17:30 +0000)] 
Apply 1 suggestion(s) to 1 file(s)

Co-authored-by: Darren Ankney <dankney@isc.org>
22 months agoApply 1 suggestion(s) to 1 file(s)
Vicky Risk [Wed, 14 Aug 2024 17:29:23 +0000 (17:29 +0000)] 
Apply 1 suggestion(s) to 1 file(s)

Co-authored-by: Darren Ankney <dankney@isc.org>
22 months agoUpdate Internal_use_only-CVE.md checklist changing some tasks and responsibilities...
Vicky Risk [Wed, 14 Aug 2024 14:34:09 +0000 (14:34 +0000)] 
Update Internal_use_only-CVE.md checklist changing some tasks and responsibilities reflecting the new ASN process with RT vs SF

22 months agochg: doc: Improve changelog & release notes workflow
Nicki Křížek [Tue, 20 Aug 2024 11:50:48 +0000 (11:50 +0000)] 
chg: doc: Improve changelog & release notes workflow

Related: #4847

Merge branch '4847-changelog-sorting-and-tweaks' into 'main'

See merge request isc-projects/bind9!9300

22 months agoOmit MR link from release notes
Nicki Křížek [Tue, 13 Aug 2024 15:28:50 +0000 (17:28 +0200)] 
Omit MR link from release notes

When manually handling the release notes (due to rst markup, fixups
etc.), the different MR number for backports causes needless friction.
Remove the reference from release notes and keep it only in changelog
which isn't manually redacted.

22 months agoSort changelog & relnotes entries by issue number
Nicki Křížek [Tue, 13 Aug 2024 15:20:54 +0000 (17:20 +0200)] 
Sort changelog & relnotes entries by issue number

To reduce the friction when handling the release notes, it is preferable
to have the sections sorted by issue number, rather than merge order.
Fallback to commit subject line if unavailable (e.g. for changelog
entries).

22 months agofix: dev: Fix the resesuid() shim implementation for NetBSD
Ondřej Surý [Tue, 20 Aug 2024 10:22:08 +0000 (10:22 +0000)] 
fix: dev: Fix the resesuid() shim implementation for NetBSD

The shim implementation of setresuid() was wrong - there was a copy and
paste error and it was calling setresgid() instead.  This only affects
NetBSD because Linux, FreeBSD and OpenBSD have setresuid() and
setresgid() implementation available from the system library.

Closes #4862

Merge branch '4862-fix-setresuid-shim' into 'main'

Closes #4862

See merge request isc-projects/bind9!9359