]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
5 hours agochg: dev: Do not attach authdb main
Alessio Podda [Fri, 17 Jul 2026 13:07:57 +0000 (13:07 +0000)] 
chg: dev: Do not attach authdb

The authdb variable is used either to check that, on restarts, we
do not cross to a different zone unless recursion is enabled, and to
lookup the zone version when filling the additional section.

Neither use requires the pointer to be attached, and attaching the
pointer causes scalability issues. This commit solves the problem by
turning the pointer into an integer id.

Merge branch 'alessio/authdb-version-lookup' into 'main'

See merge request isc-projects/bind9!12375

7 hours agoFix mirror zone auth issues 12375/head
Alessio Podda [Mon, 13 Jul 2026 15:32:28 +0000 (17:32 +0200)] 
Fix mirror zone auth issues

Previously query_validatezonedb would not save the current version of
mirror zones, which would cause the mirror zone not to be found when
non-glue additional data.

We fix this by storing the mirror zone version in the client, and
deferring the acl check in query_validatezonedb.

7 hours agoAdd test for mirror zone additional data
Alessio Podda [Thu, 9 Jul 2026 12:26:46 +0000 (14:26 +0200)] 
Add test for mirror zone additional data

Existing mirror-zone system tests only covered referral glue.
With this commit, we add a test that also checks for non-glue
additional data.

7 hours agoMake authdb version lookup return isc_result_t
Alessio Podda [Thu, 9 Jul 2026 11:58:10 +0000 (13:58 +0200)] 
Make authdb version lookup return isc_result_t

Returning isc_result_t is more idiomatic. Also, there was some shared
code between ns_client_findversionid and ns_client_findversion that
has now been extracted into an helper function.

7 hours agoTurn authdb into a enum
Alessio Podda [Mon, 6 Jul 2026 08:26:31 +0000 (10:26 +0200)] 
Turn authdb into a enum

Given that now authdb is now an integer id, we can fold the authdb
variable into it by turning it into a sentinel value.

7 hours agoDo not attach authdb
Alessio Podda [Mon, 6 Jul 2026 08:15:13 +0000 (10:15 +0200)] 
Do not attach authdb

The authdb variable is used either to check that, on restarts, we
do not cross to a different zone unless recursion is enabled, and to
lookup the zone version when filling the additional section.

Neither use requires the pointer to be attached, and attaching the
pointer causes scalability issues. This commit solves the problem by
turning the pointer into an integer id.

22 hours agofix: usr: Unterminated OpenSSL private-key `Label:` field can be read past its parser...
Mark Andrews [Thu, 16 Jul 2026 20:07:48 +0000 (06:07 +1000)] 
fix: usr: Unterminated OpenSSL private-key `Label:` field can be read past its parser buffer

Check that the string encoded in the Label: field of the .private
file of a key pair is NUL terminated and the correct length.  Reject
the .private file if it is not.

Closes #6193

Merge branch '6193-check-that-label-is-nul-terminated' into 'main'

See merge request isc-projects/bind9!12364

23 hours agoMalformed Label: data in .private files was not detected 12364/head
Mark Andrews [Wed, 8 Jul 2026 01:18:44 +0000 (11:18 +1000)] 
Malformed Label: data in .private files was not detected

Check that the string encoded in the Label: field of the .private
file of a key pair is NUL terminated and the correct length.  Reject
the .private file if it is not.

43 hours agofix: nil: Extend meson.build to support python 3.13 and 3.14
Mark Andrews [Wed, 15 Jul 2026 23:36:30 +0000 (09:36 +1000)] 
fix: nil: Extend meson.build to support python 3.13 and 3.14

The later releases of python are not supported by meson.build
requiring the built environment to maintain / install older
versions of python to be able build and test.

Merge branch 'marka-support-python-3.14' into 'main'

See merge request isc-projects/bind9!12389

43 hours agoExtend meson.build to know about python 3.13 and 3.14 12389/head
Mark Andrews [Mon, 13 Jul 2026 07:00:40 +0000 (17:00 +1000)] 
Extend meson.build to know about python 3.13 and 3.14

2 days agofix: dev: Fix TSIG keys creation/eviction ordering issue
Arаm Sаrgsyаn [Wed, 15 Jul 2026 15:02:23 +0000 (15:02 +0000)] 
fix: dev: Fix TSIG keys creation/eviction ordering issue

When adding a new key into a full list, the newly inserted key
could be evicted just after the insertion if all the existing
keys were marked as visited. This has been fixed.

Closes #6263

Merge branch '6263-tkey-quota-bug-fix' into 'main'

See merge request isc-projects/bind9!12400

2 days agoFix TSIG keys creation/eviction bug 12400/head
Aram Sargsyan [Tue, 14 Jul 2026 11:26:50 +0000 (11:26 +0000)] 
Fix TSIG keys creation/eviction bug

When adding a new key to the SIEVE list, make the eviction decision
first, and then add the new key, so that it doesn't get evicted
immediately after insertion.

2 days agoAdd a new check in the tsig unit test
Aram Sargsyan [Tue, 14 Jul 2026 11:25:09 +0000 (11:25 +0000)] 
Add a new check in the tsig unit test

The new check creates more TSIG keys than the maximum allowed number,
and expectes that all the newly created keys are findable just after
they were created. I.e., when full, the newly created key should not
evicted.

2 days agofix: test: Increase timeout for zone update in multisigner test
Nicki Křížek [Wed, 15 Jul 2026 14:43:27 +0000 (16:43 +0200)] 
fix: test: Increase timeout for zone update in multisigner test

In slower platforms in CI (e.g. freebsd14), the 10s timeout could be too
short causing the test to fail. Increase it to make the test stable even
during heavy CI load.

---

failing job example: https://gitlab.isc.org/isc-private/bind9/-/jobs/7762354

Merge branch 'nicki/pytest-multisigner-increase-timeout' into 'main'

See merge request isc-projects/bind9!12373

2 days agoIncrease timeout for zone update in multisigner test 12373/head
Nicki Křížek [Thu, 9 Jul 2026 08:16:40 +0000 (10:16 +0200)] 
Increase timeout for zone update in multisigner test

In slower platforms in CI (e.g. freebsd14), the 10s timeout could be too
short causing the test to fail. Increase it to make the test stable even
during heavy CI load.

2 days agofix: test: Extend the check_dnssec_verify retry window to 60 seconds
Nicki Křížek [Wed, 15 Jul 2026 10:48:18 +0000 (12:48 +0200)] 
fix: test: Extend the check_dnssec_verify retry window to 60 seconds

A fixed ten-iteration poll could be too short for a freshly signed
zone to become fully valid on a heavily loaded host, occasionally
yielding a spurious "zone not verified".

Bump the budget to a 60-second window and, in the process, replace the
hand-rolled retry loop with the standard isctest.run.retry_with_timeout
helper already used by check_next_key_event.

---

Example of the failure: https://gitlab.isc.org/isc-private/bind9/-/jobs/7773885

Merge branch 'nicki/widen-dnssec-verify-timeout' into 'main'

See merge request isc-projects/bind9!12403

2 days agoExtend the check_dnssec_verify retry window to 60 seconds 12403/head
Nicki Křížek [Tue, 14 Jul 2026 12:18:40 +0000 (12:18 +0000)] 
Extend the check_dnssec_verify retry window to 60 seconds

A fixed ten-iteration poll could be too short for a freshly signed
zone to become fully valid on a heavily loaded host, occasionally
yielding a spurious "zone not verified".

Bump the budget to a 60-second window and, in the process, replace the
hand-rolled retry loop with the standard isctest.run.retry_with_timeout
helper already used by check_next_key_event.

Assisted-by: Claude:claude-opus-4-8
2 days agofix: dev: Change catz coo locking
Alessio Podda [Wed, 15 Jul 2026 09:47:57 +0000 (09:47 +0000)] 
fix: dev: Change catz coo locking

Catalog zones might need to inspect the change-of-ownership records
of other catalog zones, which required to release the lock in the
middle of certain operations, leading to possible race conditions.

Since the operations on change-of-ownership records are limited, we
can instead use a design with a second lock protecting the
change-of-ownership records on read. We structure the API so that
holding two change-of-ownership locks at the same time is impossible.

Closes #6131

Merge branch '6131-catz-dns__catz_zones_merge-uaf-fix-v2' into 'main'

See merge request isc-projects/bind9!12277

2 days agoSplit lock coos check design 12277/head
Alessio Podda [Wed, 10 Jun 2026 13:24:06 +0000 (15:24 +0200)] 
Split lock coos check design

Catalog zones might need to inspect the change-of-ownership records
of other catalog zones, which required to release the lock in the
middle of certain operations, leading to possible race conditions.

Since the operations on change-of-ownership records are limited, we
can instead use a design with a second lock protecting the
change-of-ownership records on read. We structure the API so that
holding two change-of-ownership locks at the same time is impossible.

2 days agofix: dev: Use correct port and target for NOTIFY(CDS)
Matthijs Mekking [Wed, 15 Jul 2026 08:54:44 +0000 (08:54 +0000)] 
fix: dev: Use correct port and target for NOTIFY(CDS)

If there is a DSYNC RRset with multiple records, and unsupported scheme/type records follow supported ones, the port and target of the last record were being used to queue the notify. This does not necessarily match the port and target of the supported record. This has been fixed.

Closes #6080

Merge branch '6080-dsync-mismatch-queue' into 'main'

See merge request isc-projects/bind9!12376

2 days agoSave first matched DSYNC record 12376/head
Matthijs Mekking [Thu, 9 Jul 2026 12:13:29 +0000 (14:13 +0200)] 
Save first matched DSYNC record

Only save the DSYNC target and port when a record matches CDS NOTIFY,
then after scanning the complete RRset require count == 1 before using
the stored values.

2 days agoAdjust NOTIFY(CDS) system test
Matthijs Mekking [Thu, 9 Jul 2026 11:57:00 +0000 (13:57 +0200)] 
Adjust NOTIFY(CDS) system test

Current system tests cover a mixed RRset in but the unsupported and
supported records use the same target and port, so the test does not
catch that the wrong port and target are being used for the supported
type.

Change the test such that the supported DSYNC record is followed
by the unsupported ones, and use different port and target for
supported and unsupported DSYNC records.

2 days agofix: test: test-syncplugin treats firstlbl as a prefix, not an exact label
Mark Andrews [Tue, 14 Jul 2026 23:08:44 +0000 (09:08 +1000)] 
fix: test: test-syncplugin treats firstlbl as a prefix, not an exact label

The label length and the string length where not being checked so
a label that started with a string that matched the skip label would
incorrectly match.

Closes #6212

Merge branch '6212-fix-syncplugin-test-driver' into 'main'

See merge request isc-projects/bind9!12365

2 days agoExtend test_hooks_zonetemplate2 test 12365/head
Mark Andrews [Wed, 8 Jul 2026 02:19:28 +0000 (12:19 +1000)] 
Extend test_hooks_zonetemplate2 test

The test_hooks_zonetemplate2 test failed to properly check
first label matches.

2 days agoProperly check test-syncplugin skip label for equality
Mark Andrews [Wed, 8 Jul 2026 02:08:38 +0000 (12:08 +1000)] 
Properly check test-syncplugin skip label for equality

The label length and the string length where not being checked so
a label that started with a string that matched the skip label would
incorrectly match.

2 days agofix: dev: MacOS byte swapping macros already defined
Mark Andrews [Tue, 14 Jul 2026 22:00:15 +0000 (08:00 +1000)] 
fix: dev: MacOS byte swapping macros already defined

Don't redefine them if the development environment already
defines them.

Closes #6250

Merge branch '6250-macos-byte-swapping-macros-already-defined' into 'main'

See merge request isc-projects/bind9!12388

2 days agoDon't redefine the byte swap macros if already defined 12388/head
Mark Andrews [Sun, 12 Jul 2026 23:36:38 +0000 (09:36 +1000)] 
Don't redefine the byte swap macros if already defined

3 days agofix: test: cdnxdomain test is failing
Mark Andrews [Tue, 14 Jul 2026 16:39:40 +0000 (02:39 +1000)] 
fix: test: cdnxdomain test is failing

Add a one second sleep so that the file system time stamp changes.

Closes #6243

Merge branch '6243-cdnxdomain-test-is-failing' into 'main'

See merge request isc-projects/bind9!12372

3 days agocdnxdomain test is failing on some platforms 12372/head
Mark Andrews [Thu, 9 Jul 2026 04:47:28 +0000 (14:47 +1000)] 
cdnxdomain test is failing on some platforms

Ensure the modification time is newer (second granuality) when the
zone file is rewritten as named uses the file modification time to
determine if it needs to reload a file.

3 days agonew: dev: add crypto required for quic support
Aydın Mercan [Tue, 14 Jul 2026 14:12:19 +0000 (17:12 +0300)] 
new: dev: add crypto required for quic support

This MR adds the necessary cryptographic parts for QUIC support.
These parts are:

AEAD (AES-GCM and ChaCha20-Poly1305)

HKDF (Both the original algorithm and TLS 1.3's HKDF-Expand-Label)

QUIC header protection mask generation

Merge branch 'aydin/quic-crypto' into 'main'

See merge request isc-projects/bind9!11549

3 days agoput doxygen file marker in isc/crypto.h 11549/head
Aydın Mercan [Wed, 18 Feb 2026 08:49:29 +0000 (11:49 +0300)] 
put doxygen file marker in isc/crypto.h

While Doxygen isn't necessarily used, developers might still opt to
use it's syntax comments on LSPs and other toolchains.

3 days agoclear the error stack at the end of fetching
Aydın Mercan [Thu, 12 Feb 2026 07:07:57 +0000 (10:07 +0300)] 
clear the error stack at the end of fetching

Clearning the error stack at the very end will get rid of any other
optional fetch failures since fetch failures are treated as-if they are
unsupported by the provider.

3 days agoadd quic header protection to isc_crypto
Aydın Mercan [Thu, 12 Feb 2026 06:08:56 +0000 (09:08 +0300)] 
add quic header protection to isc_crypto

QUIC uses a custom PRF construction to protect parts of the packet
header. This PRF is derived from the negotiated AEAD key and uses
unauthenticated encryption internally.

We do not expose the primitives underneath (AES-ECB and ChaCha20) as
they shouldn't be within the reach of contributors for their own safety.
Allowing such functionality to be used easily can only result it
problems not to dissimilar to leaving a baby with open bottles of
cleaning supplies.

3 days agoadd aead api to isc_crypto
Aydın Mercan [Mon, 9 Feb 2026 05:03:02 +0000 (08:03 +0300)] 
add aead api to isc_crypto

The new AEAD API exists to cather to the needs for QUIC but is still
usable in other future contexts. Only AES-128-GCM, AES-256-GCM and
ChaCha20-Poly1305 are supported.

AES-128-CCM is intentionally skipped as the algorithm is neither
encountered in the wild nor has any useful advantages comapred to the
more popular AES-128-GCM mode.

3 days agoadd types compatible builtin
Aydın Mercan [Tue, 3 Feb 2026 07:56:00 +0000 (10:56 +0300)] 
add types compatible builtin

This builtin function makes macros gain type safety and also the ability
to statically assert the correctness of typedefs that target external
libraries.

3 days agoadd hkdf to isc_crypto
Aydın Mercan [Mon, 2 Feb 2026 17:17:11 +0000 (20:17 +0300)] 
add hkdf to isc_crypto

The HKDF API exposes the extract, expand and extract-expand operations
separately to support the use-case of QUIC per RFC 9001 Section 5.2. [1]

[1]: https://www.rfc-editor.org/rfc/rfc9001.html#initial-secrets

3 days agofix: test: Replace python deprecated datetime utc functions
Martin Basti [Tue, 14 Jul 2026 13:08:01 +0000 (13:08 +0000)] 
fix: test: Replace python deprecated datetime utc functions

Functions `utcnow` and `utcfromtimestamp` are deprecated in python and
print warnings into tests logs about it.

Use the python prefered way by defining `timezone.utc` in `now` and
`fromtimestamp` functions. Which are equivalent but safer than naive
objects without timezone.

To ensure comptibility `%z` was added to format string to properly
process `Z` as UTC timezone.

Assisted-by: Claude Code:claude-opus-4-8[1m]
Merge branch 'mbasti/python-fix-deprecated-utcfromtimestamp' into 'main'

See merge request isc-projects/bind9!12399

3 days agoReplace python deprecated datetime utc functions 12399/head
Martin Basti [Tue, 14 Jul 2026 09:09:10 +0000 (11:09 +0200)] 
Replace python deprecated datetime utc functions

Functions `utcnow` and `utcfromtimestamp` are deprecated in python and
print warnings into tests logs about it.

Use the python prefered way by defining `timezone.utc` in `now` and
`fromtimestamp` functions. Which are equivalent but safer than naive
objects without timezone.

To ensure comptibility `%z` was added to format string to properly
process `Z` as UTC timezone.

Assisted-by: Claude:claude-opus-4-8
3 days agonew: usr: Built-in hints can be printed with named -H command
Martin Basti [Tue, 14 Jul 2026 12:24:27 +0000 (12:24 +0000)] 
new: usr: Built-in hints can be printed with named -H command

Additionally root hints were updated to precisely match authoritative source including comments. This is a cosmetic change IP addresses haven't been changed.

Merge branch 'main-printhints' into 'main'

See merge request isc-projects/bind9!11114

3 days agoTest named -H option 11114/head
Martin Basti [Thu, 2 Jul 2026 14:08:26 +0000 (16:08 +0200)] 
Test named -H option

Test if built-in root hints match authoritative source.
It also works as early detection if built-in hints divert.

3 days agoSync root hints with primary source
Martin Basti [Thu, 2 Jul 2026 14:37:06 +0000 (16:37 +0200)] 
Sync root hints with primary source

Should match https://www.internic.net/zones/named.root

3 days agoPrint built-in hints via named -H
Petr Menšík [Thu, 16 Oct 2025 19:42:28 +0000 (21:42 +0200)] 
Print built-in hints via named -H

Built-ins from libdns were not easily accessible from command line.

3 days agonew: dev: Add development guidance for AI coding agents under .agents/skills/
Ondřej Surý [Tue, 14 Jul 2026 11:42:07 +0000 (13:42 +0200)] 
new: dev: Add development guidance for AI coding agents under .agents/skills/

This adds a set of skill documents that give AI coding agents the
project's established practices up front instead of having them
rediscovered (or gotten wrong) in every session: the canonical build
and test invocations, the memory-allocator contract, the disciplines
for RCU mutation, per-loop sharded structures, struct-layout work, and
flight-recorder debugging of concurrency bugs, plus the commit and
merge-request conventions.

Merge branch 'ondrej/add-agents-skills' into 'main'

See merge request isc-projects/bind9!12363

3 days agoAdd Claude Code skills symlink 12363/head
Ondřej Surý [Thu, 9 Jul 2026 07:34:18 +0000 (09:34 +0200)] 
Add Claude Code skills symlink

3 days agoLicense the .agents/ contents under MPL-2.0
Ondřej Surý [Tue, 7 Jul 2026 15:14:05 +0000 (17:14 +0200)] 
License the .agents/ contents under MPL-2.0

3 days agoAdd the bind-mr-description agent skill
Ondřej Surý [Tue, 7 Jul 2026 15:09:54 +0000 (17:09 +0200)] 
Add the bind-mr-description agent skill

Explain that MR titles and descriptions feed the generated release
notes, so agents must write them for system administrators: one short
paragraph in operational terms, no internal names or jargon, no
hand-written doc/notes/ entries, and bug framing rather than security
framing for local-filesystem misbehavior.

3 days agoAdd the bind-commit agent skill
Ondřej Surý [Tue, 7 Jul 2026 15:09:46 +0000 (17:09 +0200)] 
Add the bind-commit agent skill

Walk agents through the full commit workflow: the git-clang-format
staging sequence, reason-focused messages hard-wrapped at 72 columns
with no type prefixes, the Assisted-by trailer and the forbidden ones,
amend and fixup discipline for HEAD and non-HEAD commits, and the rule
that agents commit locally and leave publishing to the user.

3 days agoAdd the per-loop-affinity agent skill
Ondřej Surý [Tue, 7 Jul 2026 15:02:31 +0000 (17:02 +0200)] 
Add the per-loop-affinity agent skill

Capture the ownership-instead-of-locking pattern for per-loop sharded
structures: owner-only mutation under isc_tid() affinity, foreign
deletion as mark plus wait-free handoff of the exact entry to the
owner (never an O(shard) scan for marked entries), shard-held
references with bounded zombie lifetime, and eviction pressure spread
across shards instead of draining one before the next.

3 days agoAdd the struct-layout-analysis agent skill
Ondřej Surý [Tue, 7 Jul 2026 15:02:23 +0000 (17:02 +0200)] 
Add the struct-layout-analysis agent skill

Point agents at pahole on the developer build's DWARF instead of
compiling throwaway sizeof programs, and document the cacheline-padding
idiom (union arm with a plain ISC_OS_CACHELINE_SIZE multiplier plus a
STATIC_ASSERT) over the enumerated-sizeof formula, which silently
miscounts when members are added.

3 days agoAdd the lttng-tracing-root-cause-analysis agent skill
Ondřej Surý [Tue, 7 Jul 2026 14:51:55 +0000 (16:51 +0200)] 
Add the lttng-tracing-root-cause-analysis agent skill

Describe the LTTng flight-recorder methodology for concurrency bugs
that static reading, printf and debuggers all miss: small snapshot
buffers to keep timing faithful, a self-diagnosing violation tracepoint
followed by snapshot-and-abort, and the trace-reading patterns —
notably that a stale-read-after-write "paradox" indicates a missing
happens-before edge, not a timing problem.

3 days agoAdd the rcu-mutation agent skill
Ondřej Surý [Tue, 7 Jul 2026 14:51:48 +0000 (16:51 +0200)] 
Add the rcu-mutation agent skill

Capture the build-invisible/publish/reclaim discipline for mutating
RCU-read structures: what makes a node observable (forward, backward
and secondary-index channels), why allocation failure must stay in the
invisible phase, publish-ordering rules for reader consistency, and the
anti-patterns (mutate-then-rollback, wiring clusters via read-side
recovery) that lead to use-after-free. Includes a worked
compressed-split example.

3 days agoAdd the isc-mem-allocator agent skill
Ondřej Surý [Tue, 7 Jul 2026 14:51:41 +0000 (16:51 +0200)] 
Add the isc-mem-allocator agent skill

Condense the isc_mem/isc_mempool contract into agent guidance: the two
allocation families and why mixing them detonates the inuse INSIST at
context destroy, the pointer-NULLing put/free macros, water-mark and
striped-statistics behavior, ISC_MEM_DEBUG* facilities, and mempool
locking/ASAN caveats. Ends with a review checklist for allocation code.

3 days agofix: nil: Refactor findnsec3proofs()
Evan Hunt [Tue, 14 Jul 2026 07:31:28 +0000 (07:31 +0000)] 
fix: nil: Refactor findnsec3proofs()

Clean up some verbose/redundant code in validator.c:findnsec3proofs().

Merge branch 'each-refactor-findnsec3proofs' into 'main'

See merge request isc-projects/bind9!12398

3 days agoRefactor findnsec3proofs() 12398/head
Evan Hunt [Thu, 21 May 2026 00:20:41 +0000 (17:20 -0700)] 
Refactor findnsec3proofs()

Cleaned up some verbose/redundant code in validator.c:findnsec3proofs().

3 days agofix: usr: Properly prevent TSIG generation command line injection attacks
Evan Hunt [Tue, 14 Jul 2026 05:51:04 +0000 (05:51 +0000)] 
fix: usr: Properly prevent TSIG generation command line injection attacks

When key names are generated with `rndc-confgen`, `tsig-keygen` and `ddns-confgen`, special characters must be escaped to ensure the configuration is parsed correctly.

Closes #6071

Merge branch '6071-allow-all-valid-keynames' into 'main'

See merge request isc-projects/bind9!12395

3 days agoAdd dns_name_totext unit test 12395/head
Mark Andrews [Tue, 7 Jul 2026 04:32:35 +0000 (14:32 +1000)] 
Add dns_name_totext unit test

Tests dns_name_text output for various labels with various flag
combination.

3 days agoUpdate tests_rndc_confgen.py to show escaped double quotes
Mark Andrews [Tue, 7 Jul 2026 01:02:34 +0000 (11:02 +1000)] 
Update tests_rndc_confgen.py to show escaped double quotes

The old INJECTION string was failing due to not being a valid
DNS name providing a false assertion that injections where
no longer possible.  Shorten it to fit in a single label then
check that it is properly escaped to prevent the injection attack.

Also add a test for a oversized DNS label.

3 days agoAllow all valid key names
Mark Andrews [Tue, 5 May 2026 01:54:35 +0000 (11:54 +1000)] 
Allow all valid key names

TSIG keys names need to be able to be set to any valid name so that
update self rules can work for any valid name.  Restore this ability
to the key generating tool while preventing rndc.conf and named.conf
from being compromised due to specially crafted key names.

3 days agoAdd DNS_NAME_QUOTED flag for dns_name_totext()
Mark Andrews [Mon, 6 Jul 2026 02:59:50 +0000 (12:59 +1000)] 
Add DNS_NAME_QUOTED flag for dns_name_totext()

Names that are to be printed within a pair of double quotes,
(for example, in named.conf), don't need spaces and special
characters to be fully escaped.

3 days agofix: usr: Ensure NSEC authority does not cross zonecut boundary
Evan Hunt [Mon, 13 Jul 2026 19:38:19 +0000 (19:38 +0000)] 
fix: usr: Ensure NSEC authority does not cross zonecut boundary

When using a cached NSEC record to prove that a delegation is insecure,
we now check that the signer name in the corresponding RRSIG is not
above a known secure delegation point. This prevents a signed namespace
from being downgraded to insecure using an NSEC record from the
grandparent zone.

Closes #5967

Merge branch '5967-nsec-grandparent' into 'main'

See merge request isc-projects/bind9!12257

4 days agoAdd a system test for the grandparent NSEC downgrade 12257/head
Alessio Podda [Thu, 4 Jun 2026 14:40:03 +0000 (16:40 +0200)] 
Add a system test for the grandparent NSEC downgrade

A resolver must not accept an NSEC or NSEC3 record signed by a zone
above a known secure delegation as proof that the delegation is
insecure. Otherwise anyone able to answer for the grandparent can
downgrade the signed namespace below it and serve forged, unsigned
records for any name in it.

Checking for SERVFAIL alone would not pin this down: a resolver that
rejects the forged proof but keeps walking down fails too, on the
unvalidatable answer it meets further along. The tests therefore
assert the refusal itself -- it is logged, and no DS query for a name
below the forged proof ever reaches the authoritative server -- and
they do so both for a proof fetched on demand and for one already in
the cache.

Co-Authored-By: Evan Hunt <each@isc.org>
Co-Authored-By: Ondřej Surý <ondrej@isc.org>
Assisted-by: Claude:claude-fable-5
4 days agoEnsure NSEC authority does not cross zonecut boundary
Evan Hunt [Fri, 22 May 2026 02:34:00 +0000 (19:34 -0700)] 
Ensure NSEC authority does not cross zonecut boundary

When using a cached NSEC record to prove that a delegation is insecure,
we now check that the signer name in the corresponding RRSIG is not
above a known secure delegation point. This prevents a signed namespace
from being downgraded to insecure using an NSEC record from the
grandparent zone.

Fixes: isc-projects/bind9#5967
Co-Authored-By: Ondřej Surý <ondrej@isc.org>
4 days agochg: dev: Pass the work callback result to the done callback
Ondřej Surý [Mon, 13 Jul 2026 11:44:10 +0000 (13:44 +0200)] 
chg: dev: Pass the work callback result to the done callback

The `isc_work` callback now returns `isc_result_t` and the value is
handed to the done callback, so the callers no longer need their own
result-passing state.

Merge branch 'ondrej/pass-result-from-work-callback' into 'main'

See merge request isc-projects/bind9!12390

4 days agoPass the work callback result to the done callback 12390/head
Ondřej Surý [Mon, 13 Jul 2026 09:42:10 +0000 (11:42 +0200)] 
Pass the work callback result to the done callback

The isc_work callback returned void, so every user that cared about
the outcome of the offloaded work had to smuggle it through its own
context state (xfrin_work_t, the catz/rpz updateresult fields, result
members in the dump/load/checksig contexts).  Make the work callback
return isc_result_t and have isc_work deliver that value to the done
callback.

5 days agofix: usr: Prevent aborts during expired cache dumps
Ondřej Surý [Sun, 12 Jul 2026 06:23:29 +0000 (08:23 +0200)] 
fix: usr: Prevent aborts during expired cache dumps

Running rndc dumpdb -expired could cause named to abort when the cache contained internal deletion markers for records that had already been removed. BIND now skips those markers when preparing expired cache dumps, so the dump includes only real cached records and completes normally.

Closes #6064

Merge branch '6064-skip-nonexistent-headers' into 'main'

See merge request isc-projects/bind9!12387

5 days agoTest expired qpcache iteration after deletion 12387/head
Ondřej Surý [Sun, 12 Jul 2026 05:00:48 +0000 (07:00 +0200)] 
Test expired qpcache iteration after deletion

Add a regression test that deletes a cached rdataset and then walks
all rdatasets with expired entries allowed. The iterator must report no
datasets for the deleted type rather than exposing the tombstone.

Assisted-by: Codex:GPT-5
5 days agoSkip non-existent qpcache headers in iterators
Ondřej Surý [Sun, 12 Jul 2026 05:00:31 +0000 (07:00 +0200)] 
Skip non-existent qpcache headers in iterators

The cache rdataset iterator must never bind delete tombstones, even
when expired cache entries are requested for dumpdb. Treat non-existent
slab headers as inactive so expired dumps cannot expose headers without
a backing rdataslab.

Assisted-by: Codex:GPT-5
7 days agochg: test: Replace prereq.sh files with isctest.mark
Nicki Křížek [Fri, 10 Jul 2026 12:11:46 +0000 (14:11 +0200)] 
chg: test: Replace prereq.sh files with isctest.mark

Some prereq.sh checks were obsolete and removed, others have been ported to use the `isctest.mark`.

Merge branch 'nicki/prereq-to-marks' into 'main'

See merge request isc-projects/bind9!12335

7 days agoRemove prereq.sh support from the system test runner 12335/head
Nicki Křížek [Wed, 1 Jul 2026 13:40:07 +0000 (13:40 +0000)] 
Remove prereq.sh support from the system test runner

With every prereq.sh converted to pytest markers, the conftest
fixture no longer needs to locate and run a per-directory prereq.sh.
Drop check_prerequisites() and the README entry for the file.

Assisted-by: Claude:claude-opus-4-8
7 days agoMove the statschannel prereq.sh check to a marker
Nicki Křížek [Wed, 1 Jul 2026 13:40:07 +0000 (13:40 +0000)] 
Move the statschannel prereq.sh check to a marker

The libxml2/json-c requirement becomes with_libxml2_or_json_c. The
stale Net::DNS check and the core-Perl File::Fetch check are dropped
rather than carried over.

Assisted-by: Claude:claude-opus-4-8
7 days agoGate enginepkcs11 with the softhsm2_environment marker
Nicki Křížek [Wed, 1 Jul 2026 13:40:07 +0000 (13:40 +0000)] 
Gate enginepkcs11 with the softhsm2_environment marker

Completes enginepkcs11's conversion, removing its prereq.sh.
softhsm2_environment already existed in isctest.mark.

Assisted-by: Claude:claude-opus-4-8
7 days agoMove the pkcs11-provider prereq.sh check to a marker
Nicki Křížek [Wed, 1 Jul 2026 13:40:07 +0000 (13:40 +0000)] 
Move the pkcs11-provider prereq.sh check to a marker

enginepkcs11 also needs softhsm2, so its prereq.sh keeps that check
for now.

Assisted-by: Claude:claude-opus-4-8
7 days agoMove FIPS-DH prereq.sh checks to a with_fips_dh marker
Nicki Křížek [Wed, 1 Jul 2026 13:40:07 +0000 (13:40 +0000)] 
Move FIPS-DH prereq.sh checks to a with_fips_dh marker

Completes the conversion of doth and tsiggss, removing both
prereq.sh files.

Assisted-by: Claude:claude-opus-4-8
7 days agoMove gssapi prereq.sh checks to a with_gssapi marker
Nicki Křížek [Wed, 1 Jul 2026 13:40:07 +0000 (13:40 +0000)] 
Move gssapi prereq.sh checks to a with_gssapi marker

Gates tkeyleak and the tsiggss modules. tsiggss also needs FIPS-DH,
so its prereq.sh keeps that check for now.

Assisted-by: Claude:claude-opus-4-8
7 days agoMove the cpu prereq.sh check to a with_cpu_affinity marker
Nicki Křížek [Wed, 1 Jul 2026 13:40:07 +0000 (13:40 +0000)] 
Move the cpu prereq.sh check to a with_cpu_affinity marker

Assisted-by: Claude:claude-opus-4-8
7 days agoMove the eddsa prereq.sh check to a with_eddsa marker
Nicki Křížek [Wed, 1 Jul 2026 13:40:06 +0000 (13:40 +0000)] 
Move the eddsa prereq.sh check to a with_eddsa marker

Assisted-by: Claude:claude-opus-4-8
7 days agoMove TSAN prereq.sh checks to a without_tsan marker
Nicki Křížek [Wed, 1 Jul 2026 13:40:06 +0000 (13:40 +0000)] 
Move TSAN prereq.sh checks to a without_tsan marker

Gates dlzexternal and dyndb, which are skipped under ThreadSanitizer.

Assisted-by: Claude:claude-opus-4-8
7 days agoMove the geoip2 prereq.sh check to a with_geoip2 marker
Nicki Křížek [Wed, 1 Jul 2026 13:40:06 +0000 (13:40 +0000)] 
Move the geoip2 prereq.sh check to a with_geoip2 marker

Assisted-by: Claude:claude-opus-4-8
7 days agoMove libnghttp2 prereq.sh checks to a with_libnghttp2 marker
Nicki Křížek [Wed, 1 Jul 2026 13:40:06 +0000 (13:40 +0000)] 
Move libnghttp2 prereq.sh checks to a with_libnghttp2 marker

Gates proxy, transport_change and the doth modules. doth also needs
FIPS-DH, so its prereq.sh keeps that check for now.

Assisted-by: Claude:claude-opus-4-8
7 days agoMove Perl-module prereq.sh checks to pytest markers
Nicki Křížek [Tue, 30 Jun 2026 14:53:10 +0000 (14:53 +0000)] 
Move Perl-module prereq.sh checks to pytest markers

fetchlimit and nsupdate still invoke ungated Perl helpers that
need Net::DNS (ditch.pl, packet.pl); reclimit and serve_stale
still run Perl ans.pl servers needing Net::DNS::Nameserver and
Time::HiRes. Replace the directory-scoped prereq.sh with new
runtime-probing markers applied only to the tests.sh wrappers
that actually run the Perl code -- native pytest modules in the
same directory (e.g. nsupdate) no longer skip when these modules
are absent.

Assisted-by: Claude:claude-opus-4-8
7 days agoRemove obsolete Perl module prereq.sh files
Nicki Křížek [Tue, 30 Jun 2026 14:47:33 +0000 (14:47 +0000)] 
Remove obsolete Perl module prereq.sh files

These tests no longer depend on any non-core Perl module. The Net::DNS
dependency was used for ans.pl which were rewritten into ans.py.

In chain system test, the Net::DNS::Nameserver was also used by ans.pl.

xfer system test was completely rewritten into Python.

Assisted-by: Claude:claude-opus-4-8
7 days agofix: usr: Negative caching stopped working with stale-answer-client-timeout 0
Ondřej Surý [Fri, 10 Jul 2026 08:41:32 +0000 (10:41 +0200)] 
fix: usr: Negative caching stopped working with stale-answer-client-timeout 0

With "stale-answer-client-timeout 0" configured, every client query for a
name cached as NXDOMAIN or NODATA was sent on to the authoritative servers,
even while the cached negative answer was still within its TTL, so the
resolver effectively lost negative caching. Negative answers are now
refreshed only once they have actually gone stale.

Closes #6245

Merge branch '6245-fix-query_stale_refresh_ncache' into 'main'

See merge request isc-projects/bind9!12381

7 days agoTest that a fresh negative cache entry is not refreshed 12381/head
Ondřej Surý [Fri, 10 Jul 2026 05:57:58 +0000 (07:57 +0200)] 
Test that a fresh negative cache entry is not refreshed

The existing serve-stale tests all use negative answers with a two
second TTL, because they are there to exercise stale data.  Nothing
covered the far more common case of a negative answer that is still
fresh, which is how the needless refresh went unnoticed.

ans2 grows a NODATA and an NXDOMAIN name backed by a SOA with a 600
second TTL and MINIMUM, so the cached entry cannot go stale while the
test runs, and the test counts the queries that reach ans2: priming the
cache may send one, the repeated client queries must send none.

Assisted-by: Claude:claude-opus-4-8
7 days agoOnly refresh negative cache entries that are actually stale
Ondřej Surý [Fri, 10 Jul 2026 05:48:02 +0000 (07:48 +0200)] 
Only refresh negative cache entries that are actually stale

query_ncache() always passed a NULL rdataset to query_stale_refresh(),
which reads NULL as "this RRset is stale".  NULL is only meaningful for
the DNS64 caller, whose rdataset has already been detached by the time
the answer is turned into an NXDOMAIN; everywhere else a perfectly fresh
negative cache entry was taken for a stale one.

With stale-answer-client-timeout 0 the staleness check is the only gate
left on the refresh, so every client query for a cached NXDOMAIN or
NODATA name started another fetch and negative caching stopped having
any effect.

7 days agochg: doc: Set up version for BIND 9.21.25
Michał Kępień [Fri, 10 Jul 2026 08:38:13 +0000 (10:38 +0200)] 
chg: doc: Set up version for BIND 9.21.25

Merge branch 'michal/set-up-version-for-bind-9.21.25' into 'main'

See merge request isc-projects/bind9!12382

7 days agoUpdate BIND version to 9.21.25-dev 12382/head
Michał Kępień [Fri, 10 Jul 2026 08:35:47 +0000 (10:35 +0200)] 
Update BIND version to 9.21.25-dev

8 days agofix: dev: Print the full OID in PRIVATEOID key comments
Ondřej Surý [Thu, 9 Jul 2026 14:23:53 +0000 (16:23 +0200)] 
fix: dev: Print the full OID in PRIVATEOID key comments

The OID in the "; alg = ..." comment of a PRIVATEOID key was truncated to sixteen characters.

Closes #6092

Merge branch '6092-fix-PRIVATEOID-output' into 'main'

See merge request isc-projects/bind9!12377

8 days agoPrint the full OID in PRIVATEOID key comments 12377/head
Ondřej Surý [Thu, 9 Jul 2026 13:06:31 +0000 (15:06 +0200)] 
Print the full OID in PRIVATEOID key comments

The OID printed in the "; alg = ..." comment of a PRIVATEOID KEY,
DNSKEY, CDNSKEY or RKEY record was truncated to sixteen characters:
1.2.840.113549.1.1.11 came out as 1.2.840.113549.1.  Only the comment
was ever affected, never the record itself.

8 days agofix: dev: Fix a crash when resolving names below a cached DNAME
Ondřej Surý [Thu, 9 Jul 2026 13:55:19 +0000 (15:55 +0200)] 
fix: dev: Fix a crash when resolving names below a cached DNAME

A recursive resolver could crash when it answered a query for a name beneath a
cached DNAME while that same DNAME record was concurrently refreshed or evicted
from the cache.

Closes #6182

Merge branch '6182-qpcache-dname-zonecut-uaf' into 'main'

See merge request isc-projects/bind9!12337

8 days agoReference-count the DNAME zonecut headers 12337/head
Ondřej Surý [Wed, 1 Jul 2026 16:43:35 +0000 (18:43 +0200)] 
Reference-count the DNAME zonecut headers

check_dname() cached the DNAME header and its RRSIG in the search block
and dropped the node lock holding only a node reference.  Since cache
headers became reference counted and are freed synchronously, and
delegation adds no longer take the tree write lock, a concurrent refresh
or eviction can free the header before setup_delegation() reads it.  Take
a reference on the headers in check_dname() and release it once the
lookup finishes.

8 days agochg: dev: Support larger DNSSEC keys and signatures 6198-isc_buffer_reserve-wraps-near-uint_max
Ondřej Surý [Thu, 9 Jul 2026 07:22:09 +0000 (09:22 +0200)] 
chg: dev: Support larger DNSSEC keys and signatures

Some DNSSEC tools and trust-anchor handling could fail when
working with unusually large DNSSEC keys or signatures,
including those used by post-quantum algorithms. These paths
now accept DNSKEY, CDNSKEY, CDS, and RRSIG data up to the DNS
record size limits, so large key material can be parsed, written,
checked, and signed consistently.

Merge branch 'ondrej/dynamic-dnssec-buffers' into 'main'

See merge request isc-projects/bind9!12370

8 days agoRemove the fixed DST_KEY_MAXSIZE limit from key parsing paths 12370/head
Ondřej Surý [Wed, 8 Jul 2026 08:56:39 +0000 (10:56 +0200)] 
Remove the fixed DST_KEY_MAXSIZE limit from key parsing paths

The buffers receiving DNSKEY (and SKR resource record) rdata parsed
from text or wire form were sized by DST_KEY_MAXSIZE (1280 octets),
which is too small for post-quantum public keys.  Parse into
DNS_RDATA_MAXLENGTH sized buffers instead, which cannot be exceeded
by construction, and drop the DST_KEY_MAXSIZE and DST_KEY_MAXTEXTSIZE
constants that no longer have any users.

Assisted-by: Claude:claude-fable-5
8 days agoSize RRSIG rdata buffers by the maximum rdata length
Ondřej Surý [Wed, 8 Jul 2026 08:47:47 +0000 (10:47 +0200)] 
Size RRSIG rdata buffers by the maximum rdata length

The buffers receiving the RRSIG rdata built by dns_dnssec_sign() were
fixed-size arrays (1024 or 2048 octets), which is too small for
post-quantum signatures.  Use DNS_RDATA_MAXLENGTH sized buffers
instead, which no RRSIG rdata can exceed by construction.

Assisted-by: Claude:claude-fable-5
8 days agoSize DNSKEY rdata buffers by the maximum rdata length
Ondřej Surý [Wed, 8 Jul 2026 08:34:50 +0000 (10:34 +0200)] 
Size DNSKEY rdata buffers by the maximum rdata length

Post-quantum signature algorithms have public keys that do not fit
into the fixed DST_KEY_MAXSIZE (1280 octets) buffers used when
converting a dst_key to DNSKEY rdata.  Use DNS_RDATA_MAXLENGTH sized
buffers instead, which no DNSKEY rdata can exceed by construction.

Assisted-by: Claude:claude-fable-5
9 days agofix: usr: Don't synthesize negative responses with pending NSEC
Matthijs Mekking [Wed, 8 Jul 2026 12:05:26 +0000 (12:05 +0000)] 
fix: usr: Don't synthesize negative responses with pending NSEC

If an NSEC record has not yet been validated and is cached with trust
pending, don't use it to synthesize negative responses.

Closes #5872

Closes #5887

Closes #5977

Merge branch '5977-validate-synth-from-dnssec' into 'main'

See merge request isc-projects/bind9!12281

9 days agoCover exact-name NODATA synthesis from a pending NSEC 12281/head
Ondřej Surý [Tue, 7 Jul 2026 12:06:48 +0000 (14:06 +0200)] 
Cover exact-name NODATA synthesis from a pending NSEC

The #5872 reproducer plants a covering NSEC that is rejected inside the
cache (find_coveringnsec), so it never reaches the trust check on the
exact-match NODATA branch of query_coveringnsec(). This adds a companion
case: an NSEC owned by the victim name itself, injected at pending trust
via a CD=1 query, is returned by the cache as a NODATA proof for the
exact node and must not be used to synthesize a NODATA that would deny
the victim's real A record.

Reuses the f004.test fixture with a victim-owned forged NSEC.

Assisted-by: Claude:claude-fable-5
9 days agoMerge NSEC synthesis tests
Evan Hunt [Tue, 16 Jun 2026 21:25:51 +0000 (14:25 -0700)] 
Merge NSEC synthesis tests

Merge the tests for "nsec_child_next" and "nsec_pending_cd" into
"nsec_synthesis".

9 days agoReproducer for #5887 out of zone NSEC-next syntheisis
Alessio Podda [Thu, 4 Jun 2026 14:30:35 +0000 (16:30 +0200)] 
Reproducer for #5887 out of zone NSEC-next syntheisis

Create the "nsec_child_next" system test.

Co-Authored-By: Evan Hunt <each@isc.org>
9 days agoReproducer for #5872 cache pending synthesis
Alessio Podda [Wed, 3 Jun 2026 14:58:25 +0000 (16:58 +0200)] 
Reproducer for #5872 cache pending synthesis

Create the "nsec_pending_cd" system test.

Co-Authored-By: Matthijs Mekking <matthijs@isc.org>
9 days agoReproducer for #5977 cache poison NSEC piggyback
Alessio Podda [Wed, 3 Jun 2026 12:59:13 +0000 (14:59 +0200)] 
Reproducer for #5977 cache poison NSEC piggyback

Create a new "nsec_piggyback" system test.

Co-Authored-By: Matthijs Mekking <matthijs@isc.org>