]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
5 days ago[9.18] chg: test: Prioritize the 10 slowest system test scopes bind-9.18
Michal Nowak [Thu, 28 May 2026 15:44:27 +0000 (17:44 +0200)] 
[9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!12135

5 days agoPrioritize the 10 slowest system test scopes 12135/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.18] chg: test: Improve pytest jinja2 templates
Nicki Křížek [Thu, 28 May 2026 14:52:56 +0000 (16:52 +0200)] 
[9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!12117

5 days agoRestrict cross-test jinja2 includes to _common/ 12117/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.18] fix: ci: Drop ccache support from CI
Michal Nowak [Thu, 28 May 2026 13:46:39 +0000 (15:46 +0200)] 
[9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!12129

5 days agoDrop ccache support from CI 12129/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.18] rem: dev: Remove useless PR-Agent jobs
Ondřej Surý [Thu, 28 May 2026 09:28:34 +0000 (11:28 +0200)] 
[9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!12121

5 days agoRemove useless PR-Agent jobs 12121/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)

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

Backport of MR !12109

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

See merge request isc-projects/bind9!12111

6 days agoIgnore gitlab.gnome.org links in Sphinx linkcheck 12111/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)

11 days ago[9.18] new: ci: Add Debian "trixie" (386) 12100/head 12106/head
Michal Nowak [Fri, 22 May 2026 18:03:48 +0000 (20:03 +0200)] 
[9.18] new: ci: Add Debian "trixie" (386)

Backport of MR !12079

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

See merge request isc-projects/bind9!12083

11 days agoTolerate dnspython post-2038 timestamp overflow on 32-bit 12083/head 328202
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 ago[9.18] fix: doc: Remove 9.21-only release note from May 2026 release notes
Andoni Duarte [Thu, 21 May 2026 13:55:47 +0000 (13:55 +0000)] 
[9.18] 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.

Backport of MR !12067

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

See merge request isc-projects/bind9!12078

12 days agoRemove 9.21-only release note from May 2026 release notes 12078/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.

(cherry picked from commit 931bc821d82dfa259bb6ed82706a891f200a0976)

12 days ago[9.18] fix: usr: Clear REDIRECT flag when it isn't needed
Michał Kępień [Thu, 21 May 2026 13:14:29 +0000 (15:14 +0200)] 
[9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!12077

12 days agoClear REDIRECT flag when it isn't needed 12077/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.18] fix: dev: Validate nsec3hash arguments instead of relying on atoi()
Michal Nowak [Thu, 21 May 2026 12:50:59 +0000 (14:50 +0200)] 
[9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!12075

12 days agoValidate nsec3hash arguments instead of relying on atoi() 12075/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.18] chg: test: Clean up custom server code in the "resend_loop" system test
Michał Kępień [Thu, 21 May 2026 10:49:10 +0000 (12:49 +0200)] 
[9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!12072

12 days agoFollow common naming and coding conventions 12072/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.18] chg: ci: Various autorebase improvements
Michał Kępień [Thu, 21 May 2026 09:36:49 +0000 (11:36 +0200)] 
[9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!12070

12 days agoSupport autorebasing backported security MRs 12070/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.18] new: ci: Add Fedora 44
Michal Nowak [Thu, 21 May 2026 06:55:46 +0000 (08:55 +0200)] 
[9.18] new: ci: Add Fedora 44

Backport of MR !12064

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

See merge request isc-projects/bind9!12066

12 days agoAdd Fedora 44 12066/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.18.49' into bind-9.18
Andoni Duarte [Wed, 20 May 2026 10:18:26 +0000 (10:18 +0000)] 
Merge tag 'v9.18.49' into bind-9.18

2 weeks ago[9.18] rem: usr: Remove ineffective TCP fallback after repeated UDP timeouts
Ondřej Surý [Tue, 19 May 2026 11:05:19 +0000 (13:05 +0200)] 
[9.18] rem: usr: Remove ineffective TCP fallback after repeated UDP timeouts

When an authoritative server failed to respond to two consecutive
UDP queries, named marked the next retry as TCP but still sent it
over UDP, producing misleading dnstap records. The ineffective
retry path has been removed; a corrected TCP fallback will be
restored in future BIND 9 versions.

Closes #5529

Backport of MR !12022

Merge branch 'backport-5529-fix-tcp-fallback-after-udp-timeouts-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!12050

2 weeks agoTemporarily remove TCP fallback after UDP timeouts
Ondřej Surý [Thu, 14 May 2026 08:04:20 +0000 (10:04 +0200)] 
Temporarily remove TCP fallback after UDP timeouts

The retry path in resquery_send() that flipped DNS_FETCHOPT_TCP on a
query whose dispatch had already been bound as UDP in fctx_query() had
no effect on the transport actually used, but did leave a stale TCP
bit visible to downstream consumers (dnstap framing, cookie checks,
the AUTHORITY-NS spoofability guard).

The ineffective code has been removed from resquery_send().  The
TCP fallback functionality will be corrected and restored in the next
commit.

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

2 weeks ago[9.18] fix: nil: More changes to PR-Agent CI job
Ondřej Surý [Sun, 17 May 2026 10:22:29 +0000 (12:22 +0200)] 
[9.18] fix: nil: More changes to PR-Agent CI job

Backport of MR !12037

Merge branch 'backport-ondrej/use-claude-opus-4-6-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!12039

2 weeks agoAdd both Claude 4.6 and ChatGPT in two separate job pipelines
Ondřej Surý [Sat, 16 May 2026 16:02:49 +0000 (18:02 +0200)] 
Add both Claude 4.6 and ChatGPT in two separate job pipelines

(cherry picked from commit ee5e933933aeab6ccb41b315f1f6e8e22a8b8cb9)

2 weeks agoAllow failure to not block pipelines for the PR-Agent CI job
Ondřej Surý [Sat, 16 May 2026 15:53:20 +0000 (17:53 +0200)] 
Allow failure to not block pipelines for the PR-Agent CI job

(cherry picked from commit dae0820f804f9dc1d6f35dd193b8659d8286deba)

2 weeks agoChange the PR-Agent configuration to use Claude 4.6
Ondřej Surý [Sat, 16 May 2026 13:59:40 +0000 (15:59 +0200)] 
Change the PR-Agent configuration to use Claude 4.6

(cherry picked from commit 99194aec84d622b2e3318fd53f4bcff4affa3213)

2 weeks ago[9.18] new: dev: Enable PR-Agent reviews on merge requests
Ondřej Surý [Sat, 16 May 2026 13:08:29 +0000 (15:08 +0200)] 
[9.18] new: dev: Enable PR-Agent reviews on merge requests

Adds a CI job that runs PR-Agent against each merge request opened from the canonical repository, posting an automated review and code-improvement suggestions as MR comments. The job is gated to same-project source branches so the OpenAI key and personal access token are not exposed to fork pipelines.

Backport of MR!12032, MR!12033 and MR!12035

Merge branch 'ondrej/add-pr-agent-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!12036

2 weeks agoAdd PR-Agent job to GitLab CI for merge-request review
Ondřej Surý [Sat, 16 May 2026 06:23:50 +0000 (08:23 +0200)] 
Add PR-Agent job to GitLab CI for merge-request review

Run PR-Agent's `review` and `improve` commands against each merge
request from the canonical repository, posting an automated review
and code-improvement suggestions as MR comments. The rule restricts
the job to MRs whose source project matches CI_PROJECT_PATH so the
OpenAI key and GitLab personal access token are never exposed to
fork pipelines.

(cherry picked from commit 07345b25d931eec3342c9c1c57381896fa7de7cb)
(cherry picked from commit 425745426247b24b36d3e6eb36529d6166104140)
(cherry picked from commit 5550fb84ae1f80382c1a4f44edd3888f8391dca9)

2 weeks ago[9.18] fix: test: Fix flaky reclimit test
Ondřej Surý [Fri, 15 May 2026 07:51:18 +0000 (09:51 +0200)] 
[9.18] fix: test: Fix flaky reclimit test

The max-types-per-name cache eviction tests were flaky because two test steps were missing a sleep between queries, causing TTL-based cache verification to fail when both queries completed within the same second.

Backport of MR !11782

Merge branch 'backport-ondrej/fix-flaky-reclimit-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!12028

2 weeks agoFix flaky reclimit test by adding missing sleep
Ondřej Surý [Wed, 1 Apr 2026 17:19:50 +0000 (19:19 +0200)] 
Fix flaky reclimit test by adding missing sleep

The cache verification in steps 11 and 15 checks that the TTL has
decreased from its initial value to confirm the response was served
from cache, but the sleep between the two queries was missing. Both
queries could complete within the same second, leaving the TTL
unchanged and causing the test to incorrectly conclude the entry was
not cached.

(cherry picked from commit 80f04a9ee5cd90e875243a5ea991e28119bd546b)

2 weeks ago[9.18] chg: usr: Fall back to TCP on a UDP response with a mismatched query id
Ondřej Surý [Fri, 15 May 2026 07:50:52 +0000 (09:50 +0200)] 
[9.18] chg: usr: Fall back to TCP on a UDP response with a mismatched query id

BIND used to wait silently for the correct DNS message id on a UDP fetch
even after receiving a response from the expected server with the wrong
id, leaving room for off-path spoofing attempts to keep guessing within
that window.  The resolver now retries the fetch over TCP on the first
such response, and a new MismatchTCP statistics counter tracks how
often the fallback fires.

Closes #5449

Backport of MR !12023

Merge branch 'backport-5449-immediate-tcp-fallback-on-id-mismatch-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!12026

2 weeks agoSwitch UDP fetches to TCP on the first response with a wrong query id
Ondřej Surý [Thu, 14 May 2026 10:20:19 +0000 (12:20 +0200)] 
Switch UDP fetches to TCP on the first response with a wrong query id

Until now, the dispatcher silently dropped UDP responses from the
expected peer that carried the wrong DNS message id and kept listening
for the correct id to arrive within the read timeout.  An off-path
attacker who knows the destination address and source port of an
outgoing fetch could exploit that quiet retry window to flood the
resolver with guessed responses; with a gigabit link the per-query
success probability grows linearly with the number of guesses that
arrive before the legitimate answer or the timeout.

Treat any such mismatch as a possible spoofing attempt and let the
resolver immediately retry the same query over TCP, the same control
path the truncation handler already uses.

Add a resolver statistics counter - exposed as 'queries retried over TCP
after a response with mismatched query id' in rndc stats and
'MismatchTCP' in the statistics channel

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

2 weeks ago[9.18] fix: ci: Don't forward parent yaml variables to stress child pipelines
Michal Nowak [Thu, 14 May 2026 05:01:21 +0000 (07:01 +0200)] 
[9.18] fix: ci: Don't forward parent yaml variables to stress child pipelines

The global RUNNER_SCRIPT_TIMEOUT: 55m in the parent pipeline was being
forwarded to the stress and tsan:stress child pipelines, where forwarded
yaml variables outrank job-level variables. That caused stress jobs with
BIND_STRESS_TESTS_RUN_TIME >= 60 to be killed at 55 minutes, regardless
of the per-job RUNNER_SCRIPT_TIMEOUT set in the generated child config.

Set forward:yaml_variables: false on both trigger jobs; the generated
configs already declare every variable they need.

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

Merge branch 'backport-mnowak/fix-stress-test-script-timeout-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!12016

2 weeks agoInherit global TSAN_* variables for tsan stress jobs
Michal Nowak [Wed, 13 May 2026 19:06:41 +0000 (21:06 +0200)] 
Inherit global TSAN_* variables for tsan stress jobs

2 weeks agoInherit global CONFIGURE variable for stress tests
Michal Nowak [Wed, 13 May 2026 17:01:44 +0000 (19:01 +0200)] 
Inherit global CONFIGURE variable for stress tests

CONFIGURE is needed to build BIND 9 stress tests of 9.20 and 9.18
branches.

2 weeks agoSelectively inherit yaml vars in stress trigger jobs
Michal Nowak [Wed, 13 May 2026 09:44:26 +0000 (11:44 +0200)] 
Selectively inherit yaml vars in stress trigger jobs

The parent's global RUNNER_SCRIPT_TIMEOUT: 55m was reaching the stress
and tsan:stress child pipelines via inherited yaml variables, where
inherited values outrank the child's job-level variables. That caused
stress jobs with BIND_STRESS_TESTS_RUN_TIME >= 60 to be killed at 55
minutes, regardless of the per-job RUNNER_SCRIPT_TIMEOUT set in the
generated child config.

Use inherit:variables with a positive list on both trigger jobs:
inherit only CI_REGISTRY_IMAGE so the parent's registry override
(needed for image pulls in the child) flows through, while keeping
RUNNER_SCRIPT_TIMEOUT (and other globals) out of the child pipeline's
variable scope. The per-job RUNNER_SCRIPT_TIMEOUT values set by the
generated child config now take effect.

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

3 weeks ago[9.18] chg: ci: Set RUNNER_SCRIPT_TIMEOUTs
Michal Nowak [Tue, 12 May 2026 17:14:51 +0000 (19:14 +0200)] 
[9.18] chg: ci: Set RUNNER_SCRIPT_TIMEOUTs

Backport of MR !11750

Merge branch 'backport-mnowak/set-script-timeouts-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!12007

3 weeks agoGet some useful data out of respdiff even in case of a failure
Michal Nowak [Mon, 11 May 2026 17:20:23 +0000 (19:20 +0200)] 
Get some useful data out of respdiff even in case of a failure

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

3 weeks agoPass -r option to respdiff.sh
Michal Nowak [Mon, 11 May 2026 17:19:53 +0000 (19:19 +0200)] 
Pass -r option to respdiff.sh

Tell respdiff.sh where to find the respdiff Python tools (msgdiff.py,
diffsum.py, ...) so the in-tree copy from bind9-qa is used.

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

3 weeks agoSet RUNNER_SCRIPT_TIMEOUTs
Michal Nowak [Wed, 25 Mar 2026 12:31:49 +0000 (13:31 +0100)] 
Set RUNNER_SCRIPT_TIMEOUTs

Sometimes jobs can get stuck and be terminated by GitLab, leaving us
without artefacts that could contain useful information about why the
job got stuck.

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

3 weeks ago[9.18] new: ci: Add Ubuntu 26.04 Resolute Raccoon
Michal Nowak [Tue, 12 May 2026 13:22:25 +0000 (15:22 +0200)] 
[9.18] new: ci: Add Ubuntu 26.04 Resolute Raccoon

Backport of MR !11812

Merge branch 'backport-mnowak/ubuntu-26.04-resolute-raccoon-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!12002

3 weeks agotsiggss: regenerate kerberos credentials
Mark Andrews [Wed, 17 Aug 2022 01:13:41 +0000 (11:13 +1000)] 
tsiggss: regenerate kerberos credentials

The existing set of kerberos credential used deprecated algorithms
which are not supported by some implementations in FIPS mode.
Regenerate the saved credentials using more modern algorithms.

Added tsiggss/krb/setup.sh which sets up a test KDC with the required
principals for the system test to work.  The tsiggss system test
needs to be run once with this active and KRB5_CONFIG appropriately.
set.  See tsiggss/tests.sh for an example of how to do this.

(cherry picked from commit 3da79d408f3dcbe040a29298fbe3f6d5f57b278d)

3 weeks agoDo not run Noble Numbat unit test job in MRs
Michal Nowak [Tue, 7 Apr 2026 15:57:45 +0000 (17:57 +0200)] 
Do not run Noble Numbat unit test job in MRs

(cherry picked from commit 9978393c360bcf06ccd1bcbfc98f522640c1e04d)

3 weeks agoAdd Ubuntu 26.04 Resolute Raccoon
Michal Nowak [Tue, 7 Apr 2026 15:55:31 +0000 (17:55 +0200)] 
Add Ubuntu 26.04 Resolute Raccoon

(cherry picked from commit 14457ec326a6ef4358d5ac82125e1c1d97f92c3e)

3 weeks ago[9.18] chg: ci: Add commit link and diff to RPM build job logs
Michał Kępień [Mon, 11 May 2026 15:46:55 +0000 (17:46 +0200)] 
[9.18] chg: ci: Add commit link and diff to RPM build job logs

The output of update_rpms.py is terse, making it difficult to verify its
actions.  Add a commit link and "git show" output to the log of every CI
job running the update_rpms.py script in "build" mode to facilitate
double-checking its actions.

Backport of MR !11828

Merge branch 'backport-michal/add-commit-link-and-diff-to-rpm-build-job-logs-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!12000

3 weeks agoAdd commit link and diff to RPM build job logs
Michał Kępień [Mon, 11 May 2026 15:41:50 +0000 (17:41 +0200)] 
Add commit link and diff to RPM build job logs

The output of update_rpms.py is terse, making it difficult to verify its
actions.  Add a commit link and "git show" output to the log of every CI
job running the update_rpms.py script in "build" mode to facilitate
double-checking its actions.

(cherry picked from commit 6d51073f22ad54f00e652b48379f746cb5f15bcb)

3 weeks ago[9.18] fix: ci: Increase GIT_DEPTH for the "assign-milestones" job
Michał Kępień [Mon, 11 May 2026 14:27:39 +0000 (16:27 +0200)] 
[9.18] fix: ci: Increase GIT_DEPTH for the "assign-milestones" job

Cloning tags with the default GIT_DEPTH of 1 prevents the milestone
assignment script from identifying any merge requests that are included
in a given release.  Fix by increasing GIT_DEPTH to an arbitrary value
that is high enough for practical purposes.

The GIT_DEPTH CI variable defaults to 1 for all jobs through the
top-level "variables" key.  Explicitly setting it to 1 in job
definitions is unnecessary and may cause confusion.  Remove these
redundant assignments.

Backport of MR !11996

Merge branch 'backport-michal/fix-assign-milestones-job-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11998

3 weeks agoRemove redundant "GIT_DEPTH: 1" assignments
Michał Kępień [Mon, 11 May 2026 14:07:47 +0000 (16:07 +0200)] 
Remove redundant "GIT_DEPTH: 1" assignments

The GIT_DEPTH CI variable defaults to 1 for all jobs through the
top-level "variables" key.  Explicitly setting it to 1 in job
definitions is unnecessary and may cause confusion.  Remove these
redundant assignments.

(cherry picked from commit 703ad9a6ded2edf68105cac4181a848496341dcb)

3 weeks agoIncrease GIT_DEPTH for the "assign-milestones" job
Michał Kępień [Mon, 11 May 2026 14:07:47 +0000 (16:07 +0200)] 
Increase GIT_DEPTH for the "assign-milestones" job

Cloning tags with the default GIT_DEPTH of 1 prevents the milestone
assignment script from identifying any merge requests that are included
in a given release.  Fix by increasing GIT_DEPTH to an arbitrary value
that is high enough for practical purposes.

(cherry picked from commit bac4a577597fe3c8d38a86c1317472edca39fc5d)

3 weeks ago[9.18] fix: ci: Fix triggering rules for the "publish-cleanup" job
Michał Kępień [Mon, 11 May 2026 08:14:13 +0000 (10:14 +0200)] 
[9.18] fix: ci: Fix triggering rules for the "publish-cleanup" job

The "publish-cleanup" tag pipeline job is currently created for all
security releases, including BIND -S releases, but it depends on the
"publish" job, which is only created for open source releases.  This
breaks CI configuration for BIND -S tags, preventing pipelines from
getting created for such tags altogether.  Fix by only creating the
"publish-cleanup" job in tag pipelines for open source security
releases.

Backport of MR !11992

Merge branch 'backport-michal/fix-triggering-rules-for-the-publish-cleanup-job-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11994

3 weeks agoFix triggering rules for the "publish-cleanup" job
Michał Kępień [Mon, 11 May 2026 08:07:38 +0000 (10:07 +0200)] 
Fix triggering rules for the "publish-cleanup" job

The "publish-cleanup" tag pipeline job is currently created for all
security releases, including BIND -S releases, but it depends on the
"publish" job, which is only created for open source releases.  This
breaks CI configuration for BIND -S tags, preventing pipelines from
getting created for such tags altogether.  Fix by only creating the
"publish-cleanup" job in tag pipelines for open source security
releases.

(cherry picked from commit bb40c3463831d5520faf3b9bec1703df2e836684)

3 weeks agoUpdate BIND version for release v9.18.49
Andoni Duarte Pintado [Fri, 8 May 2026 14:41:25 +0000 (16:41 +0200)] 
Update BIND version for release

3 weeks agonew: doc: Prepare documentation for BIND 9.18.49
Andoni Duarte [Fri, 8 May 2026 14:36:53 +0000 (14:36 +0000)] 
new: doc: Prepare documentation for BIND 9.18.49

Merge branch 'andoni/prepare-documentation-for-bind-9.18.49' into 'v9.18.49-release'

See merge request isc-private/bind9!1032

3 weeks agoTweak and reword release notes
Andoni Duarte Pintado [Fri, 8 May 2026 09:46:37 +0000 (11:46 +0200)] 
Tweak and reword release notes

3 weeks agoPrepare release notes for BIND 9.18.49
Andoni Duarte Pintado [Fri, 8 May 2026 09:09:38 +0000 (11:09 +0200)] 
Prepare release notes for BIND 9.18.49

3 weeks agoGenerate changelog for BIND 9.18.49
Andoni Duarte Pintado [Fri, 8 May 2026 09:02:49 +0000 (11:02 +0200)] 
Generate changelog for BIND 9.18.49

3 weeks ago[9.18] chg: ci: Mark merged security fixes as "Not released yet"
Michał Kępień [Thu, 7 May 2026 16:08:34 +0000 (18:08 +0200)] 
[9.18] chg: ci: Mark merged security fixes as "Not released yet"

Adjust the triggering rules for the "merged-metadata" CI job so that
merge requests merged into security-* branches are automatically
assigned to the "Not released yet" milestone, just like merge requests
targeting public branches.  This enables merge requests containing
security fixes to be correctly processed by release automation scripts.

Backport of MR !11984

Merge branch 'backport-pspacek/extend-not-released-yet-milestone-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11988

3 weeks agoMark merged security fixes as "Not released yet"
Petr Špaček [Tue, 5 May 2026 13:04:36 +0000 (15:04 +0200)] 
Mark merged security fixes as "Not released yet"

Adjust the triggering rules for the "merged-metadata" CI job so that
merge requests merged into security-* branches are automatically
assigned to the "Not released yet" milestone, just like merge requests
targeting public branches.  This enables merge requests containing
security fixes to be correctly processed by release automation scripts.

(cherry picked from commit afdf7bed602b5518b23409c1a140a797c4e6de34)

3 weeks ago[9.18] chg: ci: Enable automatic backports for security fixes
Michał Kępień [Thu, 7 May 2026 15:55:32 +0000 (17:55 +0200)] 
[9.18] chg: ci: Enable automatic backports for security fixes

Ensure the "backports" CI job is created when new changes are merged
into security-* branches.  This enables using backport automation for
security fixes.

Backport of MR !11938

Merge branch 'backport-michal/extend-automatic-backports-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11986

3 weeks agoEnable automatic backports for security fixes
Michał Kępień [Thu, 7 May 2026 15:45:35 +0000 (17:45 +0200)] 
Enable automatic backports for security fixes

Ensure the "backports" CI job is created when new changes are merged
into security-* branches.  This enables using backport automation for
security fixes.

(cherry picked from commit 88b94a2019397e9c85d49c59aac4e2a11db5f779)

3 weeks ago[9.18] fix: dev: Pass empty string instead of NULL to ns_client_dumpmessage()
Ondřej Surý [Wed, 6 May 2026 11:36:48 +0000 (13:36 +0200)] 
[9.18] fix: dev: Pass empty string instead of NULL to ns_client_dumpmessage()

Pass "" instead of NULL to ns_client_dumpmessage() to get the log message printed.

Backport of MR !1022

Merge branch 'backport-ondrej/fix-ns_client_dumpmessage-calls-9.18' into 'security-bind-9.18'

See merge request isc-private/bind9!1024

3 weeks ago[9.18] chg: usr: Fix CPU spikes and slow queries when cache approaches memory limit
Ondřej Surý [Tue, 5 May 2026 13:20:43 +0000 (15:20 +0200)] 
[9.18] chg: usr: Fix CPU spikes and slow queries when cache approaches memory limit

When the cache grew close to the configured max-cache-size, every subsequent
entry triggered all worker threads to run cache cleanup at once, causing CPU
spikes and a drop in query throughput. Cleanup is now spread probabilistically
across inserts as memory approaches the limit, so the work is distributed evenly
instead of piling up at the threshold.

Backport of MR !1002

Merge branch '5891-improve-overmem-cleaning-9.18' into 'security-bind-9.18'

See merge request isc-private/bind9!1008

3 weeks agoPass empty string instead of NULL to ns_client_dumpmessage()
Ondřej Surý [Wed, 6 May 2026 08:12:35 +0000 (10:12 +0200)] 
Pass empty string instead of NULL to ns_client_dumpmessage()

The two new call sites added by the CLASS-validation work passed NULL
as the reason, but ns_client_dumpmessage() bails out early on a NULL
reason — so the message dump never happened. The intent was to dump
the message and let the follow-up ns_client_log() carry the reason
text, so pass "" to suppress the prefix without short-circuiting the
dump.

(cherry picked from commit 3401cbd16f44b4ecb8b57dc9d1951037db6d0e32)

3 weeks ago[9.18] [CVE-2026-5946] sec: usr: Disable recursion, UPDATE, and NOTIFY for non-IN...
Evan Hunt [Mon, 4 May 2026 22:51:22 +0000 (22:51 +0000)] 
[9.18] [CVE-2026-5946] sec: usr: Disable recursion, UPDATE, and NOTIFY for non-IN views

Recursion, dynamic updates (UPDATE), and zone change notifications
(NOTIFY) are now disabled for views with a class other than IN
(such as CHAOS or HESIOD); authoritative service for non-IN zones
(e.g. version.bind in class CHAOS) continues to work as before.
Servers configured with recursion yes in a non-IN view will log a
warning at startup, and named-checkconf flags the same condition.
UPDATE and NOTIFY messages that specify the meta-classes ANY or NONE
in the question section are now rejected with FORMERR.

This addresses a set of closely related security issues collectively
identified as CVE-2026-5946. ISC would like to thank Mcsky23 for
bringing these issues to our attention.

Backport of https://gitlab.isc.org/isc-private/bind9/-/merge_requests/936

Merge branch 'each-security-disable-chaos-recursion-security-bind-9.18' into 'security-bind-9.18'

See merge request isc-private/bind9!1010

3 weeks agoMake isc_mem_isovermem() probabilistic
Ondřej Surý [Sun, 19 Apr 2026 19:36:43 +0000 (21:36 +0200)] 
Make isc_mem_isovermem() probabilistic

Replace the hysteretic hi_water/lo_water switch with a stochastic
check: always false below lo_water, always true at or above hi_water,
linearly ramped probability in between.  This spreads cache cleaning
across many inserts instead of triggering a thundering herd once the
hi_water mark is crossed (which causes every addrdataset to enter the
LRU purge path simultaneously and serializes lookups behind the node
write locks).

The is_overmem atomic and its stores are no longer needed and are
removed.  The existing tests that asserted specific hysteretic state
transitions are simplified to check only the deterministic boundaries.

(cherry picked from commit ee24d2a1c3361dcc1c48fb29bb2e0b91bc3405e8)

3 weeks ago[9.18] [CVE-2026-3039] sec: usr: Fix GSS-API resource leak
Ondřej Surý [Fri, 1 May 2026 06:39:39 +0000 (08:39 +0200)] 
[9.18] [CVE-2026-3039] sec: usr: Fix GSS-API resource leak

Fixed a memory leak where each GSS-API TKEY negotiation leaked a security context inside the GSS library. An unauthenticated attacker could exhaust server memory by sending repeated TKEY queries to a server with tkey-gssapi-keytab configured. The leaked memory was allocated by the GSS library, bypassing BIND's memory accounting.

Multi-round GSS-API negotiation (GSS_S_CONTINUE_NEEDED) is now rejected, as BIND never supported it correctly and Kerberos/SPNEGO completes in a single round.

Also implemented missing RFC 3645 requirement: the client now verifies that mutual authentication and integrity flags are granted by the GSS-API mechanism (Section 3.1.1).

Closes: https://gitlab.isc.org/isc-projects/bind9/-/issues/5752
Backport of !965

Merge branch 'backport-5752-fix-memory-leak-in-TKEY-negotiation-9.18' into 'security-bind-9.18'

See merge request isc-private/bind9!975

3 weeks agoMake the RD flag optional in isctest.query()
Evan Hunt [Tue, 24 Feb 2026 00:27:52 +0000 (16:27 -0800)] 
Make the RD flag optional in isctest.query()

Add an 'rd' parameter (default True) to isctest.query.create() so
that non-recursive queries can be sent with rd=False.

(cherry picked from commit 12e511310024aac38ce223ee47b5108f06caf8f9)

3 weeks ago[9.18] [CVE-2026-3592] sec: usr: Limit resolver server list size
Colin Vidal [Thu, 30 Apr 2026 18:49:35 +0000 (20:49 +0200)] 
[9.18] [CVE-2026-3592] sec: usr: Limit resolver server list size

When resolving a domain with many nameservers that share overlapping IP addresses (e.g., 10 NS records all pointing at the same set of addresses), BIND could previously waste time querying duplicate addresses and build up excessively large server lists. Deduplicate addresses in the resolver's server list so that each unique IP is only queried once per resolution attempt, regardless of how many NS records point to it and cap the number of addresses stored per nameserver name to 6 (combined A and AAAA), preventing memory and CPU overhead from domains with unusually large NS/glue sets.

Closes isc-projects/bind9#5641

Backport of !909

Merge branch 'backport-5641-selfpointedglue-9.18' into 'security-bind-9.18'

See merge request isc-private/bind9!954

3 weeks agoFix output token and GSS context leaks in TKEY/GSS-API error paths
Ondřej Surý [Fri, 10 Apr 2026 10:51:31 +0000 (12:51 +0200)] 
Fix output token and GSS context leaks in TKEY/GSS-API error paths

In dst_gssapi_acceptctx(), rename outtoken to outtokenp (matching BIND
convention for output pointer parameters) and free the allocated output
token buffer on error in the cleanup path.

In process_gsstkey(), route the empty-principal error path through
cleanup via CLEANUP() instead of returning early, so that the output
token, GSS context, and TSIG key are all freed consistently by the
existing cleanup block.

(cherry picked from commit 6c46c85d02849fb659584275313529794039f433)

3 weeks agoTest server behavior when sending various UPDATE requests
Evan Hunt [Mon, 9 Mar 2026 04:50:04 +0000 (15:50 +1100)] 
Test server behavior when sending various UPDATE requests

Send update messages for zones with CLASS0, ANY and NONE.  The class
ANY UPDATE also attempts to delete a KX record in an existing IN
class zone to trigger a REQUIRE.

Test that the server is still running.

(cherry picked from commit 1fa1e84d286d5a6d9d3b72ed1c2c29142f40c81d)

3 weeks ago[9.18] [CVE-2026-5950] sec: usr: Avoid unbounded recursion loop
Colin Vidal [Thu, 30 Apr 2026 15:55:11 +0000 (17:55 +0200)] 
[9.18] [CVE-2026-5950] sec: usr: Avoid unbounded recursion loop

A bug during bad server handling could cause the resolver to enter an infinite loop, continuously sending queries to an upstream server with no exit condition, until the resolver query timeout was hit. This has been fixed.

ISC would like to thank Billy Baraja (BielraX) for bringing this issue to our attention.

Closes isc-projects/bind9#5804

Backport of !985

Merge branch 'backport-5804-incr-query-counters-9.18' into 'security-bind-9.18'

See merge request isc-private/bind9!982

3 weeks agoFix `resend_loop` system test
Colin Vidal [Thu, 30 Apr 2026 18:02:47 +0000 (19:02 +0100)] 
Fix `resend_loop` system test

Commit `c78016ff91ed33221831b4723108d69639430913` backported asyncserver
features to 9.18 branches, but the `resend_loop` test was still using
the previous API to install handlers (passing a list of handlers rather
than a varags). This is now fixed.

3 weeks agoAdd regression test for GSS-API context leak via TKEY CONTINUE
Ondřej Surý [Fri, 20 Mar 2026 07:43:28 +0000 (08:43 +0100)] 
Add regression test for GSS-API context leak via TKEY CONTINUE

Send crafted SPNEGO NegTokenInit tokens that propose the krb5
mechanism without a mechToken.  This causes gss_accept_sec_context()
to return GSS_S_CONTINUE_NEEDED, which on unfixed code leaks the
GSS context handle (~520 bytes per query).

The test verifies that the server rejects the negotiation (TKEY
error != 0, no continuation token) rather than returning a CONTINUE
response (error=0 with output token).

(cherry picked from commit 2f2fb32d737e12c817880d584145cdf85dbc8d06)