]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 months agoAdd support for pytest>=9.0.0
Nicki Křížek [Tue, 16 Dec 2025 16:48:04 +0000 (17:48 +0100)] 
Add support for pytest>=9.0.0

Use collection_path rather than the deprecated path argument for
pytest_ignore_collect() hook.

The collection_path argument was added in pytest 7.0.0, which is the
minimum supported pytest version from now on.

3 months agoAdd requirements.txt for system tests
Nicki Křížek [Tue, 16 Dec 2025 17:27:20 +0000 (18:27 +0100)] 
Add requirements.txt for system tests

This file lists the required Python packages and versions for running
system tests. The easiest way to obtain them is:

    pip install -r requirements.txt

The minimum dnspython version is 2.7.0 because it supports TSIG parsing
without validation (for tsig/tests_tsig_hypothesis.py) and wire() (for
names/tests_names.py).

The minimum pytest version was bumped to 7.0.0 because it supports the
collection hook API required by pytest 9.

The minimum hypothesis version was set to 4.41.2 as prior versions might
have issues on FIPS systems.

3 months agoMerge tag 'v9.21.17'
Nicki Křížek [Wed, 21 Jan 2026 14:35:17 +0000 (14:35 +0000)] 
Merge tag 'v9.21.17'

3 months agofix: dev: Fix a bug in qpzone.c:first_existing_header_indirect()
Arаm Sаrgsyаn [Wed, 21 Jan 2026 10:47:31 +0000 (10:47 +0000)] 
fix: dev: Fix a bug in qpzone.c:first_existing_header_indirect()

There is a bug in qpzone.c:first_existing_header_indirect() where
it does not advance the pointer in the FOREACH type loop.

Remove the static function altogether, as it was used only once and
had some other problems too, and use simpler custom code instead in
the place where it was used.

Closes #5691

Merge branch '5691-qpzone.c-first_existing_header_indirect-fix' into 'main'

See merge request isc-projects/bind9!11460

3 months agoAdd a new dbversion unit test
Aram Sargsyan [Tue, 20 Jan 2026 16:20:35 +0000 (16:20 +0000)] 
Add a new dbversion unit test

Test that closing a writer with a rollback, then opening another
writer and adding a rdataset (while still holding the node reference)
works correctly.

This test checks that the bugfix in the previous commit is correct.

3 months agoRemove qpzone.c:first_existing_header_indirect() which had bugs
Aram Sargsyan [Fri, 16 Jan 2026 14:07:39 +0000 (14:07 +0000)] 
Remove qpzone.c:first_existing_header_indirect() which had bugs

The first_existing_header_indirect() static function is used only
in one place and it has bugs:

1. It doesn't advance the pointer and can cause an infinite loop
   if it doesn't break out from the loop on the first iteration.
2. It doesn't check if the header EXISTS, though its name indicates
   that it should.
3. Even if the infinite loop bug is fixed, it would eventually
   return the last checked header's pointer even if all the
   candidates do not match the criteria of the selection.

Instead of fixing it, remove the function and use simpler code in
the place where it was being called.

3 months agofix: test: Fix timing issues in nsec3/tests_nsec3_reconfig.py
Mark Andrews [Wed, 21 Jan 2026 10:25:58 +0000 (21:25 +1100)] 
fix: test: Fix timing issues in nsec3/tests_nsec3_reconfig.py

`ns3/nsec3-ent.kasp.db` is regenerated too fast resulting in
the subsequent `rndc reload` call failing.  This has been
fixed.

Closes #5707

Merge branch '5707-timing-issues-in-nsec3-tests_nsec3_reconfig-py' into 'main'

See merge request isc-projects/bind9!11467

3 months agoFix timing issues in nsec3/tests_nsec3_reconfig.py
Mark Andrews [Wed, 21 Jan 2026 05:01:57 +0000 (16:01 +1100)] 
Fix timing issues in nsec3/tests_nsec3_reconfig.py

ns3/nsec3-ent.kasp.db is regenerated too fast resulting in
the subsequent 'rndc reload' call failing.  This has been
fixed.

3 months agofix: dev: Use const pointer with strchr of const pointer
Mark Andrews [Tue, 20 Jan 2026 06:00:11 +0000 (17:00 +1100)] 
fix: dev: Use const pointer with strchr of const pointer

Closes #5694

Merge branch '5694-fedora-builds-with-werror' into 'main'

See merge request isc-projects/bind9!11394

3 months agoUse const pointer with strchr of const pointer
Mark Andrews [Fri, 19 Dec 2025 01:32:33 +0000 (12:32 +1100)] 
Use const pointer with strchr of const pointer

C23 now has qualifier preserving standard functions for strchr,
bsearch, strpbrk, strrchr, strstr, memchr.  There where a few places
where the return value was not assigned to a const qualified pointer.
These have been fixed.

3 months agochg: dev: remove `sigrdataset` from `dns_view_findzonecut()`
Colin Vidal [Fri, 16 Jan 2026 07:29:45 +0000 (08:29 +0100)] 
chg: dev: remove `sigrdataset` from `dns_view_findzonecut()`

Since the `sigrdataset` "output" parameter of `dns_view_findzonecut()` is never used (always called with NULL), it is now removed. As the resolver is moving towards a parent-centric direction, there is no point having a signature for the NS record (which is not authoritative in the parent, so never signed) when `dns_view_findzonecut()` is called.

Also, rename `dns_view_findzonecut()` as `dns_view_bestzonecut()` as it is used only in the context where the closest name servers for a name need to be queried and to avoid ambiguities with other code flows using `dns_db_findzonecut()`.

Merge branch 'colin/findzonecut-removesig' into 'main'

See merge request isc-projects/bind9!11444

3 months agorename `dns_view_findzonecut()` into `dns_view_bestzonecut()`
Colin Vidal [Mon, 12 Jan 2026 08:23:01 +0000 (09:23 +0100)] 
rename `dns_view_findzonecut()` into `dns_view_bestzonecut()`

`dns_view_findzonecut()` is used only in the context where the closest
name servers for a name need to be queried.  In the future, this API
will also return the glues (if known) for those name servers, as well
as (exclusively, if both NS and DELEG exist) the DELEG record.

To avoid ambiguities with other code flows using `dns_db_findzonecut()`,
`dns_view_findzonecut()` has been renamed into `dns_view_bestzonecut()`.

3 months agoremove `sigrdataset` from `dns_view_findzonecut()`
Colin Vidal [Fri, 9 Jan 2026 14:47:52 +0000 (15:47 +0100)] 
remove `sigrdataset` from `dns_view_findzonecut()`

Since the `sigrdataset` "output" parameter of `dns_view_findzonecut()`
is never used (always called with NULL), it is now removed.

Also, since the resolver is moving towards a parent-centric direction,
there is no point having a signature for the NS record (which is not
authoritative in the parent, so never signed) in the contextes where
`dns_view_findzonecut()` is called.

3 months agofix: test: Fix a false positive compiler warning/error
Arаm Sаrgsyаn [Thu, 15 Jan 2026 17:50:33 +0000 (17:50 +0000)] 
fix: test: Fix a false positive compiler warning/error

When built with '-Doptimization=1', GCC produces a compiler warning:

    In file included from ../lib/isc/include/isc/lib.h:44,
                     from ../tests/dns/qp_test.c:26:
    ../tests/dns/qp_test.c: In function ‘check_predecessors_withchain’:
    ../lib/isc/include/isc/util.h:182:33: error: ‘ival’ may be used uninitialized [-Werror=maybe-uninitialized]
      182 |         (((a) == (b)) ? (void)0 : (_assert_int_equal(a, b, f, l), abort()))
          |         ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/cmocka.h:1234:5: note: in expansion of macro ‘_assert_int_equal’
     1234 |     _assert_int_equal(cast_to_largest_integral_type(a), \
          |     ^~~~~~~~~~~~~~~~~
    ../tests/dns/qp_test.c:859:18: note: ‘ival’ was declared here
      859 |         uint32_t ival;
          |                  ^~~~

This is apparently a false positive, because the qpiter_prev_with_name()
function, when returning ISC_R_SUCCESS, sets the 'ival' (passed to
it by a pointer), and the caller checks that the return value is
ISC_R_SUCCESS before using 'ival'.

Initialize the 'ival' variable to 0 anyway to avoid the build error.

Closes #5704

Merge branch '5704-qp_test-uninitialized-false-positive-error-fix' into 'main'

See merge request isc-projects/bind9!11455

3 months agoFix a false positive compiler warning/error
Aram Sargsyan [Thu, 15 Jan 2026 11:26:47 +0000 (11:26 +0000)] 
Fix a false positive compiler warning/error

When built with '-Doptimization=1', GCC produces a compiler warning:

    In file included from ../lib/isc/include/isc/lib.h:44,
                     from ../tests/dns/qp_test.c:26:
    ../tests/dns/qp_test.c: In function ‘check_predecessors_withchain’:
    ../lib/isc/include/isc/util.h:182:33: error: ‘ival’ may be used uninitialized [-Werror=maybe-uninitialized]
      182 |         (((a) == (b)) ? (void)0 : (_assert_int_equal(a, b, f, l), abort()))
          |         ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/cmocka.h:1234:5: note: in expansion of macro ‘_assert_int_equal’
     1234 |     _assert_int_equal(cast_to_largest_integral_type(a), \
          |     ^~~~~~~~~~~~~~~~~
    ../tests/dns/qp_test.c:859:18: note: ‘ival’ was declared here
      859 |         uint32_t ival;
          |                  ^~~~

This is apparently a false positive, because the qpiter_prev_with_name()
function, when returning ISC_R_SUCCESS, sets the 'ival' (passed to
it by a pointer), and the caller checks that the return value is
ISC_R_SUCCESS before using 'ival'.

Initialize the 'ival' variable to 0 anyway to avoid the build error.

3 months agonew: ci: Add minimal:gcc:trixie:amd64 jobs
Michal Nowak [Thu, 15 Jan 2026 13:31:15 +0000 (14:31 +0100)] 
new: ci: Add minimal:gcc:trixie:amd64 jobs

Closes #5544

Closes #5560

Merge branch '5544-add-gcc-minimal-amd64-jobs' into 'main'

See merge request isc-projects/bind9!11072

3 months agoDo not run unwritable dump-file check as root
Michal Nowak [Thu, 9 Oct 2025 16:43:25 +0000 (18:43 +0200)] 
Do not run unwritable dump-file check as root

When run as root, the "chmod -w" command is not an effective guard
against rndc dumping the DB to file.

3 months agoAdd minimal:gcc:trixie:amd64 jobs
Michal Nowak [Wed, 8 Oct 2025 18:41:51 +0000 (20:41 +0200)] 
Add minimal:gcc:trixie:amd64 jobs

3 months agoFix forward ns4 when statistics-channels is disabled
Michal Nowak [Wed, 8 Oct 2025 18:13:58 +0000 (20:13 +0200)] 
Fix forward ns4 when statistics-channels is disabled

With statistics-channels disabled, ns4 fails to start with:

    option 'statistics-channels' was not enabled at compile time

3 months agofix: test: Portions of two dnssec-malformed-dnskey tests need querytrace
Michal Nowak [Thu, 15 Jan 2026 13:07:25 +0000 (14:07 +0100)] 
fix: test: Portions of two dnssec-malformed-dnskey tests need querytrace

Without querytrace set, test_malformed_ecdsa and test_multiple_rrsigs
fail on the log_validation_failed string.

Merge branch 'mnowak/dnssec-malformed-dnskey-needs-querytrace' into 'main'

See merge request isc-projects/bind9!11454

3 months agoPortions of two dnssec-malformed-dnskey tests need querytrace
Michal Nowak [Wed, 14 Jan 2026 18:27:47 +0000 (19:27 +0100)] 
Portions of two dnssec-malformed-dnskey tests need querytrace

Without querytrace set, test_malformed_ecdsa and test_multiple_rrsigs
fail on the log_validation_failed string.

4 months agochg: test: Use isctest.asyncserver in the "ixfr" test
Štěpán Balážik [Wed, 14 Jan 2026 12:21:31 +0000 (12:21 +0000)] 
chg: test: Use isctest.asyncserver in the "ixfr" test

Merge branch 'stepan/ixfr-asyncserver' into 'main'

See merge request isc-projects/bind9!11403

4 months agoUse isctest.asyncserver in the "ixfr" system test
Štěpán Balážik [Tue, 23 Dec 2025 13:41:18 +0000 (14:41 +0100)] 
Use isctest.asyncserver in the "ixfr" system test

Replace the usage of the `bin/tests/system/ans.pl` server with an
instance of ControllableAsyncServer.

4 months agoAdd SwitchControlCommand for ControllableAsyncServer
Štěpán Balážik [Tue, 23 Dec 2025 13:36:56 +0000 (14:36 +0100)] 
Add SwitchControlCommand for ControllableAsyncServer

To provide feature parity with `bin/tests/system/ans.pl` add a control
command to allow easy switching between different sequences of
ResponseHandlers.

4 months agoUse variadic positional parameters for plural install_* methods
Štěpán Balážik [Wed, 17 Dec 2025 13:08:03 +0000 (14:08 +0100)] 
Use variadic positional parameters for plural install_* methods

It saves an indent and brackets on the call sites.

Also sort the handlers alphabetically where their order doesn't matter
and split the fallback handlers into a separate call to signify that
their position in the end matters.

4 months agofix: usr: Make catalog zone names and member zones' entry names case-insensitive alessio/no-fast-soa-baseline
Arаm Sаrgsyаn [Mon, 12 Jan 2026 12:59:35 +0000 (12:59 +0000)] 
fix: usr: Make catalog zone names and member zones' entry names case-insensitive

Previously, the catalog zone names and their member zones' entry
names were unintentionally case-sensitive. This has been fixed.

Closes #5693

Merge branch '5693-catz-case-sensitivity-fix' into 'main'

See merge request isc-projects/bind9!11410

4 months agoTest that catalog zones' entry names are case-insensitive
Aram Sargsyan [Thu, 25 Dec 2025 12:27:37 +0000 (12:27 +0000)] 
Test that catalog zones' entry names are case-insensitive

4 months agoMake catalog zones' entry names case-insensitive
Aram Sargsyan [Thu, 25 Dec 2025 12:25:48 +0000 (12:25 +0000)] 
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.

4 months agoTest that catalog zone names are case-insensitive
Aram Sargsyan [Thu, 25 Dec 2025 11:39:54 +0000 (11:39 +0000)] 
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.

4 months agoMake catalog zone names case-insensitive
Aram Sargsyan [Fri, 19 Dec 2025 17:51:08 +0000 (17:51 +0000)] 
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.

4 months agochg: test: Replace digdelv ans.pl with AsyncDnsServer
Nicki Křížek [Mon, 12 Jan 2026 10:51:00 +0000 (11:51 +0100)] 
chg: test: Replace digdelv ans.pl with AsyncDnsServer

Rewrite ans servers in digdelv test to use AsyncDnsServer.

Merge branch 'nicki/asyncdnsserver-digdelv' into 'main'

See merge request isc-projects/bind9!11308

4 months agoRenumber ans7->ans6 and ans8->ans7 in digdelv test
Nicki Křížek [Wed, 7 Jan 2026 15:31:37 +0000 (16:31 +0100)] 
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.

4 months agoAdd dnspython>=2.0.0 requirement for digdelv
Nicki Křížek [Fri, 28 Nov 2025 15:49:08 +0000 (16:49 +0100)] 
Add dnspython>=2.0.0 requirement for digdelv

Now that the test uses AsyncDnsServer, require the appropriate dnspython
version for the test.

4 months agoReplace digdelv/ans8 with AsyncDnsServer
Nicki Křížek [Fri, 28 Nov 2025 15:41:44 +0000 (16:41 +0100)] 
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.

4 months agoReplace digdelv/ans5 with ControllableAsyncDnsServer
Nicki Křížek [Fri, 28 Nov 2025 15:13:43 +0000 (16:13 +0100)] 
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.

4 months agoRename ResponseDropAndCloseConnection action
Nicki Křížek [Fri, 28 Nov 2025 14:34:38 +0000 (15:34 +0100)] 
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.

4 months agoReplace digdelv/ans7 with AsyncDnsServer
Nicki Křížek [Fri, 28 Nov 2025 10:19:24 +0000 (11:19 +0100)] 
Replace digdelv/ans7 with AsyncDnsServer

ans7 server always replies with an UPDATE opcode in the message.

4 months agoReplace digdelv/ans4 with AsyncDnsServer
Nicki Křížek [Thu, 27 Nov 2025 17:12:55 +0000 (18:12 +0100)] 
Replace digdelv/ans4 with AsyncDnsServer

Configure the AsyncDnsServer to ignore all queries to ensure the same
behaviour as with "//" command for ans.pl.

4 months agoRemove unused digdelv/ans6 server
Nicki Křížek [Thu, 27 Nov 2025 16:48:16 +0000 (17:48 +0100)] 
Remove unused digdelv/ans6 server

This server receives no queries during the test and doesn't affect the
test outcome.

4 months agochg: test: Avoid sending manually created responses in asyncserver
Štěpán Balážik [Fri, 9 Jan 2026 15:22:31 +0000 (15:22 +0000)] 
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.

Merge branch 'stepan/avoid-using-hand-rolled-responses-in-asyncserver' into 'main'

See merge request isc-projects/bind9!11420

4 months agoAvoid sending manually created responses in asyncserver
Štěpán Balážik [Fri, 2 Jan 2026 19:36:29 +0000 (20:36 +0100)] 
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`.

4 months agoUpdate BIND version for release v9.21.17
Nicki Křížek [Fri, 9 Jan 2026 13:24:57 +0000 (14:24 +0100)] 
Update BIND version for release

4 months agonew: doc: Prepare documentation for BIND 9.21.17
Nicki Křížek [Fri, 9 Jan 2026 13:23:24 +0000 (14:23 +0100)] 
new: doc: Prepare documentation for BIND 9.21.17

Merge branch 'nicki/prepare-documentation-for-bind-9.21.17' into 'v9.21.17-release'

See merge request isc-private/bind9!898

4 months agoTweak and reword release notes
Nicki Křížek [Thu, 8 Jan 2026 13:21:55 +0000 (14:21 +0100)] 
Tweak and reword release notes

4 months agoMove release note for EDE 13 to proper section
Nicki Křížek [Thu, 8 Jan 2026 13:17:44 +0000 (14:17 +0100)] 
Move release note for EDE 13 to proper section

4 months agoRemove release note for GL #5671
Nicki Křížek [Fri, 9 Jan 2026 09:54:54 +0000 (10:54 +0100)] 
Remove release note for GL #5671

This was already fixed in the previous release.

4 months agoRemove release note for GL #5675
Nicki Křížek [Thu, 8 Jan 2026 12:32:18 +0000 (13:32 +0100)] 
Remove release note for GL #5675

It is sufficient to leave this as a changelog entry.

4 months agoPrepare release notes for BIND 9.21.17
Nicki Křížek [Thu, 8 Jan 2026 12:30:34 +0000 (13:30 +0100)] 
Prepare release notes for BIND 9.21.17

4 months agochg: dev: Split and refactor dns_view_findzonecut()
Colin Vidal [Thu, 8 Jan 2026 20:01:22 +0000 (21:01 +0100)] 
chg: dev: Split and refactor dns_view_findzonecut()

The function `dns_view_findzonecut()` was previously a complex bit of code (multiple pages long with multiple gotos and mutating states) into a simpler main entry point making explicit the various steps and layers involved into the delegation lookup.

Separate helper functions are added for specific sub-tasks (lookup from the zones, from the cache, deciding which result to use if there are valid candidates from the zone or cache, etc.)

Finally, the range of result values returned by `dns_view_findzonecut()` is simplified and clearly specified. This simplifies a bit the callers code.

See #5681

Merge branch 'colin/refactor-findzonecut' into 'main'

See merge request isc-projects/bind9!11377

4 months agosimplify usage of dns_view_findzonecut()
Colin Vidal [Wed, 17 Dec 2025 14:27:39 +0000 (15:27 +0100)] 
simplify usage of dns_view_findzonecut()

As `dns_view_findzonecut()` only returns either ISC_R_SUCCESS or
DNS_R_NXDOMAIN, and since it automatically disassociates the rdatasets
in case of failure, some call sites are simplified.

4 months agofindzonecut: helper function to choose zone or cache
Colin Vidal [Tue, 16 Dec 2025 13:24:41 +0000 (14:24 +0100)] 
findzonecut: helper function to choose zone or cache

When a delegation is found at a zone level, the cache is also looked up,
in case a more specific delegation is found. If it is, then the records
from the zone are disassociated and then associated with those from the
cache.

There is no return value, because even if the cache lookup fails, there
is a valid delegation from the zone, so this is a success either way.

The main function `dns_view_findzonecut()` is also strongly refactored,
as `findzonecut_zoneorcache()` allows a sequential flow between the
various DB lookup attempts, instead of jumping back to the begining of
the lookup code using `goto`.

From the caller's point of view, the API is slightly simplified: the
return value can only be ISC_R_SUCCESS (a delegation is found) or
DNS_R_NXDOMAIN (no delegation is found). Also, if no delegation is
found, this guarantees that the rdatasets passed as parameter are
disassociated.

4 months agofindzonecut: helper function for zone lookup
Colin Vidal [Tue, 16 Dec 2025 13:26:11 +0000 (14:26 +0100)] 
findzonecut: helper function for zone lookup

Move the zone lookup code into a separate helper function.

The main extra change here is the return codes. This helper function can
return 3 (and only those 3) values:

- ISC_R_SUCCESS: a delegation is found
- DNS_R_NXDOMAIN: no zone matches the qname
- ISC_R_NOTFOUND: a zone is found, but no delegation in the zone (this
  can be either because there is simply no delegation, or for other
  reasons, like, the zone DB is not loaded yet).

This enables the caller to make decisions about whether to attempt a
cache and/or hints lookup or not.

4 months agofindzonecut: helper function for cache lookup
Colin Vidal [Tue, 16 Dec 2025 13:22:10 +0000 (14:22 +0100)] 
findzonecut: helper function for cache lookup

Extract the cache lookup implementation from `dns_view_findzonecut()`
into a separate helper function.

Also, when the cache result is not ISC_R_SUCCESS (which is the only
"success" value from the existing code in this case), the return value
is overriden to DNS_R_NXDOMAIN. This enables the caller (in follow-up
commit) to differentiate the case where a zone is found, but for
whatever reason, no delegation is in there, from the case where no zone
is found. Separating those cases enables the caller to know whether it
needs to hit the cache/hints or not.

4 months agofindzonecut: helper function for hints lookup
Colin Vidal [Tue, 16 Dec 2025 13:20:32 +0000 (14:20 +0100)] 
findzonecut: helper function for hints lookup

Extract `view_dns_findzonecut()` hints lookup parts in a separate
helper function.

4 months agochg: dev: Remove rrset-order cyclic from the default config, with shim
Alessio Podda [Thu, 8 Jan 2026 15:32:23 +0000 (15:32 +0000)] 
chg: dev: Remove rrset-order cyclic from the default config, with shim

Currently we add an rrset-order cyclic statement to the default config.
Since the rrset-order allows matching a subset of all names, it must
be implemented with a comparison against a wildcard, and since
the statement applies per rrset, this can result in million of
comparisons per second on a busy authoritative server.

This commit removes rrset-order from the default config, but adds back
a code shim in query_setorder to preserve the previous behaviour.

Merge branch 'alessio/dont-set-order' into 'main'

See merge request isc-projects/bind9!11417

4 months agoRemove rrset-order cyclic from the default config, with shim
Alessio Podda [Tue, 23 Dec 2025 15:38:53 +0000 (16:38 +0100)] 
Remove rrset-order cyclic from the default config, with shim

Currently we add an rrset-order cyclic statement to the default config.
Since the rrset-order allows matching a subset of all names, it must
be implemented with a string comparison against a wildcard, and since
the statement applies per rrset, this can result in millions of
comparisons per second on a busy authoritative server.

This commit removes rrset-order from the default config, but adds back
a code shim in query_setorder to preserve the previous behaviour.

4 months agoGenerate changelog for BIND 9.21.17
Nicki Křížek [Thu, 8 Jan 2026 12:28:40 +0000 (13:28 +0100)] 
Generate changelog for BIND 9.21.17

4 months ago[CVE-2025-13878] sec: usr: Fix incorrect length checks for BRID and HHIT records
Nicki Křížek [Thu, 8 Jan 2026 11:32:38 +0000 (12:32 +0100)] 
[CVE-2025-13878] sec: usr: Fix incorrect length checks for BRID and HHIT records

Malformed BRID and HHIT records could trigger an assertion failure. This has been fixed.

ISC would like to thank Vlatko Kosturjak from Marlink Cyber for bringing
this vulnerability to our attention.

Closes isc-projects/bind9#5616

Merge branch '5616-confidential-brid-hhit-towire' into 'v9.21.17-release'

See merge request isc-private/bind9!876

4 months agoFix incorrect length checks for BRID and HHIT records
Mark Andrews [Sat, 1 Nov 2025 08:47:49 +0000 (04:47 -0400)] 
Fix incorrect length checks for BRID and HHIT records

Fix incorrect length checks in the towire_*() methods for BRID and HHIT
records to prevent assertion failures when trying to serve short
records.

4 months agochg: doc: Set up version for BIND 9.21.18
Nicki Křížek [Thu, 8 Jan 2026 09:38:43 +0000 (10:38 +0100)] 
chg: doc: Set up version for BIND 9.21.18

Merge branch 'nicki/set-up-version-for-bind-9.21.18' into 'main'

See merge request isc-projects/bind9!11439

4 months agoUpdate BIND version to 9.21.18-dev
Nicki Křížek [Thu, 8 Jan 2026 09:34:57 +0000 (10:34 +0100)] 
Update BIND version to 9.21.18-dev

4 months agochg: dev: Support compilation with cmocka 2.0.0+
Nicki Křížek [Wed, 7 Jan 2026 10:12:50 +0000 (11:12 +0100)] 
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

Merge branch '5699-support-cmocka-2.0.0' into 'main'

See merge request isc-projects/bind9!11412

4 months agoSupport compilation with cmocka 2.0.0+
Nicki Křížek [Mon, 29 Dec 2025 12:37:34 +0000 (13:37 +0100)] 
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.

4 months agochg: usr: Enforce bounds of multiple configuration options
Evan Hunt [Wed, 7 Jan 2026 07:02:22 +0000 (07:02 +0000)] 
chg: usr: Enforce bounds of multiple configuration options

The configuration options `edns-version`, `edns-udp-size`,
`max-udp-size`, `no-cookie-udp-size` and `padding` now enforce
boundaries. The configuration (including when using `named-checkconf`)
now fails if those options are set out of range.

Merge branch 'colin/multiple-options-strict-boundaries' into 'main'

See merge request isc-projects/bind9!11248

4 months agoupdate doc for strict boundaries check
Colin Vidal [Wed, 19 Nov 2025 11:34:31 +0000 (12:34 +0100)] 
update doc for strict boundaries check

Update documentation, removing the mention of statements being
implicitely "fixed" if they are defined out of range (for
`edns-version`, `edns-udp-size`, `max-udp-size`, `no-cookie-udp-size`
and `padding`) as the ranges are now enforced.

4 months agoadd strict bound check tests
Colin Vidal [Wed, 19 Nov 2025 11:33:52 +0000 (12:33 +0100)] 
add strict bound check tests

Add checkconf system test covering the strict boundary checks for
`edns-version`, `edns-udp-size`, `max-udp-size`, `no-cookie-udp-size`
and `padding`.

4 months agoremove implicit bounds fixes in server config
Colin Vidal [Wed, 19 Nov 2025 11:36:13 +0000 (12:36 +0100)] 
remove implicit bounds fixes in server config

Now that the configuration options `edns-version`, `edns-udp-size`,
`max-udp-size`, `no-cookie-udp-size` and `padding` have strict boundaries
(configuration failing if they are not respected), remove configuration
loading code which implicitely raises or lowers them.

4 months agosmall refactor for `max-query-restart` in `check.c`
Colin Vidal [Wed, 19 Nov 2025 11:32:09 +0000 (12:32 +0100)] 
small refactor for `max-query-restart` in `check.c`

Use the `check_range_uint32()` function in `check.c` to test the
boundaries of `max-query-restart` instead of custom code.

4 months agoenforce bounds of multiple configuration options
Colin Vidal [Wed, 19 Nov 2025 11:31:50 +0000 (12:31 +0100)] 
enforce bounds of multiple configuration options

The configuration options `edns-version`, `edns-udp-size`,
`max-udp-size`, `no-cookie-udp-size` and `padding` now enforce
boundaries. The configuration (including when using `named-checkconf`)
now fails if those options are out of range.

4 months agonew: ci: Add FreeBSD 15.0
Michal Nowak [Tue, 6 Jan 2026 21:43:52 +0000 (22:43 +0100)] 
new: ci: Add FreeBSD 15.0

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

See merge request isc-projects/bind9!11320

4 months agoInline FreeBSD jobs from anchors
Michal Nowak [Thu, 18 Dec 2025 11:02:45 +0000 (12:02 +0100)] 
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.

4 months agoAdd ans10 blackhole server to xfer system test
Michal Nowak [Fri, 12 Dec 2025 13:51:32 +0000 (14:51 +0100)] 
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.

4 months agoAdd FreeBSD 15.0
Michal Nowak [Thu, 4 Dec 2025 09:13:48 +0000 (10:13 +0100)] 
Add FreeBSD 15.0

4 months agochg: ci: Don't overwrite JUnit file generated by pytest in post-processing
Štěpán Balážik [Tue, 6 Jan 2026 16:49:16 +0000 (16:49 +0000)] 
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

Merge branch 'stepan/dont-overwrite-pytest-junit-xml' into 'main'

See merge request isc-projects/bind9!11430

4 months agoGenerate, check the JUnit reports for the doctest job
Štěpán Balážik [Tue, 6 Jan 2026 15:42:34 +0000 (16:42 +0100)] 
Generate, check the JUnit reports for the doctest job

Pass it to GitLab for display.

4 months agoDon't overwrite JUnit file generated by pytest in post-processing
Štěpán Balážik [Tue, 6 Jan 2026 11:03:04 +0000 (12:03 +0100)] 
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.

4 months agoUse git_clone_bind9-qa anchor in .system_test_common
Štěpán Balážik [Tue, 6 Jan 2026 14:12:25 +0000 (15:12 +0100)] 
Use git_clone_bind9-qa anchor in .system_test_common

This was missed in abecddb13afa3f8ad9611f1241a635fbe6b90818.

4 months ago[CVE-2025-8677] sec: test: Test that DNSSEC validation is aborted on malformed DNSKEY
Nicki Křížek [Mon, 5 Jan 2026 13:45:06 +0000 (14:45 +0100)] 
[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

Merge branch '5343-count-invalid-keys-into-validation-fails-test' into 'main'

See merge request isc-projects/bind9!11425

4 months agoTest zone with truncated revoked DNSKEY
Nicki Křížek [Mon, 13 Oct 2025 16:35:33 +0000 (18:35 +0200)] 
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.

4 months agoTest that DNSSEC validation is aborted on malformed DNSKEY
Nicki Křížek [Thu, 11 Sep 2025 12:27:34 +0000 (14:27 +0200)] 
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.

4 months agofix: test: Set default_aa on AsyncDnsServer to False by default
Štěpán Balážik [Mon, 5 Jan 2026 13:03:11 +0000 (13:03 +0000)] 
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`).

Merge branch 'stepan/set-asyncdnsserver-dafault-aa-to-false-by-default' into 'main'

See merge request isc-projects/bind9!11419

4 months agoSet default_aa on AsyncDnsServer to False by default
Štěpán Balážik [Fri, 2 Jan 2026 18:05:33 +0000 (19:05 +0100)] 
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`).

4 months agofix: nil: Fix building on uclibc
Ondřej Surý [Sun, 4 Jan 2026 20:46:05 +0000 (21:46 +0100)] 
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>
Merge branch 'fix/uclibc-off_t-main' into 'main'

See merge request isc-projects/bind9!11422

4 months agoFix building on uclibc
Giulio Benetti [Sat, 3 Jan 2026 21:59:39 +0000 (22:59 +0100)] 
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>
4 months agofix: nil: Fix Coverity issue 640332/640331
Matthijs Mekking [Fri, 2 Jan 2026 08:52:49 +0000 (08:52 +0000)] 
fix: nil: Fix Coverity issue 640332/640331

Merge branch 'matthijs-cid-640332' into 'main'

See merge request isc-projects/bind9!11414

4 months agoFix Coverity issue 640332/640331
Matthijs Mekking [Wed, 31 Dec 2025 12:57:58 +0000 (13:57 +0100)] 
Fix Coverity issue 640332/640331

The `notifytype = cfg_obj_asboolean(obj);` was left in place
erroneously in commit 52c940551db23ac1613d1a0905f06ac65ec9200e.

See https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/11384#note_628991
for background discussion.

4 months agofix: test: Fix intermittent test failure in rollover-zsk-prepub
Matthijs Mekking [Fri, 2 Jan 2026 08:10:40 +0000 (08:10 +0000)] 
fix: test: Fix intermittent test failure in rollover-zsk-prepub

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

Closes #5692

Merge branch '5692-rollover-zsk-prepub-step3-intermittent-test-fail' into 'main'

See merge request isc-projects/bind9!11413

4 months agoWait for "sending notifies" for step3.zsk-prepub
Matthijs Mekking [Wed, 31 Dec 2025 10:40:42 +0000 (11:40 +0100)] 
Wait for "sending notifies" for step3.zsk-prepub

Commit c17ac426082b2eca802dd1b2e1bb9b4b4b291199 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.

4 months agochg: nil: change notify-cds to notify-cfg CDS
Matthijs Mekking [Mon, 29 Dec 2025 09:41:43 +0000 (09:41 +0000)] 
chg: nil: change notify-cds to notify-cfg CDS

Change the notify configuration to be more flexible for other types of generalized DNS notifications.

Also allow for notify-cfg SOA.

Merge branch 'matthijs-notify-cfg' into 'main'

See merge request isc-projects/bind9!11384

4 months agoChange notify-cds option to notify-cfg CDS
Matthijs Mekking [Wed, 17 Dec 2025 08:51:03 +0000 (09:51 +0100)] 
Change notify-cds option to notify-cfg CDS

Change the notify configuration to be more flexible for other types
of generalized DNS notifications.

Also allow for notify-cfg SOA.

4 months agoChange zone set/get options related to notify
Matthijs Mekking [Tue, 16 Dec 2025 16:31:24 +0000 (17:31 +0100)] 
Change zone set/get options related to notify

Add a type to all dns_zone_(get|set) functions that apply to sending
notifies, so the options can be set and retrieved separately per type.

This affects dns_zone_setnotifydefer, dns_zone_getnotifydefer,
dns_zone_setnotifydelay, dns_zone_getnotifydelay,
dns_zone_setnotifysrc4, and dns_zone_setnotifysrc6.

The functions dns_zone_getnotifysrc4 and dns_zone_getnotifysrc6 are
unused and can be removed.

4 months agochg: doc: Clarify rndc sign
Matthijs Mekking [Mon, 22 Dec 2025 14:09:06 +0000 (14:09 +0000)] 
chg: doc: Clarify rndc sign

It was not explicitly clear that ``rndc sign`` replaces signatures of inactive keys and updates signatures that are not so fresh.

Closes #5490

Merge branch '5490-clear-rndc-sign-on-error' into 'main'

See merge request isc-projects/bind9!11396

4 months agoClarify rndc sign
Matthijs Mekking [Tue, 26 Aug 2025 11:58:59 +0000 (13:58 +0200)] 
Clarify rndc sign

It was not explicitly clear that 'rndc sign' replaces signatures of
inactive keys and updates signatures that are not so fresh.

4 months ago[CVE-2025-40778] sec: test: Add various bailiwick-related tests
Michał Kępień [Mon, 22 Dec 2025 11:44:38 +0000 (12:44 +0100)] 
[CVE-2025-40778] sec: test: Add various bailiwick-related tests

Closes #5414

Merge branch '5414-add-various-bailiwick-related-tests' into 'main'

See merge request isc-projects/bind9!11406

4 months agoTest that spoofed DNAME is not accepted via spoofable transport
Petr Špaček [Mon, 28 Jul 2025 09:33:14 +0000 (11:33 +0200)] 
Test that spoofed DNAME is not accepted via spoofable transport

A single spoofed DNAME answer can impact many names, and because of the
nature of DNAME, the attacker can use randomized query names to get
unlimited number of tries to spoof the answer.  To limit impact, we
should not be accepting DNAME over insecure transport, like UDP without
cookies etc.

In short, the attacker tries to spoof at least one answer that has the
following form:

    opcode QUERY
    rcode NOERROR
    flags QR AA
    ;QUESTION
    trigger$RANDOM.test. IN A
    ;ANSWER
    trigger$RANDOM.test. 3600 IN CNAME trigger$RANDOM.attacker.net.
    test. 3600 IN DNAME attacker.net.
    ;AUTHORITY
    ;ADDITIONAL

This has been discovered internally.

Co-authored-by: Michał Kępień <michal@isc.org>
4 months agoTest that fake child delegation cannot overwrite parent's glue RR
Petr Špaček [Wed, 23 Jul 2025 18:26:43 +0000 (20:26 +0200)] 
Test that fake child delegation cannot overwrite parent's glue RR

In short, the attacker tries to spoof at least one answer that has the
following form:

    rcode NOERROR
    flags QR
    ;QUESTION
    trigger$RANDOM.victim. IN TXT
    ;ANSWER
    ;AUTHORITY
    trigger$RANDOM.victim. 3600 IN NS ns.victim.
    ;ADDITIONAL
    ns.victim. 3600 IN A 10.53.0.3

This attack was originally reported as "test case 2".

Co-authored-by: Michał Kępień <michal@isc.org>
4 months agoTest that unsolicited NS in positive answer cannot overwrite current NS
Petr Špaček [Wed, 23 Jul 2025 15:25:18 +0000 (17:25 +0200)] 
Test that unsolicited NS in positive answer cannot overwrite current NS

Before the fixes for CVE-2025-40778, an unsolicited in-bailiwick NS
record was accepted from a (spoofed) answer, enabling a single spoofed A
query/response to redirect traffic for a whole delegation.

In short, the attacker tries to spoof at least one answer that has the
following form:

    rcode NOERROR
    flags QR AA
    ;QUESTION
    trigger$RANDOM.victim. IN TXT
    ;ANSWER
    trigger$RANDOM.victim. 3600 IN TXT "spoofed answer with extra NS"
    ;AUTHORITY
    victim. 3600 IN NS ns.attacker.
    ;ADDITIONAL

This attack was originally reported as "test case 1".

Co-authored-by: Michał Kępień <michal@isc.org>
4 months agoTest that positive answer cannot overwrite sibling NS RRs
Petr Špaček [Fri, 11 Jul 2025 16:37:57 +0000 (18:37 +0200)] 
Test that positive answer cannot overwrite sibling NS RRs

Before the fixes for CVE-2025-40778, a positive answer was allowed to
overwrite sibling NS RRs.  The answer had to be a positive AA=1 answer
with a fake NS along with it.  This combination of conditions avoided
the code path with "unrelated <RRTYPE>" detection logic.

If it were some other answer, named from the main branch would detect
the attempt and log:

    DNS format error from 10.53.0.1#16386 resolving trigger/A for <unknown>: unrelated NS victim in trigger authority section

In short, the attacker tries to spoof at least one answer that has the
following form:

    opcode QUERY
    rcode NOERROR
    flags QR AA
    ;QUESTION
    trigger$RANDOM. IN A
    ;ANSWER
    trigger$RANDOM. 3600 IN A 10.53.0.3
    ;AUTHORITY
    victim. 3600 IN NS ns.attacker.
    ;ADDITIONAL
    ns.attacker. 3600 IN A 10.53.0.3

This attack was originally reported as "test case 1c".

Co-authored-by: Michał Kępień <michal@isc.org>
4 months agoAdd a common base for CVE-2025-40778 tests
Petr Špaček [Fri, 11 Jul 2025 16:37:57 +0000 (18:37 +0200)] 
Add a common base for CVE-2025-40778 tests

Add the zone files, configuration, and code that will be reused by all
tests related to CVE-2025-40778.

Co-authored-by: Michał Kępień <michal@isc.org>
4 months agoAdd a reusable, bare-bones AsyncDnsServer
Michał Kępień [Mon, 22 Dec 2025 10:58:39 +0000 (11:58 +0100)] 
Add a reusable, bare-bones AsyncDnsServer

Add bin/tests/system/ans.py, a bare-bones DNS server that can be used in
system tests instead of full-blown named instances when a server is only
required to return zone-based data.  Where applicable, this reduces load
on the test host and the amount of generated logs.