]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
9 hours ago[9.20] chg: test: Move requirement checks to `pytest_configure` hook bind-9.20
Štěpán Balážik [Tue, 2 Jun 2026 10:10:48 +0000 (10:10 +0000)] 
[9.20] chg: test: Move requirement checks to `pytest_configure` hook

This leads to nicer logging if requirements aren't met.

Backport of MR !11551

Merge branch 'backport-stepan/dont-run-system-tests-without-requirements-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12105

9 hours agoMove pytest requirements check to pytest_configure hook 12105/head
Štěpán Balážik [Fri, 13 Feb 2026 10:53:16 +0000 (11:53 +0100)] 
Move pytest requirements check to pytest_configure hook

Logging from a pytest hook looks better.

Reorder the check for presence of `featuretest` before `init_vars` to
produce more sensible errors.

(cherry picked from commit b31f058ad0026ed183ac1fc9fb6fa089162301e3)

11 hours ago[9.20] fix: usr: Fix nxdomain-redirect combined with dns64
Ondřej Surý [Tue, 2 Jun 2026 07:48:28 +0000 (09:48 +0200)] 
[9.20] fix: usr: Fix nxdomain-redirect combined with dns64

When a resolver was configured with both `nxdomain-redirect` and `dns64`
in the same view, an AAAA query for a nonexistent name could abort
`named`. The combination failed whenever the redirect zone held A
records but no AAAA records.  The server now serves the empty AAAA
response from the redirect zone as-is, instead of attempting DNS64
synthesis on top of it.

Closes #5789

Backport of MR !12059

Merge branch 'backport-5789-fix-nxdomain-redirect-dns64-assert-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12123

11 hours agoSkip DNS64 synthesis when answering a redirected response 12123/head
Ondřej Surý [Wed, 20 May 2026 16:28:15 +0000 (18:28 +0200)] 
Skip DNS64 synthesis when answering a redirected response

redirect2() swaps qctx->db to the redirect zone before
query_nodata() runs. The DNS64 fallback there issues an A lookup
for the original query name, which is out of zone for the
redirect db, and the resulting query_notfound() trips
INSIST(!is_zone). The cached NCACHENXRRSET variant trips a
REQUIRE in dns_rdataset_first() on a disassociated rdataset.
The synth-from-dnssec entry reaches the same fallback via
query_coveringnsec(). Guarding the fallback with
!qctx->redirected leaves the nxdomain-redirect NXRRSET answer to
be served as-is.

(cherry picked from commit 4bfd18d08d706218400ba131f6625f6bcd7c47cc)

11 hours agoSystem test for nxdomain-redirect combined with dns64
Ondřej Surý [Wed, 20 May 2026 16:28:15 +0000 (18:28 +0200)] 
System test for nxdomain-redirect combined with dns64

An AAAA query for a non-existent name into a view that combines
nxdomain-redirect with dns64 used to abort named via the DNS64
fallback in query_nodata(). The new module exercises all three
documented entry paths into query_redirect(): the authoritative
NXDOMAIN path (ns7, tripping INSIST(!is_zone) in
query_notfound()), the recursive NCACHENXRRSET path (ns8,
tripping REQUIRE in dns_rdataset_first() on a disassociated
rdataset), and the synth-from-dnssec path (ns10 validating
against ns9's signed root, with a primer A query so the second
AAAA reaches query_redirect() via query_coveringnsec()). ns9
serves as a neutral upstream so the cached and synthesized
negatives land real NXRRSETs.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit 739a067de89834820372ae14171c0889f7aedc83)

24 hours ago[9.20] fix: test: Remove redundant Python 3.7 skip markers from system tests
Michal Nowak [Mon, 1 Jun 2026 19:17:49 +0000 (21:17 +0200)] 
[9.20] fix: test: Remove redundant Python 3.7 skip markers from system tests

Backport of MR !12087

Merge branch 'backport-mnowak/fix-system-test-skips-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12160

25 hours agoRemove redundant Python 3.7 skip markers from system tests 12160/head
Michal Nowak [Sun, 24 May 2026 18:29:55 +0000 (18:29 +0000)] 
Remove redundant Python 3.7 skip markers from system tests

The test framework already requires Python 3.10+ (conftest.py raises
RuntimeError if version < 3.10), so skipif(sys.version_info < (3, 7))
can never trigger. Remove the dead markers and now-unused sys imports.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit c41f63c82d7ed26b41bc9b756941be8d076612a3)

27 hours ago[9.20] fix: dev: Fix wrong variable in named_server_sync() log message
Michal Nowak [Mon, 1 Jun 2026 15:44:44 +0000 (17:44 +0200)] 
[9.20] fix: dev: Fix wrong variable in named_server_sync() log message

named_server_sync() logged isc_result_totext(result) but returns
tresult. The loop accumulates errors into tresult, so result only
holds the last iteration's value. If the last view succeeded but an
earlier one failed, the log would incorrectly say "success".

Backport of MR !12090

Merge branch 'backport-mnowak/fix-server-sync-log-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12156

27 hours agoFix wrong variable in named_server_sync() log message 12156/head
Michal Nowak [Mon, 25 May 2026 06:52:31 +0000 (06:52 +0000)] 
Fix wrong variable in named_server_sync() log message

named_server_sync() logged isc_result_totext(result) but returns
tresult. The loop accumulates errors into tresult, so result only
holds the last iteration's value. If the last view succeeded but an
earlier one failed, the log would incorrectly say "success".

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit 1b984b1f116134d8a93c5327217487928f6d324f)

27 hours ago[9.20] fix: doc: Fix spelling typos in comments and code
Michal Nowak [Mon, 1 Jun 2026 15:40:55 +0000 (17:40 +0200)] 
[9.20] fix: doc: Fix spelling typos in comments and code

Backport of MR !12089

Merge branch 'backport-mnowak/fix-spelling-typos-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12157

28 hours agoFix spelling typos in comments and code 12157/head
Michal Nowak [Sun, 24 May 2026 07:00:21 +0000 (07:00 +0000)] 
Fix spelling typos in comments and code

Assisted-by: Mistral Vibe:mistral-medium-3.5
Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit 36fe37f6b4c1d7948ec128eee0cd60ccd30b1037)

28 hours ago[9.20] fix: test: Increase timeout for reload-based kasp signing checks
Michal Nowak [Mon, 1 Jun 2026 14:49:01 +0000 (16:49 +0200)] 
[9.20] fix: test: Increase timeout for reload-based kasp signing checks

```
______________________________ test_kasp_default _______________________________
[gw0] freebsd15 -- Python 3.11.15 /usr/local/bin/python3.11
/home/ec2-user/builds/isc-private/bind9/bin/tests/system/kasp/tests_kasp.py:910: in test_kasp_default
    isctest.run.retry_with_timeout(update_is_signed, timeout=5)
/home/ec2-user/builds/isc-private/bind9/bin/tests/system/isctest/run.py:164: in retry_with_timeout
    assert False, msg
E   AssertionError: tests_kasp.test_kasp_default.<locals>.update_is_signed() timed out after 5 s
E   assert False
```

Backport of MR !12151

Merge branch 'backport-mnowak/kasp-default-update-is-signed-timeout-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12155

28 hours agoIncrease timeout for reload-based kasp signing checks 12155/head
Michal Nowak [Mon, 1 Jun 2026 12:30:23 +0000 (12:30 +0000)] 
Increase timeout for reload-based kasp signing checks

After reloading an inline-signed zone from file, named must re-read it,
detect the deltas and generate RRSIGs before the answer is signed, which
can take longer than 5 seconds on a loaded CI host and cause spurious
update_is_signed() timeouts. Bump these reload-based checks to 10
seconds, matching cb_ixfr_is_signed.

Assisted-by: Claude:claude-opus-4-8
(cherry picked from commit a2ccc04ae3fddd1786f7ac8f1b6fc637d818a190)

28 hours ago[9.20] fix: test: Bump edns-expire refresh timeout to 30 seconds
Michal Nowak [Mon, 1 Jun 2026 14:39:05 +0000 (16:39 +0200)] 
[9.20] fix: test: Bump edns-expire refresh timeout to 30 seconds

Rarely, RNDC fails to refresh the zone on FreeBSD in the default 10
seconds, causing test_edns_expire_refresh to fail with a TimeoutExpired
on the "rndc refresh edns-expire." call.  Give it more time, the same
way the reconfigure timeout was bumped in
test_reconfiguration_when_zone_transfer_is_in_the_middle_of_soa_query.

Assisted-by: Claude:claude-opus-4-8
Backport of MR !12152

Merge branch 'backport-mnowak/bump-edns-expire-refresh-rndc-timeout-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12153

28 hours agoBump edns-expire refresh timeout to 30 seconds 12153/head
Michal Nowak [Mon, 1 Jun 2026 12:33:59 +0000 (12:33 +0000)] 
Bump edns-expire refresh timeout to 30 seconds

Rarely, RNDC fails to refresh the zone on FreeBSD in the default 10
seconds, causing test_edns_expire_refresh to fail with a TimeoutExpired
on the "rndc refresh edns-expire." call.  Give it more time, the same
way the reconfigure timeout was bumped in
test_reconfiguration_when_zone_transfer_is_in_the_middle_of_soa_query.

Assisted-by: Claude:claude-opus-4-8
(cherry picked from commit c93d68a36b5cd42370c01c501986cd0d2568ade4)

29 hours ago[9.20] fix: test: Avoid rndc loadkeys race in checkds system test
Nicki Křížek [Mon, 1 Jun 2026 14:25:32 +0000 (16:25 +0200)] 
[9.20] fix: test: Avoid rndc loadkeys race in checkds system test

Address a `checkds` test race condition.

Example failure:

```
________________ test_checkds[incomplete.yes.dspublish.ns2-4-5] ________________
[gw3] linux -- Python 3.13.5 /usr/bin/python3
/builds/isc-projects/bind9/bin/tests/system/checkds/tests_checkds.py:451: in test_checkds
    keystate_check(ns2, params.zone, params.expected_parent_state)
/builds/isc-projects/bind9/bin/tests/system/checkds/tests_checkds.py:183: in keystate_check
    assert val == 0
E   AssertionError: assert '20260528103555 (Thu May 28 10:35:55 2026)' == 0
```

https://gitlab.isc.org/isc-projects/bind9/-/jobs/7497509

Backport of MR !12138

Merge branch 'backport-nicki/fix-checkds-loadkeys-race-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12150

29 hours agoAvoid rndc loadkeys race in checkds system test 12150/head
Nicki Křížek [Thu, 28 May 2026 16:13:20 +0000 (16:13 +0000)] 
Avoid rndc loadkeys race in checkds system test

The wait loop in test_checkds() called "rndc loadkeys" once per
second while polling ns9.log for expected parental-agent response
lines. Under load (notably the rbt CI job), responses to one query
batch could land after a subsequent loadkeys had already reset the
per-key DSPUBCOUNT counter in lib/dns/zone.c without cancelling the
in-flight requests. Stragglers from the earlier round then bumped the
new round's counter to parentalscnt and BIND finalized DSPublish for
zones where one parental-agent legitimately serves no DS, spuriously
failing the !DSPublish keystate assertion.

Trigger at most one loadkeys per test case and wait passively via
watch_log_from_start() / wait_for_all().  Watching from the start
of the log preserves the original implicit semantics for zones
whose DS state was already finalized by BIND's automatic checkds
polling at zone-load time -- the expected lines are already
present and the watcher returns immediately.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit 02b6239489549e44daac123f556f851dd9949b27)

31 hours ago[9.20] fix: dev: Bound memory use during incoming zone transfers
Alessio Podda [Mon, 1 Jun 2026 12:24:57 +0000 (12:24 +0000)] 
[9.20] fix: dev: Bound memory use during incoming zone transfers

During an incoming zone transfer, an optimization could let
the batch of pending records grow without bound for a large
zone, raising memory usage. It gave no measurable performance
benefit, so it has been removed.

Closes #5958

Backport of MR !12141

Merge branch 'backport-5958-no-name-boundary-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12142

31 hours agoRemove name boundary optimization 12142/head
Alessio Podda [Fri, 22 May 2026 15:58:10 +0000 (17:58 +0200)] 
Remove name boundary optimization

In MR !9740, we introduced an optimization that reduces memory usage
by processing rdatas in batches during AXFR.

The maximum batch size is 128, but the batch size was allowed to grow
beyond that limit if all rdatas in a batch were for the same name, as
that allows a more efficient optimization.

This optimization could theoretically allow the batch size arbitrarily
for a sufficient large zone transfer. Since synthetic tests don't show
any performance improvement from the optimization, this MR removes it.

(cherry picked from commit 7502e73333943fb45ce0a679aac5ccfce75012aa)

3 days ago[9.20] chg: usr: Fix a resolver stall on a CNAME response to a DS query
Ondřej Surý [Sat, 30 May 2026 06:02:13 +0000 (08:02 +0200)] 
[9.20] chg: usr: Fix a resolver stall on a CNAME response to a DS query

A validating resolver could stall for about twelve seconds and then return
SERVFAIL when an authoritative server answered a DS query with a CNAME. Such
responses are now rejected promptly, so the query fails fast instead of
hanging.

Closes #5878

Backport of MR !11867

Merge branch 'backport-5878-reject-cname-at-dnssec-types-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12147

3 days agoAdd a system test for CNAME answers to DNSSEC meta-type queries 12147/head
Ondřej Surý [Fri, 29 May 2026 09:32:52 +0000 (11:32 +0200)] 
Add a system test for CNAME answers to DNSSEC meta-type queries

Two authoritative zones drive the cases. 'example.' answers DNSKEY,
NSEC, NSEC3 and RRSIG queries with a CNAME: a direct recursive query for
one of these must not crash the resolver, and the validator's own DNSKEY
fetch for a signed name must fail as a broken trust chain and return
SERVFAIL promptly.

'secure.' is served faithfully but answers DS queries with an unsigned
CNAME -- the input that drove the validator's insecurity proof into a
self-join.  The resolver must return SERVFAIL within a couple of seconds
instead of stalling for twelve.

Assisted-by: Claude:claude-opus-4-8
(cherry picked from commit 358c55ffa264baad1d2926c4fcba8b124df64a87)

3 days agoFail promptly on an RRSIG answer with no usable record
Ondřej Surý [Fri, 29 May 2026 15:43:54 +0000 (17:43 +0200)] 
Fail promptly on an RRSIG answer with no usable record

A query for an RRSIG is handled as a subset of ANY, so rctx_answer_any()
filters out records that do not match the queried type. When every
record was filtered out (an answer carrying only unrelated types), the
function still returned success with nothing cached, and the fetch then
waited for a validator that was never started until the backstop fetch
timer fired ~12s later. Treat an all-filtered answer as a broken
response, matching how non-meta types already reject a reply with no
usable record.

(cherry picked from commit 938b58a809eff49e706984cccba1cfc42ed890c3)

3 days agoDetect non-advancing alias chains in the validator
Ondřej Surý [Fri, 29 May 2026 09:32:44 +0000 (11:32 +0200)] 
Detect non-advancing alias chains in the validator

The resolver turned a CNAME response to an RRSIG or NSEC query into
FORMERR inside rctx_answer_cname().  That is redundant -- every caller
already copes with a DNS_R_CNAME or DNS_R_DNAME result -- and it is the
wrong layer, because the resolver cannot tell a legitimate alias from a
broken one.  Drop it; a CNAME for one of these types now flows back as
an ordinary alias.

The case that must be stopped lives in the validator.  While proving an
unsigned CNAME insecure, proveunsecure() fetches the DS for the CNAME's
own name; because fetches are shared, that fetch re-enters and stalls on
the in-flight fetch the validator is waiting for, deadlocking for about
twelve seconds (GL#5878).  Unlike the resolver, the validator knows it
is validating an alias, so check_chaining() now aborts a fetch whose
name matches the chaining rdataset's owner: it cannot advance the chain
and would only self-join.

(cherry picked from commit d0c6219d66e9b5742d0d7d8cb66752828880d74f)

3 days ago[9.20] fix: dev: Refine resolver fetch loop detection
Ondřej Surý [Sat, 30 May 2026 03:58:58 +0000 (05:58 +0200)] 
[9.20] fix: dev: Refine resolver fetch loop detection

The resolver's fetch loop detection now triggers only when a new
fetch would join an already in-flight fetch that is also one of
its own ancestors, which is the actual loop condition.  Previously
the check ran against the original request before the fetch was
set up.

Backport of MR !12145

Merge branch 'backport-ondrej/improve-resolver-loop-detection-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12146

4 days agoDetect resolver fetch loops only when joining an in-flight fetch 12146/head
Ondřej Surý [Fri, 29 May 2026 14:36:45 +0000 (16:36 +0200)] 
Detect resolver fetch loops only when joining an in-flight fetch

dns_resolver_createfetch() guarded against fetch loops by comparing the
raw request name/type/domain before any fetch context existed. Move the
check after the context is obtained and run it against the context
itself, and only when we joined an already in-flight context
(!new_fctx) that is also an ancestor in the parent chain. That is the
real loop condition: the new fetch would block waiting on a fetch that
is itself waiting on us. A newly created context waits on nothing, so it
proceeds, bounded by the fetch depth limit and the complementary ADB
loop detection.

(cherry picked from commit 0e04671b6508f9ff3cec85114300c136888a3852)

5 days ago[9.20] fix: test: Fix pytest-xdist loadscope splitting on "::" in params
Michal Nowak [Thu, 28 May 2026 16:49:04 +0000 (18:49 +0200)] 
[9.20] fix: test: Fix pytest-xdist loadscope splitting on "::" in params

LoadScopeScheduling._split_scope() uses rsplit("::", 1) to
extract the test file scope from a node ID.  When parametrized
test values contain "::" (IPv6 addresses like "cafe:cafe::cafe"
or "::1"), the split lands inside the parameter instead of at
the .py:: boundary.  This creates spurious scopes that get
assigned to different workers, each triggering a full fixture
setup (starting named instances).

Override _split_scope() in conftest.py to split on ".py::"
which is unambiguous.

Six tests in synthrecord/tests_synthrecord.py are affected.
A verification script is included in util/.

Assisted-by: Claude:claude-opus-4-7
Backport of MR !12103

Merge branch 'backport-mnowak/fix-xdist-loadscope-split-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12137

5 days agoFix pytest-xdist loadscope splitting on "::" in params 12137/head
Michal Nowak [Tue, 26 May 2026 16:09:21 +0000 (16:09 +0000)] 
Fix pytest-xdist loadscope splitting on "::" in params

LoadScopeScheduling._split_scope() uses rsplit("::", 1) to
extract the test file scope from a node ID.  When parametrized
test values contain "::" (IPv6 addresses like "cafe:cafe::cafe"
or "::1"), the split lands inside the parameter instead of at
the .py:: boundary.  This creates spurious scopes that get
assigned to different workers, each triggering a full fixture
setup (starting named instances).

Override _split_scope() in conftest.py to split on ".py::"
which is unambiguous.

Six tests in synthrecord/tests_synthrecord.py are affected.
A verification script is included in util/.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit 4eb893020e4f285fbc82021a01d49b110d79c30c)

5 days ago[9.20] chg: test: Prioritize the 10 slowest system test scopes
Michal Nowak [Thu, 28 May 2026 15:38:21 +0000 (17:38 +0200)] 
[9.20] chg: test: Prioritize the 10 slowest system test scopes

Update PRIORITY_TESTS with the 10 longest-running test
scopes measured from CI (job 7468217).  These get scheduled
first so that with --dist=loadscope they land on separate
workers instead of piling up at the end.

Also fix "serve-stale/" to "serve_stale/" to match the
actual directory name, and add a startup check that fails
if any PRIORITY_TESTS entry does not match an existing
directory.

Assisted-by: Claude:claude-opus-4-7
Backport of MR !12104

Merge branch 'backport-mnowak/prioritize-slow-system-tests-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12134

5 days agoPrioritize the 10 slowest system test scopes 12134/head
Michal Nowak [Tue, 26 May 2026 16:40:13 +0000 (16:40 +0000)] 
Prioritize the 10 slowest system test scopes

Update PRIORITY_TESTS with the 10 longest-running test
scopes measured from CI (job 7468217).  These get scheduled
first so that with --dist=loadscope they land on separate
workers instead of piling up at the end.

Also fix "serve-stale/" to "serve_stale/" to match the
actual directory name, and add a startup check that fails
if any PRIORITY_TESTS entry does not match an existing
directory.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit 5e3c0b846303ea33d870b6e614836a99717e9f22)

5 days ago[9.20] fix: ci: Drop ccache support from CI
Michal Nowak [Thu, 28 May 2026 13:46:21 +0000 (15:46 +0200)] 
[9.20] fix: ci: Drop ccache support from CI

The population of the compile cache is so slow, that a BIND 9 build can
take 20 minutes.

Assisted-by: Claude:claude-opus-4-7
Backport of MR !12127

Merge branch 'backport-mnowak/drop-ccache-support-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12128

5 days agoDrop ccache support from CI 12128/head
Michal Nowak [Thu, 28 May 2026 10:24:14 +0000 (12:24 +0200)] 
Drop ccache support from CI

The population of the compile cache is so slow, that a BIND 9 build can
take 20 minutes.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit cbc8664567e374dc305c88f8ffd55c8597e14155)

5 days ago[9.20] new: test: Add isctest.mark.with_developer pytest mark
Nicki Křížek [Thu, 28 May 2026 13:32:23 +0000 (15:32 +0200)] 
[9.20] new: test: Add isctest.mark.with_developer pytest mark

Backport of MR !12118

Merge branch 'backport-nicki/systest-with-developer-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12125

5 days agoAdd isctest.mark.with_developer pytest mark 12125/head
Nicki Křížek [Wed, 27 May 2026 15:28:07 +0000 (15:28 +0000)] 
Add isctest.mark.with_developer pytest mark

Tests that exercise instrumentation, log output, or other behaviour
that only exists in developer builds (the gcc:almalinux9:amd64 CI job
sets -Ddeveloper=disabled to guard against such accidental coupling)
can now decorate themselves with isctest.mark.with_developer to skip on
non-developer builds.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit f957b630101a7a13e72e51501b7e9fca6388df9f)

5 days agoAdd FEATURE_DEVELOPER variable to isctest
Nicki Křížek [Wed, 27 May 2026 15:27:17 +0000 (15:27 +0000)] 
Add FEATURE_DEVELOPER variable to isctest

System tests can check FEATURE_DEVELOPER in the environment, but the
recommended pattern is the with_developer pytest marker added next.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit 950dc9945c3c81f0dd3f2b52bdfd3b93a0f778cd)

5 days agoAdd --enable-developer probe to feature-test
Nicki Křížek [Wed, 27 May 2026 15:26:47 +0000 (15:26 +0000)] 
Add --enable-developer probe to feature-test

System tests that depend on log output, instrumentation, or other
behaviour only present in developer builds can use this probe to detect
the build configuration at runtime.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit 113980d4b05aa4f3632e25d102fb82b2317404b8)

5 days agoDefine DEVELOPER_MODE in developer-mode builds
Nicki Křížek [Thu, 28 May 2026 11:56:04 +0000 (11:56 +0000)] 
Define DEVELOPER_MODE in developer-mode builds

So that build-time consumers (e.g. feature-test) can detect developer
mode through a single dedicated symbol rather than proxying through
implementation-detail defines like ISC_MEM_TRACKLINES.

9.20 has no meson build; add the define alongside the other developer
defines on the existing STD_CPPFLAGS line in configure.ac.  Originally
landed on main in commit d9aeee7901 ("Define DEVELOPER_MODE in
developer-mode builds").

Assisted-by: Claude:claude-opus-4-7
5 days ago[9.20] chg: test: Improve pytest jinja2 templates
Nicki Křížek [Thu, 28 May 2026 12:14:33 +0000 (14:14 +0200)] 
[9.20] chg: test: Improve pytest jinja2 templates

- Enable rendering ns-specific data in jinja2 templates using the `ns` varible.
- Add common zone/config snippets an `_common` templates.
- Allow jinja2 imports from `_common`.
- Improve the `_common/controls.conf.j2` snippet to render ns-specific IP rather than hardocded one.

Backport of MR !11805

Merge branch 'backport-nicki/pytest-template-improvements-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12116

5 days agoRestrict cross-test jinja2 includes to _common/ 12116/head
Nicki Křížek [Wed, 20 May 2026 14:34:02 +0000 (14:34 +0000)] 
Restrict cross-test jinja2 includes to _common/

The previous loader was a FileSystemLoader rooted at $srcdir, which
allowed any system test to include any other test's templates -- a
wider scope than intended. Every existing cross-test include already
targets _common/, so make that the only path.

ChoiceLoader + PrefixLoader keeps the existing '_common/foo.j2' path
convention working without changes to call sites. The '_common/'
prefix is deliberately kept rather than dropping it by rooting the
FileSystemLoader at _common/ directly:

  - It signals at the include site that the file is a shared
    template, not a sibling of the current test; readers don't need
    to know the loader configuration to understand where the file
    lives.
  - It prevents shadowing: a test-local 'controls.conf.j2' would
    not collide with the shared one, and the unqualified name keeps
    its test-local meaning.
  - It makes the dependency greppable: 'grep -rl _common/'
    identifies every test that consumes shared snippets.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit c2c2be9be0481eb8966884bb33c0153e58e1800f)

5 days agoCreate common templates for test zones
Nicki Křížek [Fri, 20 Mar 2026 09:09:55 +0000 (10:09 +0100)] 
Create common templates for test zones

Add commonly used zone-related data (config snippet and zone file
snippets) as templates which can be reused by filling in different data.

Adjust the isctest.template.Zone to use filepath argument rather than
filename for clarity.

(cherry picked from commit 317cd1277910a2c680a043434ac7f9fa6d8df131)

5 days agoInclude controls.conf as jinja2 template
Nicki Křížek [Wed, 1 Apr 2026 16:25:28 +0000 (18:25 +0200)] 
Include controls.conf as jinja2 template

Rather than using named.conf include, render the controls directly into
the config using jinja2 template include.

(cherry picked from commit f4ca352bc88ab1c766fb4862de118e494fddfb5b)

5 days agoAdd _common dir to jinja2 template loader
Nicki Křížek [Tue, 7 Apr 2026 12:43:11 +0000 (14:43 +0200)] 
Add _common dir to jinja2 template loader

This allows include of template snippets from _common/ directory.

(cherry picked from commit e34c3252d973ca6e1eb62b66ca74599568e8d33c)

5 days agoReduce whitespace in jinja2 templates
Nicki Křížek [Tue, 7 Apr 2026 12:40:33 +0000 (14:40 +0200)] 
Reduce whitespace in jinja2 templates

Omit extra newlines when combining and including templates.

Adjust the xfer/ns8/small.db.j2 so it doesn't trim the endline twice
(as that would join the two subsequent records on the same line).

(cherry picked from commit 4f8e3774bba0f63d98e651ef044d6703792921a2)

5 days agoAllow instantiating template dataclasses in jinja2 templates
Nicki Křížek [Wed, 1 Apr 2026 17:42:38 +0000 (19:42 +0200)] 
Allow instantiating template dataclasses in jinja2 templates

In some cases, the template data might need to be set directly in the
jinja2 templates using `{% set %}`. Expose the template dataclasses to
the templates so we can use these existing classes, rather than creating
ad-hoc data containers.

(cherry picked from commit dddb0673517ccbba50941d91dec3c55e1f7f52b4)

5 days agoAdd a directory-specific nameserver data to templates
Nicki Křížek [Wed, 1 Apr 2026 15:10:08 +0000 (17:10 +0200)] 
Add a directory-specific nameserver data to templates

If a template is being rendered into a directory that represents a
nameserver (e.g. "ns1"), include a nameserver-specific information in
the data - variable called "ns" which has information about the
nameserver this file belongs to.

Ensure the "ns" variable is only exposed to the template when rendered,
without affecting the environment variables (always work with a copy of
the env_vars).

(cherry picked from commit aa435b2e036a668d87579495cae1e31524a97f31)

5 days agoImprove isctest.template dataclasses' defaults
Nicki Křížek [Wed, 1 Apr 2026 15:04:22 +0000 (17:04 +0200)] 
Improve isctest.template dataclasses' defaults

Extend the Nameserver to generate the default IPv4/IPv6 values, add NSX
values for the predefined nameservers (there are 11 of them, as per
bin/tests/system/ifconfig.sh.in max value). Add the missing ns11
fixture.

Extend the Zone to derive the zone filename by default, unless
specified.

Adjust the existing uses of these classes to utilize the simplified
defaults.

(cherry picked from commit fa3a59e70c97a24090a24d46135f672a004bf9ca)

5 days ago[9.20] rem: dev: Remove useless PR-Agent jobs
Ondřej Surý [Thu, 28 May 2026 09:28:27 +0000 (11:28 +0200)] 
[9.20] rem: dev: Remove useless PR-Agent jobs

The experiment was a failure, the PR-Agent doesn't send a full context
to the AI Agents and the results are abysmal because of that.

Backport of MR !12119

Merge branch 'backport-ondrej/remove-useless-pr-agent-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12120

5 days agoRemove useless PR-Agent jobs 12120/head
Ondřej Surý [Thu, 28 May 2026 07:35:13 +0000 (09:35 +0200)] 
Remove useless PR-Agent jobs

The experiment was a failure, the PR-Agent doesn't send a full context
to the AI Agents and the results are abysmal because of that.

(cherry picked from commit d3dbcd21df019bcf75b70837fcc2b5cec7f48cca)

5 days ago[9.20] chg: usr: named could crash on concurrent TKEY DELETE for the same key
Ondřej Surý [Thu, 28 May 2026 09:05:57 +0000 (11:05 +0200)] 
[9.20] chg: usr: named could crash on concurrent TKEY DELETE for the same key

On a server configured with tkey-gssapi-keytab (or tkey-gssapi-credential),
an authenticated peer could crash named by sending two TKEY DELETE requests
for the same dynamic key in rapid succession.  This has been fixed.

Closes #6001

Backport of MR !12041

Merge branch 'backport-6001-tsig-tkey-delete-uaf-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12042

5 days agoFix use-after-free in concurrent dns_tsigkey_delete() 12042/head
Ondřej Surý [Sun, 17 May 2026 15:01:54 +0000 (17:01 +0200)] 
Fix use-after-free in concurrent dns_tsigkey_delete()

Two TSIG-authenticated TKEY DELETE queries for the same dynamic key,
arriving on different worker loops, could each enter
dns_tsigkey_delete() and cause over-decrementing the key refcount.

This has been fixed by making dns_tsigkey_delete() idempotent.

(cherry picked from commit 5c8dcd4419693320817e44ad144002cd7c648acc)

5 days ago[9.20] fix: usr: The resolver now removes other RRsets at the same name when caching...
Matthijs Mekking [Thu, 28 May 2026 08:49:48 +0000 (08:49 +0000)] 
[9.20] fix: usr: The resolver now removes other RRsets at the same name when caching a CNAME

When an RRset is in stale cache, and the authoritative server changes the record type to CNAME, the resolver fails to refresh the stale cache. This has been fixed.

Closes #5302

Backport of MR !11758

Merge branch 'backport-5302-serve-stale-cname-to-a-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12040

5 days agoWhen caching names, check for CNAME RRsets 12040/head
Matthijs Mekking [Wed, 27 May 2026 09:46:03 +0000 (11:46 +0200)] 
When caching names, check for CNAME RRsets

Matthijs Mekking authored 2 months ago
CNAME and other record types cannot coexist. DNSSEC records are the
exceptions to this rule.

If the answer contains a name with a CNAME, remove existing RRsets at
the same name from the cache.

If the answer contains a name without a CNAME, remove the CNAME RRset
at the same name from the cache.

(manually picked from commit 69a560fff189f3295a4501a51676ad7e7d0479e3)

5 days agoAdd serve-stale test case for CNAME to A
Matthijs Mekking [Fri, 27 Mar 2026 09:32:48 +0000 (10:32 +0100)] 
Add serve-stale test case for CNAME to A

Add a serve-stale system test case where the authority changes a
CNAME RRset to A (at cname2.stale.test). The CNAME that is in the
cache is stale and should be refreshed. The target A record (at
a2.stale.test) has a longer TTL and is also still in the cache. The
next query should return the refreshed A RRset to the client.

Then the authority changes back the A RRset to CNAME. The A RRset
has become stale and should be refreshed. The next query should
return the refreshed CNAME RRset plus the already cached
a2.stale.test A record.

This test requires ns1 to allow dynamic updates to stale.test, and
prefetch to be disabled. The latter is to ensure the record is not
prefetched, but only refreshed when stale (and logs the expected
"an attempt to refresh the RRset" messages).

(cherry picked from commit 4ee526cb6d3c34ea2736154e15dbc19211e08321)

5 days agoRemove duplicate check in serve-stale test
Matthijs Mekking [Thu, 1 May 2025 09:43:21 +0000 (11:43 +0200)] 
Remove duplicate check in serve-stale test

(cherry picked from commit c95128ed47e62951b464d36149f84aa32d1a4f68)

5 days ago[9.20] fix: usr: Reject RRSIG records covering meta-types
Ondřej Surý [Thu, 28 May 2026 07:52:19 +0000 (09:52 +0200)] 
[9.20] fix: usr: Reject RRSIG records covering meta-types

A recursive resolver could accept and cache an RRSIG record whose
Type-Covered field names a meta-type (ANY, AXFR, IXFR, MAILA, MAILB),
even though no real RRset of those types ever exists. Such records
are now rejected by the DNS message parser.

Closes #6002

Backport of MR !12048

Merge branch 'backport-6002-reject-rrsig-covering-meta-types-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12051

5 days agoReject malformed RRSIG records 12051/head
Ondřej Surý [Mon, 18 May 2026 17:27:54 +0000 (19:27 +0200)] 
Reject malformed RRSIG records

A signature cannot cover a meta-type (NONE, ANY, AXFR, IXFR, MAILB,
MAILA, OPT, TSIG, TKEY); previously such records were cached by the
recursive resolver and collided with negative-cache entries on the
same owner name, corrupting the QP-trie cache.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit c28ba9c3c6f4274a3626cd300a2590a1593ab2f6)

6 days ago[9.20] fix: usr: Fix crash on badly configured secondary signer
Matthijs Mekking [Wed, 27 May 2026 14:01:27 +0000 (14:01 +0000)] 
[9.20] fix: usr: Fix crash on badly configured secondary signer

A badly configured secondary signer that was missing the 'file' entry caused the server to crash, rather than to reject the configuration. This has been fixed.

Closes #5993

Backport of MR !12045

Merge branch 'backport-5993-fix-bump-in-the-wire-crash-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12112

6 days agoFix startup crash on bump in the wire signer 12112/head
Matthijs Mekking [Mon, 18 May 2026 13:15:39 +0000 (15:15 +0200)] 
Fix startup crash on bump in the wire signer

A secondary server that is configured as a bump in the wire signer
with inline-signing implicitly enabled via dnssec-policy requires
a 'file' entry.

(cherry picked from commit 77649ea8e20987a5a45e9027f0947d2451765566)

6 days agoCheck conf dnssec-policy inline-signing secondary
Matthijs Mekking [Mon, 18 May 2026 13:13:38 +0000 (15:13 +0200)] 
Check conf dnssec-policy inline-signing secondary

Add a variant of checking configuration where inline-signing is
enabled on the secondary, requiring the 'file' entry. This time,
inline-signing is implicitly enabled via dnssec-policy.

(cherry picked from commit 43bbfbeb3c27e5e1402237ac6a90c2ade6ed2cb5)

6 days ago[9.20] fix: doc: Ignore gitlab.gnome.org links in Sphinx linkcheck
Michal Nowak [Wed, 27 May 2026 09:42:24 +0000 (11:42 +0200)] 
[9.20] fix: doc: Ignore gitlab.gnome.org links in Sphinx linkcheck

Backport of MR !12109

Merge branch 'backport-mnowak/linkcheck-fix-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12110

6 days agoIgnore gitlab.gnome.org links in Sphinx linkcheck 12110/head
Michal Nowak [Wed, 27 May 2026 08:51:46 +0000 (10:51 +0200)] 
Ignore gitlab.gnome.org links in Sphinx linkcheck

GNOME GitLab returns HTTP 406 to Sphinx's linkcheck requests, the
same behavior already worked around for gitlab.isc.org.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit 2850dc9d7179418700d72cc21073796cd5067c5d)

6 days ago[9.20] chg: ci: Add rule for stable tags in CI and use it in the update-stable-tag job
Andoni Duarte [Wed, 27 May 2026 08:32:32 +0000 (08:32 +0000)] 
[9.20] chg: ci: Add rule for stable tags in CI and use it in the update-stable-tag job

Add a rule to match open source stable tags in CI and apply it to the
update-stable-tag job.

Backport of MR !11646

Merge branch 'backport-andoni/show-update-stable-tag-job-in-stable-versions-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12107

6 days agoAdd rule for the stable tags in CI and use for job update-stable-tag 12107/head
Andoni Duarte Pintado [Mon, 9 Mar 2026 16:30:09 +0000 (17:30 +0100)] 
Add rule for the stable tags in CI and use for job update-stable-tag

The update-stable-tag job should only be run for the stable tag, which
is used by Read the Docs to build the docs for the "stable" version.

A new rule called rule_tag_open_source_stable is introduced, in order to
prevent the job from appearing in the pipeline for non-stable versions.
Having this rule in YAML is necessary, because if it were in the script
itself, the job would show up in the pipeline.

Besides, the new rule allows other jobs to be run only for the stable
tag in the future, without modifying their internal logic.

The CI variable STABLE_VERSION contains a regular expression in
Gitlab CI sense[1]: it uses the RE2 syntax[2] and must be enclosed by
slashes (i.e. /.../). It must be updated every time the minor version
is changed: releasing v9.22 will require changing STABLE_VERSION from
"/v9.20/" to "/v9.22/".

The variable is imported from common Gitlab CI YAML in the project
isc-projects/bind9-qa, so as to maintain it in a central place.

[1]: https://docs.gitlab.com/ci/jobs/job_rules/#compare-a-variable-to-a-regular-expression
[2]: https://github.com/google/re2/wiki/Syntax

(cherry picked from commit 38e80f542e93dc7baa2558e856a10e0c521e112c)

6 days agoInclude common Gitlab CI YAML from isc-projects/bind9-qa
Andoni Duarte Pintado [Fri, 22 May 2026 15:38:40 +0000 (17:38 +0200)] 
Include common Gitlab CI YAML from isc-projects/bind9-qa

The template file .gitlab-ci-common.yml is to be used across ISC
projects, while it is maintained in the isc-projects/bind9-qa project.

(cherry picked from commit 1c31e6fea91f72c3282b47400d51b00aed5a9e15)

7 days ago[9.20] chg: ci: Run unit tests with PKCS#11-aware OpenSSL
Michal Nowak [Tue, 26 May 2026 16:20:14 +0000 (18:20 +0200)] 
[9.20] chg: ci: Run unit tests with PKCS#11-aware OpenSSL

Closes isc-projects/bind9#4958

Closes isc-projects/bind9#4957

Backport of MR !9543

Merge branch 'backport-mnowak/pkcs11-aware-unit-gcc-ossl3-amd64-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12099

7 days agoCall tzset() after setenv("TZ", ...) in unit tests 12099/head
Michal Nowak [Thu, 14 May 2026 12:28:06 +0000 (12:28 +0000)] 
Call tzset() after setenv("TZ", ...) in unit tests

POSIX does not require localtime_r() to behave as if tzset() was called,
so the TZ environment change isn't picked up if some library has already
primed libc's tz cache.  Loading pkcs11-provider during OpenSSL init
does exactly that, causing the time and dnstap cmocka tests to format
timestamps in UTC instead of the requested zone.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit c14f7881f232e3dfb4180843dc2672a15d3bbfa6)

7 days agoRun unit tests with PKCS#11-aware OpenSSL
Michal Nowak [Mon, 23 Sep 2024 18:15:05 +0000 (20:15 +0200)] 
Run unit tests with PKCS#11-aware OpenSSL

(cherry picked from commit 27babd5fa9fc04c3d3c9f5d6ad0c9cd7b487cade)

7 days ago[9.20] fix: test: Handle large query IDs in xfer/ans5 properly
Štěpán Balážik [Tue, 26 May 2026 13:50:38 +0000 (13:50 +0000)] 
[9.20] fix: test: Handle large query IDs in xfer/ans5 properly

Previously, the server would crash if it received a query with an ID
close to 65535 in the badmessageid case, as adding 50 to it would not
fit in uint16.

This was an oversight in porting it from Perl to Python in
f9ed3650acdc2c5b38d8b36729b045ca63f983ef.

Fixes #6025.

Backport of MR !12097

Merge branch 'backport-stepan/fix-xfer-large-qid-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12098

7 days agoHandle large query IDs in xfer/ans5 properly 12098/head
Štěpán Balážik [Tue, 26 May 2026 12:57:47 +0000 (14:57 +0200)] 
Handle large query IDs in xfer/ans5 properly

Previously, the server would crash if it received a query with an ID
close to 65535 in the badmessageid case, as adding 50 to it would not
fit in uint16.

This was an oversight in porting it from Perl to Python in
f9ed3650acdc2c5b38d8b36729b045ca63f983ef.

(cherry picked from commit e0ef63532f82467d7e59e07e5531347ca6982040)

8 days ago[9.20] fix: nil: Fix mypy var-annotated error on FEATURE_VARS
Nicki Křížek [Mon, 25 May 2026 13:57:47 +0000 (15:57 +0200)] 
[9.20] fix: nil: Fix mypy var-annotated error on FEATURE_VARS

Mypy reports 'Need type annotation for "FEATURE_VARS"'; init_features()
populates it with str->str entries.

Assisted-by: Claude:claude-opus-4-7
Backport of MR !12086

Merge branch 'backport-nicki/fix-isctest-vars-mypy-annotation-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12088

8 days agoFix mypy var-annotated error on FEATURE_VARS 12088/head
Nicki Křížek [Mon, 25 May 2026 12:23:03 +0000 (12:23 +0000)] 
Fix mypy var-annotated error on FEATURE_VARS

Mypy reports 'Need type annotation for "FEATURE_VARS"'; init_features()
populates it with str->str entries.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit 81c110512526315adca459dd6ed53f0a7d4e8294)

11 days ago[9.20] new: ci: Add Debian "trixie" (386)
Michal Nowak [Fri, 22 May 2026 18:22:52 +0000 (20:22 +0200)] 
[9.20] new: ci: Add Debian "trixie" (386)

Backport of MR !12079

Merge branch 'backport-mnowak/add-debian-trixie-386-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12082

11 days agoTolerate dnspython post-2038 timestamp overflow on 32-bit 12082/head
Michal Nowak [Thu, 21 May 2026 07:31:15 +0000 (07:31 +0000)] 
Tolerate dnspython post-2038 timestamp overflow on 32-bit

dnspython's RRSIG.to_text() converts the signature inception/expiration
fields by calling time.gmtime(), which on 32-bit platforms raises
OverflowError for values past 2038-01-19 (INT32_MAX). Several DNSSEC
test fixtures use far-future expirations: the precomputed RRSIGs in
the dnssec test's rsasha1.example.db.in zone expire in 2093, ans4 of
the chain test hardcodes 2090, and ans10 of the dnssec test uses
2**32-1 (year 2106). Whenever a response carrying such an RRSIG is
formatted with str()/to_text() the overflow propagates out and either
fails the test (when triggered in isctest.query's debug logging) or
kills the asyncserver-based ans* server (when triggered in its
response logger), which in turn cascades into "Failed to stop
servers" teardown errors and SERVFAIL responses for subsequent tests.

Wrap the to_text() calls in isctest/query.py and the str(response)
call in asyncserver's _log_response() with try/except OverflowError,
falling back to a placeholder message. The conversions are only used
for debug logging, so losing the human-readable form there does not
affect what the tests actually validate.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit 968ccdeeda3f258d00b01064bbfd84d612079a11)

11 days agoAdd Debian "trixie" (386)
Michal Nowak [Thu, 21 May 2026 04:32:23 +0000 (06:32 +0200)] 
Add Debian "trixie" (386)

(cherry picked from commit b076c43b1c8bb9b32f5c4d049acfa0b859f4c3eb)

12 days agofix: doc: Remove 9.21-only release note from May 2026 release notes
Andoni Duarte [Thu, 21 May 2026 13:52:33 +0000 (13:52 +0000)] 
fix: doc: Remove 9.21-only release note from May 2026 release notes

Issue #5826 has two different fixes: one released in April 2026 that
applies to 9.20 and 9.18, and another released in May 2026 that applies
to 9.21. The 9.21 release note was mistakenly included in the release
notes for 9.20 and 9.18. This commit removes it.

Merge branch 'andoni/fix-doc-duplicate-note-5826' into 'bind-9.20'

See merge request isc-projects/bind9!12067

12 days agoRemove 9.21-only release note from May 2026 release notes 12067/head
Andoni Duarte Pintado [Thu, 21 May 2026 07:14:51 +0000 (09:14 +0200)] 
Remove 9.21-only release note from May 2026 release notes

Issue #5826 has two different fixes: one released in April 2026 that
applies to 9.20 and 9.18, and another released in May 2026 that applies
to 9.21. The 9.21 release note was mistakenly included in the release
notes for 9.20 and 9.18. This commit removes it.

12 days ago[9.20] fix: usr: Clear REDIRECT flag when it isn't needed
Michał Kępień [Thu, 21 May 2026 13:11:32 +0000 (15:11 +0200)] 
[9.20] fix: usr: Clear REDIRECT flag when it isn't needed

When `nxdomain-redirect` is in use, and a recursive query is used to get the redirected answer, a flag is set to distinguish it from a normal recursive response. Previously, that flag was left set afterward, which could trigger an assertion if a normal recursive query was sent later on behalf of the same client: for example, because the `filter-aaaa` plugin was in use.  This has been fixed.

Closes #5936

Backport of MR !12073

Merge branch 'backport-5936-clear-redirect-flag-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12076

12 days agoClear REDIRECT flag when it isn't needed 12076/head
Evan Hunt [Tue, 5 May 2026 00:05:11 +0000 (17:05 -0700)] 
Clear REDIRECT flag when it isn't needed

The NS_QUERYATTR_REDIRECT flag is set when processing a recursive
NXDOMAIN redirection lookup, so that if that lookup also returns
NXDOMAIN we don't end up looping.

Previously, the flag was left active after use, but if the
same client triggered a subsequent recursive lookup (for example,
in the filter-aaaa plugin), then the wrong branch could be reached
in query_resume(), potentially leading to an assertion failure.  This
has been fixed.

(cherry picked from commit 3ff00183086f304c71076a069376e37692a7c9ff)

12 days ago[9.20] fix: dev: Validate nsec3hash arguments instead of relying on atoi()
Michal Nowak [Thu, 21 May 2026 12:50:13 +0000 (14:50 +0200)] 
[9.20] fix: dev: Validate nsec3hash arguments instead of relying on atoi()

The nsec3hash tool parsed its algorithm, flags, and iterations
arguments with atoi(), then range-checked the result. For values
that overflow int during digit-by-digit accumulation, atoi() is
undefined; in practice on musl libc the modular wrap leaves
n == 0, which silently passes the "iterations > 0xffffU" check.
On Alpine Linux this made nsec3hash succeed with iterations
treated as 0 for inputs like 4294967296 (2^32).

The latent bug only surfaced when the recent image rebuild pulled
in Hypothesis 6.152.9 (2026-05-19), which unified the distribution
used for bounded and unbounded integers() strategies. The new
smoother distribution explores the 2^32 boundary on unbounded
ranges like integers(min_value=65536); earlier versions did not
reach there, so test_nsec3hash_too_many_iterations only started
failing on Alpine after the image refresh.

Replace the three atoi() calls with isc_parse_uint8 /
isc_parse_uint16, which uniformly reject overflow, trailing
garbage, leading sign, and non-numeric input across libc
implementations. As a side effect, error messages now include
the offending argument and a specific reason ("out of range" vs
"not a valid number").

Assisted-by: Claude:claude-opus-4-7
Closes #6013

Backport of MR !12062

Merge branch 'backport-6013-nsec3hash-iterations-overflow-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12074

12 days agoValidate nsec3hash arguments instead of relying on atoi() 12074/head
Michal Nowak [Wed, 20 May 2026 17:58:41 +0000 (17:58 +0000)] 
Validate nsec3hash arguments instead of relying on atoi()

The nsec3hash tool parsed its algorithm, flags, and iterations
arguments with atoi(), then range-checked the result. For values
that overflow int during digit-by-digit accumulation, atoi() is
undefined; in practice on musl libc the modular wrap leaves
n == 0, which silently passes the "iterations > 0xffffU" check.
On Alpine Linux this made nsec3hash succeed with iterations
treated as 0 for inputs like 4294967296 (2^32).

The latent bug only surfaced when the recent image rebuild pulled
in Hypothesis 6.152.9 (2026-05-19), which unified the distribution
used for bounded and unbounded integers() strategies. The new
smoother distribution explores the 2^32 boundary on unbounded
ranges like integers(min_value=65536); earlier versions did not
reach there, so test_nsec3hash_too_many_iterations only started
failing on Alpine after the image refresh.

Replace the three atoi() calls with isc_parse_uint8 /
isc_parse_uint16, which uniformly reject overflow, trailing
garbage, leading sign, and non-numeric input across libc
implementations. As a side effect, error messages now include
the offending argument and a specific reason ("out of range" vs
"not a valid number").

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit e13302a6bc9b196564b5e7afe703fae24311ceeb)

12 days ago[9.20] chg: test: Clean up custom server code in the "resend_loop" system test
Michał Kępień [Thu, 21 May 2026 10:42:36 +0000 (12:42 +0200)] 
[9.20] chg: test: Clean up custom server code in the "resend_loop" system test

Apply assorted cleanups to `bin/tests/system/resend_loop/ans3/ans.py`.

Backport of MR !12063

Merge branch 'backport-michal/resend_loop-test-ans3-cleanup-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12071

12 days agoFollow common naming and coding conventions 12071/head
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Follow common naming and coding conventions

Make the handlers defined in bin/tests/system/resend_loop/ans3/ans.py
follow canonical naming conventions used in other system tests.  Keep
all server initialization code in the main() function.

(cherry picked from commit c5a30a722098f23c1fd3a7cd53de4d5164941dcd)

12 days agoTurn _get_cookie() into a method
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Turn _get_cookie() into a method

Since the _get_cookie() function is only used by the CookieHandler
class, make the former a method of the latter to keep related logic
close in the source code.

(cherry picked from commit c3839e830cfa5a8cd3ef4bdd3e5db7c0c0ee01dc)

12 days agoTweak the _get_cookie() method
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Tweak the _get_cookie() method

The "len(cookie.server) == 0" condition is superfluous for the
"resend_loop" system test, so remove it.  Add a return type annotation
to the _get_cookie() function.

(cherry picked from commit 5fa2bd7e53e1d6ee6ebcc04b0bf5f303d3e85570)

12 days agoRemove workarounds for dnspython < 2.7.0
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Remove workarounds for dnspython < 2.7.0

dnspython 2.7.0 is now required to run the BIND 9 system test suite.
Drop the workarounds for older dnspython versions as they are now
redundant.

(cherry picked from commit c9ceb191e8e45c461b8f03e853bef0d9f0eb403f)

12 days agoFix flawed response logic for COOKIE-less queries
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Fix flawed response logic for COOKIE-less queries

The "yield" keyword does not cause a function to return.  By design,
get_responses() may yield multiple DNS responses in a single call.  As
currently implemented, CookieHandler.get_responses() sends two responses
to each client query that does not contain a COOKIE option.  Make the
logic in that method consistent with code comments by only sending one
response to every query - either SERVFAIL or BADCOOKIE, never both.

(cherry picked from commit de42425bbd6f51edf2abc0e57d4d3e3dd2e92159)

12 days agoDrop redundant uses of authoritative=True
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Drop redundant uses of authoritative=True

The ans3 custom server instance is created with default_aa=True.  Do not
pass the authoritative=True keyword argument to the DnsResponseSend
constructor in CookieHandler.get_responses() as it is redundant.

(cherry picked from commit c61539279d4ecc04f9816b2ae62d63ed8a143c19)

12 days agoDrop unnecessary qctx.prepare_new_response() call
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Drop unnecessary qctx.prepare_new_response() call

The ans3 custom server does not have any zones defined, so the responses
passed to its handlers by core isctest.asyncserver code are guaranteed
to be empty.  Remove a call to qctx.prepare_new_response() from
CookieHandler.get_responses() as it is redundant.

(cherry picked from commit 802c03313f99f622b979aa3bb548e3a4eb4340d3)

12 days agoRemove NoErrorHandler
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Remove NoErrorHandler

The NoErrorHandler class does not get matched to any query sent by ns4
in the "resend_loop" test.  Remove it as it is redundant.

(cherry picked from commit a296bcf587eb78b40e15cff0e8f4f4a2bd6e99e1)

12 days agoSimplify match criteria for CookieHandler
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Simplify match criteria for CookieHandler

The CookieHandler class handles all traffic for the "example." domain.
Make it a subclass of DomainHandler to simplify its definition.

(cherry picked from commit ba6eee2b80064c459d21bb7a8723bea0a3d208fd)

12 days agoSimplify ./NS query handling
Michał Kępień [Thu, 21 May 2026 10:02:20 +0000 (12:02 +0200)] 
Simplify ./NS query handling

Replace PrimeHandler with a StaticResponseHandler subclass achieving the
same goal.

(cherry picked from commit c0f01b60fdf7c01de84ed28d8942bab28650e27c)

12 days ago[9.20] chg: ci: Various autorebase improvements
Michał Kępień [Thu, 21 May 2026 09:33:24 +0000 (11:33 +0200)] 
[9.20] chg: ci: Various autorebase improvements

  - Rewrite cherry-pick references during autorebases
  - Fix autorebase error reporting
  - Limit post-push pipelines for autorebased branches
  - Only autorebase when there is anything to rebase
  - Conflate missing commit reference notifications
  - Support autorebasing backported security MRs

Backport of MR !12024

Merge branch 'backport-michal/autorebase-improvements-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12069

12 days agoSupport autorebasing backported security MRs 12069/head
Michał Kępień [Thu, 21 May 2026 09:13:30 +0000 (11:13 +0200)] 
Support autorebasing backported security MRs

Autorebasing a backported security fix enables convenient refreshing of
cherry-pick references, which makes it trivial for developers to satisfy
Danger rules just before the merge request is merged.  Add a manual CI
job that is only created for backported merge requests targeting
security-* branches.

(cherry picked from commit dd723d93cbebff4e10d8837645229fb9497fb197)

12 days agoConflate missing commit reference notifications
Michał Kępień [Thu, 21 May 2026 09:13:30 +0000 (11:13 +0200)] 
Conflate missing commit reference notifications

Instead of creating a separate (potentially lengthy) Danger notification
for every missing commit reference in a backport, produce a single
notification with a list of all unreferenced commit hashes.  This makes
Danger output more concise while retaining all the relevant feedback for
the developer.

(cherry picked from commit 086780dcf08ce1279dee6d30c380e6c0446b17af)

12 days agoOnly autorebase when there is anything to rebase
Michał Kępień [Thu, 21 May 2026 09:13:30 +0000 (11:13 +0200)] 
Only autorebase when there is anything to rebase

In an optimistic future, security-* branches will become empty, at least
intermittently.  When that happens, there will be nothing left to rebase
on those branches, so when something gets merged into their base
branches, an autorebase will effectively be a fast-forward.  While the
existing autorebase logic would handle such a case perfectly fine, it is
prudent to avoid creating a test pipeline after pushing such a
fast-forward update as the code revision getting pushed will have
already been tested by other pipelines.  However, the push should still
happen as non-empty downstream autorebased branches may exist and those
will still need to be rebased.  Achieve both of these objectives by
checking early whether there is anything to rebase and pushing the
fast-forwarded version of the branch without setting the AUTOREBASE CI
variable if there is not.

(cherry picked from commit 497f771ae32c9183d02b66d3eafd53839799d016)

12 days agoLimit post-push pipelines for autorebased branches
Michał Kępień [Thu, 21 May 2026 09:13:30 +0000 (11:13 +0200)] 
Limit post-push pipelines for autorebased branches

Current CI job triggering rules cause a full pipeline to be started
after every push to security-* branches.  In this context, "push" means
"branch update", which covers both "git push" invocations and merging a
merge request.  Meanwhile, running a test pipeline is only desired after
a rebase; if a branch is fast-forwarded, it means that a merge request
has been merged into it and a pipeline should have already been run for
that merge request itself.  Limit resource use by only triggering
pipelines for security-* branches when they are pushed to with a "magic"
CI variable that is only set in autorebase jobs.  Leave all the other
triggering rules (for scheduled/manual pipelines) intact.

(cherry picked from commit 5cd870053ef2df8f45e9f3fd7b203dbd1af2daad)

12 days agoFix autorebase error reporting
Michał Kępień [Thu, 21 May 2026 09:13:30 +0000 (11:13 +0200)] 
Fix autorebase error reporting

The logic used for detecting the commit breaking an autorebase does not
work correctly if the offending commit is not the first one applied
during the "reverse rebase".  Fix by using REBASE_HEAD instead of
processing the output of "git status" in a convoluted way.

Furthermore, the approach used for identifying the first offending merge
request in the case of a successful autorebase followed by a failed
build only works correctly if the base branch is not autorebased itself.
Since a solution that would work correctly for a branch autorebased on
top of a branch that only moves forward does not work correctly for a
branch autorebased on top of another autorebased branch and vice versa,
accurately identifying the most likely culprit after a successful
autorebase is a very complicated and brittle task.  Since reporting no
details at all is arguably better than reporting false details, only
produce a minimal error notification if the build fails after a
successful autorebase.

(cherry picked from commit 4c0e93108e936569c0a2e92bdfd65edff0f82c65)

12 days agoRewrite cherry-pick references during autorebases
Michał Kępień [Thu, 21 May 2026 09:13:30 +0000 (11:13 +0200)] 
Rewrite cherry-pick references during autorebases

Use a custom rebasing script instead of "git rebase" to enable rewriting
cherry-pick references during autorebases.

(cherry picked from commit 98c3f339bf9271b3ef7d79aef30d25a6a26e3c92)

12 days ago[9.20] new: ci: Add Fedora 44
Michal Nowak [Thu, 21 May 2026 06:55:22 +0000 (08:55 +0200)] 
[9.20] new: ci: Add Fedora 44

Backport of MR !12064

Merge branch 'backport-mnowak/fedora-44-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!12065

12 days agoAdd Fedora 44 12065/head
Michal Nowak [Thu, 9 Apr 2026 04:52:40 +0000 (06:52 +0200)] 
Add Fedora 44

(cherry picked from commit 175b4f171185c40569103007146e75f37b527cbb)

13 days agoMerge tag 'v9.20.23' into bind-9.20
Andoni Duarte [Wed, 20 May 2026 10:18:28 +0000 (10:18 +0000)] 
Merge tag 'v9.20.23' into bind-9.20