Commit graph

43562 commits

Author SHA1 Message Date
Aram Sargsyan
e2bfce435f Test that catalog zones' entry names are case-insensitive
(cherry picked from commit 4e9d97b4f7)
2026-01-12 13:01:53 +00:00
Aram Sargsyan
439e4ddf2f Make catalog zones' entry names case-insensitive
Previously, the isc_ht hash table module was case-sensitive, but now
it supports case-insensitive mode. Use the case-insensitive mode
for the catalog zones' entry names.

(cherry picked from commit 6f4b5d6958)
2026-01-12 13:01:53 +00:00
Aram Sargsyan
5a00d2ffe0 Test that catalog zone names are case-insensitive
Change one of the existing catalog zone names to test that
catalog zones are now case-insensitive.

(cherry picked from commit 6d0e6454ac)
2026-01-12 13:01:53 +00:00
Aram Sargsyan
5f30b6a9be Make catalog zone names case-insensitive
Previously, the isc_ht hash table module was case-sensitive, but now
it supports case-insensitive mode. Use the case-insensitive mode
for catalog zone names.

(cherry picked from commit 0e0ba06dbf)
2026-01-12 13:01:53 +00:00
Nicki Křížek
8b0d752db2 [9.20] chg: test: Replace digdelv ans.pl with AsyncDnsServer
Rewrite ans servers in digdelv test to use AsyncDnsServer.

Backport of MR !11308

Merge branch 'backport-nicki/asyncdnsserver-digdelv-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11448
2026-01-12 13:21:42 +01:00
Nicki Křížek
5e02d42a23 Renumber ans7->ans6 and ans8->ans7 in digdelv test
Since there was no 10.53.0.6 server in the test, renumber the remaining
ones so that there's no gap in the server names.

This commit simply moves the ans.py files without any changes and
renumbers the IP addresses in tests.

(cherry picked from commit 9b63187a99)
2026-01-12 10:53:23 +00:00
Nicki Křížek
25540fdead Add dnspython>=2.0.0 requirement for digdelv
Now that the test uses AsyncDnsServer, require the appropriate dnspython
version for the test.

(cherry picked from commit 6c69abf783)
2026-01-12 10:53:23 +00:00
Nicki Křížek
5c2dc5ad3b Replace digdelv/ans8 with AsyncDnsServer
Previously, the ans8 server had different response modes that applied to
all queries. Replace it with AsyncDnsServer that has serves the different
response modes under different domains without the need to change the
server behaviour at runtime.

Add the new queries that require an ns3 fallback to the ns3/example.db
zone.

(cherry picked from commit 0b7a089c7f)
2026-01-12 10:53:23 +00:00
Nicki Křížek
4a1f4d67a9 Replace digdelv/ans5 with ControllableAsyncDnsServer
The server has three modes of operation - either no response, a partial
AXFR or a complete AXFR. To test the fallback behaviour of dig, these
actions are be combined in a specific sequences. To set up the desired
server behaviour, use the _control queries for the server.

(cherry picked from commit 575f0e3916)
2026-01-12 10:53:23 +00:00
Nicki Křížek
9d8cd877a0 Rename ResponseDropAndCloseConnection action
The action can be used to close the connection even after some response
was sent, depending on the ordering of actions in the handler that uses
it. Rename it to CloseConnection to use a more fitting name.

(cherry picked from commit 20887ff80f)
2026-01-12 10:53:23 +00:00
Nicki Křížek
4fddae6100 Replace digdelv/ans7 with AsyncDnsServer
ans7 server always replies with an UPDATE opcode in the message.

(cherry picked from commit c50a7d2de1)
2026-01-12 10:53:23 +00:00
Nicki Křížek
0e6c9cae68 Replace digdelv/ans4 with AsyncDnsServer
Configure the AsyncDnsServer to ignore all queries to ensure the same
behaviour as with "//" command for ans.pl.

(cherry picked from commit 648f2534b1)
2026-01-12 10:53:23 +00:00
Nicki Křížek
808e84d1b9 Remove unused digdelv/ans6 server
This server receives no queries during the test and doesn't affect the
test outcome.

(cherry picked from commit 3a6b977a92)
2026-01-12 10:53:23 +00:00
Štěpán Balážik
eb4c05f1c3 [9.20] chg: test: Avoid sending manually created responses in asyncserver
If at all possible, all the responses should be created by
AsyncDnsServer's internal methods. To ensure this, mark them with a
magic attribute and check it on send and crash the server if a manually
created response is detected.

Backport of MR !11420

Merge branch 'backport-stepan/avoid-using-hand-rolled-responses-in-asyncserver-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11445
2026-01-09 17:26:49 +00:00
Štěpán Balážik
d65174595d Avoid sending manually created responses in asyncserver
If at all possible, all the responses should be created by
AsyncDnsServer's internal methods. To ensure this, mark them with a
magic attribute and check it on send and crash the server if a manually
created response is detected.

Fix the qmin test server which uses `make_response`.

(cherry picked from commit 1fc206556b)
2026-01-09 15:23:58 +00:00
Nicki Křížek
3c5bc8f60c chg: doc: Set up version for BIND 9.20.19
Merge branch 'nicki/set-up-version-for-bind-9.20.19' into 'bind-9.20'

See merge request isc-projects/bind9!11440
2026-01-08 10:40:06 +01:00
Nicki Křížek
9557b381cb Update BIND version to 9.20.19-dev 2026-01-08 10:38:59 +01:00
Štěpán Balážik
6c14d1aa23 [9.20] chg: ci: Don't overwrite JUnit file generated by pytest in post-processing
When both input and output files are the same, it creates unnecesary
troubles in debugging issues with the JUnit files.

Keep the Pytest-generated file in the artifacts and output the checked
version as a new file.

Companion MR: https://gitlab.isc.org/isc-projects/bind9-qa/-/merge_requests/155

Backport of MR !11430

Merge branch 'backport-stepan/dont-overwrite-pytest-junit-xml-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11431
2026-01-07 18:20:23 +00:00
Štěpán Balážik
0609e48adb Don't overwrite JUnit files generated by the convert-trs-to-junit.py
It makes debugging easier.
2026-01-07 18:43:16 +01:00
Štěpán Balážik
26d45d655d Generate, check the JUnit reports for the doctest job
Pass it to GitLab for display.

(cherry picked from commit 0f2d0daabc)
2026-01-07 18:43:16 +01:00
Štěpán Balážik
596cdfb75d Don't overwrite JUnit file generated by pytest in post-processing
When both input and output files are the same, it creates unnecesary
troubles in debugging issues with the JUnit files.

Keep the Pytest-generated file in the artifacts and output the checked
version as a new file.

(cherry picked from commit 1a85a27f54)
2026-01-07 18:26:41 +01:00
Štěpán Balážik
5baddb2c23 Use git_clone_bind9-qa anchor in .system_test_common
This was missed in abecddb13a.

(cherry picked from commit af809329b3)
2026-01-07 18:26:41 +01:00
Štěpán Balážik
ba9b80de32 [9.20] chg: ci: Replace the check_for_junit_xml anchor with a Python script
~~Where applicable, use the more detailed CMocka generated JUnit
reports which include subtest results and timings instead of the
one generated by Meson.~~

Prerequisites:
- bind9-qa!137

~~Closes #5511~~

Partial backport of MR !11100

Merge branch 'backport-5511-cmocka-junit-ouput-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11433
2026-01-07 17:08:50 +00:00
Štěpán Balážik
e2d389b60a Replace check_for_junit_xml anchor with a Python script
This allows checking of multiple files with variable filenames rather
than insisting on harcoded `junit.xml`.

(cherry picked from commit abecddb13a)
2026-01-07 17:29:53 +01:00
Štěpán Balážik
ccc2008d1f Check the validity of cross-version-config-test's XML output
This was overlooked before.

(cherry picked from commit 5528ed7a5b)
2026-01-07 17:20:02 +01:00
Štěpán Balážik
e0aed1db4d Factor the cloning of the QA repo into an anchor
The unusual hyphen in the anchor name is used for symmetry with the
bind9-qa repo and directory name.

(cherry picked from commit c3f5db6dbc)
2026-01-07 17:19:06 +01:00
Nicki Křížek
bb9234c6ce [9.20] chg: dev: Support compilation with cmocka 2.0.0+
The `assert_in_range()` function was deprecated in favor of
`assert_int_in_range()` and `assert_uint_in_range()`. Add compatibility
shims for cmocka<2.0.0 and use the new functions.

Closes #5699

Backport of MR !11412

Merge branch 'backport-5699-support-cmocka-2.0.0-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11437
2026-01-07 13:09:19 +01:00
Nicki Křížek
0a09df0b7a Support compilation with cmocka 2.0.0+
The `assert_in_range()` function was deprecated in favor of
`assert_int_in_range()` and `assert_uint_in_range()`. Add compatibility
shims for cmocka<2.0.0 and use the new functions.

(cherry picked from commit 6843a4bd9a)
2026-01-07 11:17:42 +01:00
Michal Nowak
c967fa58c2 [9.20] new: ci: Add FreeBSD 15.0
Backport of MR !11320

Merge branch 'backport-mnowak/freebsd-15.0-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11435
2026-01-06 23:26:23 +01:00
Michal Nowak
e21d1086a8
Disable DoH on FreeBSD 15.0 2026-01-06 22:48:21 +01:00
Michal Nowak
c00d48cf60
Inline FreeBSD jobs from anchors
Although markup extraction to anchors makes FreeBSD jobs cleaner, it
prevents job customization, say, enabling or disabling a build option.

(cherry picked from commit 636a617f66)
2026-01-06 22:48:02 +01:00
Michal Nowak
d77b8be2b1
Add ans10 blackhole server to xfer system test
On FreeBSD 15.0, sending requests to non-existent address produces
unexpected results. Add a blackhole server instead.

(cherry picked from commit b4c0408d81)
2026-01-06 22:47:47 +01:00
Michal Nowak
0a55f28bc8
Add FreeBSD 15.0
(cherry picked from commit 282f87461b)
2026-01-06 22:47:09 +01:00
Nicki Křížek
04b4ff606d [9.20] [CVE-2025-8677] sec: test: Test that DNSSEC validation is aborted on malformed DNSKEY
Create a signed zone file that contains malformed ZSKs with colliding
key tags. The ZSKs don't represent valid ECDSA keys and will cause a
crypto failure when attempting to use them. Sign the zone with KSK, with
the exception of one record which is "signed" with the invalid ZSKs.

Check that the resolver aborts the DNSSEC verification after
encountering the first crypto failure, indicating malformed DNSKEY.

Closes #5343

Backport of MR !11425

Merge branch 'backport-5343-count-invalid-keys-into-validation-fails-test-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11427
2026-01-05 15:41:19 +01:00
Nicki Křížek
ccfe50a9b1 Test zone with truncated revoked DNSKEY
Ensure that named can handle a situation where the zone is signed with a
truncated, self-signed revoked DNSKEY. The signatures are inevitably
bogus and a SERVFAIL is expected. However, prior to CVE-2025-8677 fix,
this could trigger an assertion failure.

(cherry picked from commit 0ddfa108a7)
2026-01-05 15:02:51 +01:00
Nicki Křížek
024d67eca9 Test that DNSSEC validation is aborted on malformed DNSKEY
Create a signed zone file that contains malformed ZSKs with colliding
key tags. The ZSKs don't represent valid ECDSA keys and will cause a
crypto failure when attempting to use them. Sign the zone with KSK, with
the exception of one record which is "signed" with the invalid ZSKs.

Check that the resolver aborts the DNSSEC verification after
encountering the first crypto failure, indicating malformed DNSKEY.

(cherry picked from commit 1a2e46d364)
2026-01-05 15:02:51 +01:00
Štěpán Balážik
9e7ad999f4 [9.20] fix: test: Set default_aa on AsyncDnsServer to False by default
In !11179 I mistakenly set the default for `default_aa` for
`AsyncDnsServer()` to `True` and then explicitly set it to True in
cases where all the `ResponseHandlers` said
`yield DnsResponseSend(..., authoritative=True)` as if the default was
`False`.

Also the rest of `AsyncDnsServer` code (namely `_prepare_responses`)
reads like `default_aa` is `False` by default.

This accidentally changed the behavior of servers which don't set the
`default_aa` and where AA is not set from the zone data
(e.g. `dispatch/ans3`).

Backport of MR !11419

Merge branch 'backport-stepan/set-asyncdnsserver-dafault-aa-to-false-by-default-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11426
2026-01-05 13:46:17 +00:00
Štěpán Balážik
6e2fbe7081 Set default_aa on AsyncDnsServer to False by default
In 6e684d44 I mistakenly set the default for `default_aa` for
`AsyncDnsServer()` to `True` and then explicitly set it to True in
cases where all the `ResponseHandlers` said
`yield DnsResponseSend(..., authoritative=True)` as if the default was
`False`.

Also the rest of `AsyncDnsServer` code (namely `_prepare_responses`)
reads like `default_aa` is `False` by default.

This accidentally changed the behavior of servers which don't set the
`default_aa` and where AA is not set from the zone data
(e.g. `dispatch/ans3`).

(cherry picked from commit dc58c73264)
2026-01-05 13:05:08 +00:00
Ondřej Surý
40e46b5a1d [9.20] fix: nil: Fix building on uclibc
While building on uclibc this error is thrown:
In file included from ./include/dns/log.h:20,
                 from callbacks.c:19:
../../lib/isc/include/isc/log.h:141:9: error: unknown type name ‘off_t’
  141 |         off_t maximum_size;
      |         ^~~~~

This is due to missing include unistd.h, so let's add it on top of
isc/log.h

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Backport of MR !11422

Merge branch 'backport-fix/uclibc-off_t-main-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11423
2026-01-05 03:09:11 +01:00
Giulio Benetti
ad25f0c514 Fix building on uclibc
While building on uclibc this error is thrown:
In file included from ./include/dns/log.h:20,
                 from callbacks.c:19:
../../lib/isc/include/isc/log.h:141:9: error: unknown type name ‘off_t’
  141 |         off_t maximum_size;
      |         ^~~~~

This is due to missing include unistd.h, so let's add it on top of
isc/log.h

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
(cherry picked from commit 0e43f62c12)
2026-01-04 20:47:47 +00:00
Matthijs Mekking
51ad47975a [9.20] fix: test: Fix intermittent test failure in rollover-zsk-prepub
Revert the wait for log change for the rollover-zsk-prepub test.

Closes #5692

Backport of MR !11413

Merge branch 'backport-5692-rollover-zsk-prepub-step3-intermittent-test-fail-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11416
2026-01-02 08:54:36 +00:00
Matthijs Mekking
056d73dd08 Wait for "sending notifies" for step3.zsk-prepub
Commit c17ac42608 changed some tests to
wait for "zone_needdump" messages instead of "sending notifies", because
notifies are rate limited and "zone_needdump" happen on every change.

However, inspecting the logs, the "zone_needdump" changes happen more
than once (likely because the re-signing is done in batches):

    received control channel command 'sign step3.zsk-prepub.manual'
    zone_journal: zone step3.zsk-prepub.manual/IN (signed): enter
    zone_needdump: zone step3.zsk-prepub.manual/IN (signed): enter
    zone_journal: zone step3.zsk-prepub.manual/IN (signed): enter
    zone_needdump: zone step3.zsk-prepub.manual/IN (signed): enter
    zone_journal: zone step3.zsk-prepub.manual/IN (signed): enter
    zone_needdump: zone step3.zsk-prepub.manual/IN (signed): enter
    zone step3.zsk-prepub.manual/IN (signed): sending notifies

This means we are running the rollover step checks too fast in some
test runs.

Revert the wait for log change for the rollover-zsk-prepub test.

(cherry picked from commit 22c02a4df9)
2026-01-02 08:13:31 +00:00
Matthijs Mekking
4bdd934562 [9.20] chg: test: Update rollover system tests with chain of trust
Backport of MR !11309

Merge branch 'backport-matthijs-trust-chain-rollover-system-tests-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11399
2025-12-22 15:25:32 +00:00
Matthijs Mekking
705cfac99f Drop and replace CmdHelper with EnvCmd
A generic helper that calls environment-specified binaries has been added,
drop and replace the introduced CmdHelper for the more generic method.

(cherry picked from commit 594ff0816a)
2025-12-22 15:25:12 +00:00
Matthijs Mekking
ddd532ace0 rollover-zsk-prepub: From setup.sh to pytest bootstrap
Symlink ns1 and ns2 to rollover/ns1 and rollover/ns2.
Symlink ns3/template.db.j2.manual to rollover/ns3/template.db.j2.manual.

Since the bootstrapping is done before the templates are rendered
automatically, replace @DEFAULT_ALGORITHM@ in ns3/kasp.conf.j2 to
ecdsa256 and rename to ns3/kasp.conf.

(cherry picked from commit e172b4ff1a)
2025-12-22 15:25:12 +00:00
Matthijs Mekking
74ed63eb8d rollover-straight2none: From setup.sh to pytest bootstrap
Similar to rollover-going-insecure.

(cherry picked from commit da04c75cec)
2025-12-22 15:25:12 +00:00
Matthijs Mekking
e403f6dc2c rollover-lifetime: Update templates
This test does not require a trust chain. Merely update the template
zone files to not point to the common template.

(cherry picked from commit 0016791c91)
2025-12-22 15:25:12 +00:00
Matthijs Mekking
f814553696 rollover-multisigner: Update templates
This test does not require a trust chain. However, it does have a setup
script. Rewrite the setup shell script to a pytest bootstrap method.

(cherry picked from commit b6c091d113)
2025-12-22 15:25:12 +00:00
Matthijs Mekking
7b92adde63 rollover-ksk-3crowd: From setup.sh to pytest bootstrap
Similar to rollover-ksk-doubleksk.

(cherry picked from commit 4ed35f02b1)
2025-12-22 15:25:12 +00:00
Matthijs Mekking
f8ce10ea24 rollover-ksk-doubleksk: From setup.sh to pytest bootstrap
Symlink ns1 and ns2 to rollover/ns1 and rollover/ns2.
Symlink ns3/template.db.j2.manual to rollover/ns3/template.db.j2.manual.

Since the bootstrapping is done before the templates are rendered
automatically, replace @DEFAULT_ALGORITHM@ in ns3/kasp.conf.j2 to
ecdsa256 and rename to ns3/kasp.conf.

(cherry picked from commit 08236f4bd6)
2025-12-22 15:25:12 +00:00