Commit Graph

41985 Commits

Author SHA1 Message Date
Remi Gacogne
cc9366031b '{&dns}' is as valid as '{?dns}' in a SVCB's dohpath
See for example section 1.2. "Levels and Expression Types" of rfc6570.

(cherry picked from commit e74052ea71)
2024-11-26 03:41:45 +00:00
Mark Andrews
41fd5e9955 [9.20] fix: usr: Provide more visibility into configuration errors
by logging SSL_CTX_use_certificate_chain_file and SSL_CTX_use_PrivateKey_file errors individually.

Closes #5008

Backport of MR !9683

Merge branch 'backport-5008-provide-more-visibility-into-ssl-errors-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9767
2024-11-26 03:16:26 +00:00
Mark Andrews
983d8a6821 Provide more visibility into configuration errors
by logging SSL_CTX_use_certificate_chain_file and
SSL_CTX_use_PrivateKey_file errors

(cherry picked from commit 9006839ed7)
2024-11-26 12:25:01 +11:00
Nicki Křížek
c3691d138a [9.20] fix: test: Allow re-run of mkeys system test
On some slow systems, the test might intermittently fail due to inherent
timing issues. In our CI, this most often happens in the
system:gcc:8fips:amd64 jobs.

Closes #3098

Backport of MR !9732

Merge branch 'backport-3098-allow-re-run-of-mkeys-test-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9764
2024-11-25 15:44:47 +00:00
Nicki Křížek
80967a2c66 Allow re-run of mkeys system test
On some slow systems, the test might intermittently fail due to inherent
timing issues. In our CI, this most often happens in the
system:gcc:8fips:amd64 jobs.

(cherry picked from commit a299650a6f)
2024-11-25 14:35:54 +00:00
Michal Nowak
402e0596c8 [9.20] fix: ci: Fix paths to binaries in cross-version-config-tests job
The cross-version-config-tests job has never functioned in CI because
the testing framework changed after the testing was completed. To run
the new "named" binary using the old configurations, paths in the test
framework must be updated to point to the location of the new binaries.

Closes #4977

Backport of MR !9702

Merge branch 'backport-4977-fix-cross-version-config-tests-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9762
2024-11-25 12:32:23 +00:00
Michal Nowak
b60f28389d Fix paths to binaries in cross-version-config-tests job
The cross-version-config-tests job has never functioned in CI because
the testing framework changed after the testing was completed. To run
the new "named" binary using the old configurations, paths in the test
framework must be updated to point to the location of the new binaries.

(cherry picked from commit 09d7e2430a)
2024-11-25 12:11:33 +00:00
Mark Andrews
428b155e12 [9.20] chg: nil: Re-split format strings lib/ns/update.c
Re-split format strings that had been poorly split by multiple
clang-format runs using different versions of clang-format. 

Closes #5043

Backport of MR !9752

Merge branch 'backport-5043-re-split-format-strings-lib-ns-update-c-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9755
2024-11-21 06:27:16 +00:00
Mark Andrews
1135bf9284 Re-split format strings
Re-split format strings that had been poorly split by multiple
clang-format runs using different versions of clang-format.

(cherry picked from commit a24d6e1654)
2024-11-21 04:22:11 +00:00
Ondřej Surý
4230b2b514 [9.20] chg: dev: Add two new clang-format options that help with code formatting
* Add new clang-format option to remove redundant semicolons
* Add new clang-format option to remove redundant parentheses

Backport of MR !9749

Merge branch 'backport-ondrej/code-style-2024-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9750
2024-11-19 15:42:23 +00:00
Ondřej Surý
5448b2ea25 Ignore clang-format reformatting commit
(cherry picked from commit 82f0c31c0d)
2024-11-19 14:27:51 +01:00
Ondřej Surý
c22176c0f9 Remove redundant semicolons after the closing braces of functions
(cherry picked from commit 1a19ce39db)
2024-11-19 14:26:56 +01:00
Ondřej Surý
1fdc2d76f3 Add new clang-format option to remove redundant semicolons
The new clang-format options (since clang-format 16) removes semicolons
after the closing braces of functions and constructors/destructors.

(cherry picked from commit c7420eccd9)
2024-11-19 14:26:55 +01:00
Ondřej Surý
58a15d38c2 Remove redundant parentheses from the return statement
(cherry picked from commit 0258850f20)
2024-11-19 14:26:52 +01:00
Ondřej Surý
2044a64d8b Add new clang-format option to remove redundant parentheses
The new clang-format option (since 17) can remove redundant parentheses
in the return statement (with configuration value ReturnStatement).

(cherry picked from commit 3873b0c279)
2024-11-19 14:15:20 +01:00
Arаm Sаrgsyаn
2cb91e0631 [9.20] fix: dev: Fix a data race between dns_zone_getxfr() and dns_xfrin_create()
There is a data race between the statistics channel, which uses
`dns_zone_getxfr()` to get a reference to `zone->xfr`, and the creation
of `zone->xfr`, because the latter happens outside of a zone lock.

Split the `dns_xfrin_create()` function into two parts to separate the
zone transfer starting part from the zone transfer object creation part.
This allows us to attach the new object to a local variable first, then
attach it to `zone->xfr` under a lock, and only then start the transfer.

Closes #5011

Backport of MR !9716

Merge branch 'backport-5011-dns_zone_getxfr-race-fix-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9728
2024-11-16 19:51:25 +00:00
Aram Sargsyan
19d4539926 Fix a data race between dns_zone_getxfr() and dns_xfrin_create()
There is a data race between the statistics channel, which uses
`dns_zone_getxfr()` to get a reference to `zone->xfr`, and the creation
of `zone->xfr`, because the latter happens outside of a zone lock.

Split the `dns_xfrin_create()` function into two parts to separate the
zone tranfer startring part from the zone transfer object creation part.
This allows us to attach the new object to a local variable first, then
attach it to `zone->xfr` under a lock, and only then start the transfer.

(cherry picked from commit dbf230650f)
2024-11-16 18:55:00 +00:00
Evan Hunt
1f988e2cc7 [9.20] new: usr: Update bind.keys with the new 2025 IANA root key
Add an 'initial-ds' entry to bind.keys for the new root key, ID
38696, which is scheduled for publication in January 2025.

Closes #4896

Backport of MR !9422

Merge branch 'backport-4896-update-bind-keys-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9746
2024-11-15 23:16:37 +00:00
Evan Hunt
7045da6d6a Add the DS for the new root key (38696)
Add an 'initial-ds' entry to bind.keys for the new root key, ID
38696, scheduled for publication in January 2025.

(cherry picked from commit 609bf35075)
2024-11-15 22:32:10 +00:00
Ondřej Surý
4740d5d0a9 [9.20] fix: nil: Add OpenSSL includes as needed
The isc/crypto.h now directly includes the OpenSSL headers (evp.h) and
any application that includes that header also needs to have
OPENSSL_CFLAGS in the Makefile.am.  Adjust the required automake files
as needed.

Backport of MR !9713

Merge branch 'backport-ondrej/add-missing-OPENSSL_CFLAGS-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9715
2024-11-15 15:54:59 +00:00
Ondřej Surý
9b346bc6f1 Add OpenSSL includes as needed
The isc/crypto.h now directly includes the OpenSSL headers (evp.h) and
any application that includes that header also needs to have
OPENSSL_CFLAGS in the Makefile.am.  Adjust the required automake files
as needed.

(cherry picked from commit 88103e72d5)
2024-11-15 14:03:44 +00:00
Petr Špaček
74028e3923 [9.20] chg: doc: Move Known Issues to BIND9 wiki
Merge branch 'nicki/move-known-issues-to-wiki-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9730
2024-11-15 13:02:23 +00:00
Nicki Křížek
81b641d59c Move Known Issues to BIND9 wiki
Keeping the Known Issues as part of the rendered docs has the issue that
the list can't be updated on the official docs website until the next
release. This is unpractical is a high-priority issue is discovered
shortly after a release. Keep the Known Issues in wiki and simply link
to the list from the rendered docs. The wiki article can be updated at
any time as needed.
2024-11-15 13:00:31 +00:00
Ondřej Surý
668ea24467 [9.20] fix: usr: Fix race condition when canceling ADB find
When canceling the ADB find, the lock on the find gets released for
a brief period of time to be locked again inside adbname lock.  During
the brief period that the ADB find is unlocked, it can get canceled by
other means removing it from the adbname list which in turn causes
assertion failure due to a double removal from the adbname list.
This has been fixed.

Closes #5024

Backport of MR !9722

Merge branch 'backport-5024-fix-crash-in-dns_adb_cancelfind-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9744
2024-11-13 08:52:08 +00:00
Ondřej Surý
d6f2dd79f6 Revalidate the adbname when canceling the ADB find
When canceling the ADB find, the lock on the find gets released for
a brief period of time to be locked again inside adbname lock.  During
the brief period that the ADB find is unlocked, it can get canceled by
other means removing it from the adbname list which in turn causes
assertion failure due to a double removal from the adbname list.

Recheck if the find->adbname is still valid after acquiring the lock
again and if not just skip the double removal.  Additionally, attach to
the adbname as in the worst case, the adbname might also cease to exist
if the scheduler would block this particular thread for a longer period
of time invalidating the lock we are going to acquire and release.

(cherry picked from commit 128e50e1ff)
2024-11-13 07:51:19 +00:00
Nicki Křížek
9487ab6ae5 [9.20] fix: test: minor fixes for extra_artifacts detection
Some omissions of !9426 discovered during the backports

Backport of MR !9739

Merge branch 'backport-nicki/extra-artifacts-fixups-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9741
2024-11-12 13:29:51 +00:00
Nicki Křížek
9ba60be870 Fix clean.sh removal omissions
- Ensure keyfromlabel token is cleaned up
- Remove forgotten clean.sh file
- Add missing enginepkcs11 test artifact

(cherry picked from commit 7dde34afac)
2024-11-12 11:21:15 +01:00
Nicki Křížek
0b9d3fbfea Ensure pytest runner get proper outcome from flaky reruns
When a test is re-run by the flaky plugin, the TestReport outcomes
collected in the pytest_runtest_makereport() hook should be overriden.
Each of the setup/call/teardown phases is reported again and since we
care about the overall outcome, their respective results should be
overriden so that only the outcome from the final test (re)run gets
reported.

Prior to this change, it lead to a situation where an extra_artifact
generated during the test might be ignored. This was caused because the
check was skipped, since the test was incorrectly considered as "failed"
in the case where the test would fail on the first run, but pass on a
subsequent flaky rerun.

(cherry picked from commit b66fb31dcb)
2024-11-12 10:20:27 +00:00
Nicki Křížek
e5fa109599 [9.20] chg: dev: Use lists of expected artifacts in system tests
``clean.sh`` scripts have been replaced by lists of expected artifacts for each system test module. The list is defined using the custom ``pytest.mark.extra_artifacts`` mark, which can use both filenames and globs.

Closes #4261

Backport of MR !9426

Merge branch 'backport-4261-add-pytest-fixture-checking-test-artifacts-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9734
2024-11-08 15:24:07 +00:00
Nicki Křížek
0ed39d76dc Remove invocations and mentions of clean.sh
(cherry picked from commit f2cb2e5723)
2024-11-08 15:39:50 +01:00
Nicki Křížek
c3a0af96ad Replace clean.sh files with extra_artifacts mark
The artifact lists in clean.sh and extra_artifacts might be slightly
different. The list was updated for each test to reflect the current
state.

(cherry picked from commit 7c259fe254)
2024-11-08 15:39:50 +01:00
Michał Kępień
95d3bbd5dc Add pytest fixture for checking test artifacts
Prior to introducing the pytest runner, clean.sh files were used as a
list of files that the test is expected to leave around as artifacts and
check that no extra files were created.

With the pytest runner, those scripts are no longer used, but the
ability to detect extraneous files is still useful. Add a new
"extra_artifacts" mark which can be used for the same purpose.

(cherry picked from commit 3a9f4edddc)
2024-11-08 15:39:50 +01:00
Mark Andrews
ee91ba9dd3 [9.20] rem: nil: Remove named_g_sessionkey and named_g_sessionkeyname
Remove named_g_sessionkey and named_g_sessionkeyname as they are declared and cleaned up but otherwise are unused.

Closes #5023

Backport of MR !9720

Merge branch 'backport-5023-remove-named_g_sessionkey-as-it-is-unused-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9725
2024-11-07 05:15:00 +00:00
Mark Andrews
e2746e86d9 Remove named_g_sessionkey and named_g_sessionkeyname
They are only declared and cleaned up but otherwise unused.

(cherry picked from commit f70ff727ec)
2024-11-07 02:18:48 +00:00
Mark Andrews
6cd001a68b [9.20] chg: usr: Print expire option in transfer summary.
The zone transfer summary will now print the expire option value in the zone transfer summary.

Closes #5013

Backport of MR !9694

Merge branch 'backport-5013-print-expire-option-in-transfer-summary-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9714
2024-11-05 02:06:11 +00:00
Mark Andrews
57e84efd67 Update zone transfer summary
Print the expire option in the zone transfer summary. This is
currently emitted in a DEBUG(1) message.

(cherry picked from commit 5253c75b7a)
2024-11-04 18:30:10 +00:00
Mark Andrews
834c04fc77 [9.20] chg: usr: dnssec-ksr now supports KSK rollovers
The tool 'dnssec-ksr' now allows for KSK generation, as well as planned KSK rollovers. When signing a bundle from a Key Signing Request (KSR), only the key that is active in that time frame is being used for signing. Also, the CDS and CDNSKEY records are now added and removed at the correct time.

Closes #4697 

Closes #4705

Backport of MR !9452

Merge branch 'backport-4705-dnssec-ksr-only-sign-with-active-ksks-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9711
2024-11-04 02:16:52 +00:00
Matthijs Mekking
9a92cb4fbb Fix dnssec-ksr to support KSK rollovers
dnssec-ksr can now sign KSR files with multiple KSKs. A planned KSK
rollover is supported, meaning the KSR will first be signed with
one KSK and later with another. The timing metadata for CDS and
CDNSKEY records are also taken into account, so these records are
only published when the time is between "SyncPublish" and "SyncDelete".

(cherry picked from commit d7f2a2f437)
2024-11-04 01:10:34 +00:00
Matthijs Mekking
1fcc346729 Add KSK roll test case
Add a test case for Offline KSK where during the lifespan of the Signed
Key Response a KSK rollover happens. Ensure that the correct DNSKEY,
CDNSKEY, and CDS records are published at the right times.

(cherry picked from commit 8cf5f972f4)
2024-11-04 01:10:34 +00:00
Matthijs Mekking
2e5a2f4e81 Allow empty CDNSKEY/CDS RRset in ksr system test
When the zone is initially signed, the CDNSKEY/CDS RRset is not
immediately published. The DNSKEY and signatures must propagate first.
Adjust the test to allow for this case.

(cherry picked from commit 708927e03d)
2024-11-04 01:10:34 +00:00
Matthijs Mekking
a92fb659d3 dnssec-ksr keygen -o to create KSKs
Add an option to dnssec-ksr keygen, -o, to create KSKs instead of ZSKs.
This way, we can create a set of KSKS for a given period too.

For KSKs we also need to set timing metadata, including "SyncPublish"
and "SyncDelete". This functionality already exists in keymgr.c so
let's make the function accessible.

Replace dnssec-keygen calls with dnssec-ksr keygen for KSK in the
ksr system test and check keys for created KSKs as well. This requires
a slight modification of the check_keys function to take into account
KSK timings and metadata.

(cherry picked from commit 680aedb595)
2024-11-04 01:10:34 +00:00
Matthijs Mekking
1adcb2945e Add -f option to dnssec-ksr documentation
This was previously left out by error.

(cherry picked from commit 01169b7ffc)
2024-11-04 01:10:34 +00:00
Mark Andrews
2d4d8382c8 [9.20] fix: nil: TLS notify checks fail on OL 8 FIPS
Add missing checks for `$FEATURETEST --have-fips-dh` in notify system test to match those in setup.sh.

Closes #5015

Backport of MR !9707

Merge branch 'backport-5015-tls-notify-checks-fail-on-ol-8-fips-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9712
2024-11-02 06:36:41 +00:00
Mark Andrews
f793b28de4 Add missing $FEATURETEST --have-fips-dh
Notify over TLS only works if FIPS DH is supported.  Skip the system
tests parts that depend on it.

(cherry picked from commit 4f7e3e29a7)
2024-11-02 06:02:51 +00:00
Matthijs Mekking
ba2e8fe5f9 [9.20] chg: test: Match algorithms when checking signatures
In the ksr system test, the 'test_ksr_twotone' case may fail if there are two keys with the same keytag (but different algorithms), because one key is expected to be signing and the other is not.

Switch to regular expression matching and include the algorithm in the search string.

Closes #5017

Backport of MR !9701

Merge branch 'backport-5017-unexpected-match-ksr-twotone-again-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9710
2024-11-01 14:51:01 +00:00
Matthijs Mekking
9621369524 Match algorithms when checking signatures
In the ksr system test, the test_ksr_twotone case may fail if there
are two keys with the same keytag (but different algorithms), because
one key is expected to be signing and the other is not.

Switch to regular expression matching and include the algorithm in the
search string.

(cherry picked from commit 795fcc9f80)
2024-11-01 14:16:38 +00:00
Michal Nowak
b02f039d3a [9.20] chg: test: Rewrite rsabigexponent system test to pytest
Backport of MR !9157

Merge branch 'backport-mnowak/pytest_rewrite_rsabigexponent-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9705
2024-10-31 18:57:28 +00:00
Michal Nowak
ba1d4cc4db Rewrite rsabigexponent system test to pytest
(cherry picked from commit cacff68e78)
2024-10-31 18:15:14 +00:00
Michal Nowak
4f4a39e910 [9.20] fix: doc: Remove the CHANGES file
With the introduction of the generated changelog, the CHANGES file
became a symlink to doc/arm/changelog.rst. After the changes made in
!9549, the changelog file transitioned from being a wholly generated
file to one that includes versioned changelog files, which are
themselves generated. However, while implementing !9549, we overlooked
that the CHANGES file is copied to a release directory on an FTP server
and contains just "include" directives, not the changelog itself.
Therefore, in the same fashion as the "RELEASE-NOTES*.html" file, create
a "CHANGELOG*.html" file that redirects to the Changelog appendix of the
ARM.

Closes #5000

Backport of MR !9690

Merge branch 'backport-5000-provide-correct-changelog-on-ftp-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9703
2024-10-31 18:11:43 +00:00
Michal Nowak
daab2defe6 Fix changelog history header
(cherry picked from commit 9750f22e3a)
2024-10-31 16:46:58 +00:00