]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
4 weeks agoUse "git push --force-with-lease" for autorebases
Michał Kępień [Thu, 30 Apr 2026 20:19:59 +0000 (22:19 +0200)] 
Use "git push --force-with-lease" for autorebases

If a merge request is merged to an autorebased branch while it is
getting rebased, the "git push -f" command at the end of the autorebase
job will cause the contents of that merge request to be silently deleted
from Git history even though the merge request will still be (correctly)
shown as "merged" by GitLab.

Use "git push --force-with-lease" instead to prevent force-pushing the
rebased version of the branch if it is pushed to after its pre-rebase
version is fetched by the autorebase job.  Report such an event
accordingly.  For simplicity, no retries are attempted as the problem is
expected to be resolved by the next autorebase and the chances of this
scenario happening in practice are already low to begin with.

(cherry picked from commit f5a7671107e0c51f2a30b0d15aa24298694cb77a)

4 weeks ago[9.18] new: ci: Set up automatic rebasing for security-* branches
Michał Kępień [Thu, 30 Apr 2026 11:28:06 +0000 (13:28 +0200)] 
[9.18] new: ci: Set up automatic rebasing for security-* branches

Introduce a set of private branches containing only security fixes that
are automatically rebased onto the corresponding open source branches
whenever new changes are merged.  Each rebase triggers a basic build,
failing the CI job if the build breaks.

When a security-* branch is rebased, create a CI pipeline for its new
revision and rebase its corresponding bind-9.x-sub branch (if it exists)
on top of it, creating a rebase chain.

Report any failures in the process via Mattermost.

These changes enable treating security fixes similarly to other code
changes, without deferring merges all the way until release prep.

Backport of MR !11930

Merge branch 'backport-michal/autorebase-chain-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11932

4 weeks agoSet up automatic rebasing for security-* branches
Michał Kępień [Thu, 30 Apr 2026 09:58:55 +0000 (11:58 +0200)] 
Set up automatic rebasing for security-* branches

Introduce a set of private branches containing only security fixes that
are automatically rebased onto the corresponding open source branches
whenever new changes are merged.  Each rebase triggers a basic build,
failing the CI job if the build breaks.

When a security-* branch is rebased, create a CI pipeline for its new
revision and rebase its corresponding bind-9.x-sub branch (if it exists)
on top of it, creating a rebase chain.

Report any failures in the process via Mattermost.

These changes enable treating security fixes similarly to other code
changes, without deferring merges all the way until release prep.

(cherry picked from commit af7d5e566ee0bf1d6c761a4301f7b3072d5080bd)

4 weeks ago[9.18] fix: usr: prevent malicious DNSSEC zones from exhausting validator CPU
Ondřej Surý [Thu, 30 Apr 2026 11:16:21 +0000 (13:16 +0200)] 
[9.18] fix: usr: prevent malicious DNSSEC zones from exhausting validator CPU

A DNSSEC-signed zone could publish a DNSKEY with an unusually large
RSA public exponent and force any validator resolving names in that
zone to spend disproportionate CPU verifying signatures.  The
validator now rejects such DNSKEYs, matching the limit already
applied to keys read from files or HSMs.

Closes #5881

Backport of MR !11917

Merge branch 'backport-5881-rsa-exponent-keytrap-cpu-amplification-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11924

4 weeks agoReject RSA DNSKEYs with oversize public exponents at parse time
Ondřej Surý [Thu, 30 Apr 2026 05:01:53 +0000 (07:01 +0200)] 
Reject RSA DNSKEYs with oversize public exponents at parse time

The wire-format RSA DNSKEY parser was the only key path with no upper
bound on the public exponent — opensslrsa_parse and opensslrsa_fromlabel
already cap at RSA_MAX_PUBEXP_BITS.  An attacker-controlled DNSKEY could
therefore force a validator to compute s^e mod n with e up to ~|n| bits,
amplifying every verify by ~120x for typical 2048-bit moduli (OpenSSL
itself only caps the exponent for moduli above 3072 bits).  Apply the
same bit-count cap to wire-format keys.

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

4 weeks ago[9.18] fix: dev: Fix swapped arguments in redirect2() single-label branch
Ondřej Surý [Thu, 30 Apr 2026 05:08:52 +0000 (07:08 +0200)] 
[9.18] fix: dev: Fix swapped arguments in redirect2() single-label branch

On a recursive resolver with nxdomain-redirect configured, an
NXDOMAIN result for a query whose qname is the root could corrupt
the view's nxdomain-redirect target, after which the redirect
feature stopped working for every subsequent query in that view
until named was restarted.

Closes #5908

Backport of MR !11908

Merge branch 'backport-5908-query-redirect2-name-copy-arg-swap-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11914

4 weeks agoFix swapped arguments in redirect2() single-label branch
Ondřej Surý [Wed, 29 Apr 2026 17:23:19 +0000 (19:23 +0200)] 
Fix swapped arguments in redirect2() single-label branch

For a query whose qname is the root, the labels==1 branch in
redirect2() called dns_name_copy(redirectname, view->redirectzone)
with arguments reversed, overwriting the view-global
nxdomain-redirect target with the empty redirectname rather than
copying the configured target into the per-query lookup name.  After
the corruption, view->redirectzone names the root, so
dns_name_issubdomain() makes redirect2() short-circuit for every
subsequent query and the nxdomain-redirect feature stops working
until named is restarted.

Triggering this needs the resolver to receive an NXDOMAIN for the
root from upstream, which does not happen in normal DNS operation.

Swap the arguments to match the dns_name_copy(source, dest)
signature.  Add a system test that issues a root query through the
nxdomain-redirect resolver and verifies the redirect feature still
works for a normal NXDOMAIN-producing query afterwards.

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

4 weeks ago[9.18] fix: usr: Fix rndc-confgen aborting on HMAC-SHA-384/512 keys above 512 bits
Ondřej Surý [Thu, 30 Apr 2026 04:46:57 +0000 (06:46 +0200)] 
[9.18] fix: usr: Fix rndc-confgen aborting on HMAC-SHA-384/512 keys above 512 bits

`rndc-confgen -A hmac-sha384` and `-A hmac-sha512` documented a `-b`
range of 1..1024, but any value above 512 aborted on hardened builds
instead of producing a key. The full advertised range now works.

Closes #5903

Backport of MR !11903

Merge branch 'backport-5903-hmac-generate-stack-overflow-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11911

4 weeks agoSize HMAC key generation buffers to the maximum block size
Ondřej Surý [Wed, 29 Apr 2026 14:23:10 +0000 (16:23 +0200)] 
Size HMAC key generation buffers to the maximum block size

hmac_generate() declared its on-stack nonce buffer as
unsigned char data[ISC_MAX_MD_SIZE], i.e. 64 bytes. That is the maximum
digest size, but the buffer is filled up to the algorithm's HMAC block
size, which is 128 bytes for SHA-384 and SHA-512. Asking rndc-confgen
for an HMAC-SHA-384 or HMAC-SHA-512 key with -b > 512 (the documented
range allows up to 1024) wrote past the end of the stack buffer; on
hardened builds this aborted with a stack-smash detector firing
instead of producing a key.

Use the existing ISC_MAX_BLOCK_SIZE (128) for the buffer so the full
1..1024 range advertised by -A hmac-sha{384,512} works as documented.
The matching key_rawsecret[64] in confgen's generate_key() is enlarged
the same way so the generated key fits when dumped to the buffer.

Add a system test that exercises rndc-confgen across the previously
overflowing keysizes; with -Db_sanitize=address it caught the abort
before the fix.

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

4 weeks ago[9.18] fix: usr: Fix suppressed missing-glue check in named-checkzone
Ondřej Surý [Wed, 29 Apr 2026 16:13:19 +0000 (18:13 +0200)] 
[9.18] fix: usr: Fix suppressed missing-glue check in named-checkzone

named-checkzone and named-checkconf -z silently skipped the
missing-glue check for any NS name that had already triggered an
extra-AAAA-glue warning, so zones missing required A glue could pass
validation and be deployed with broken delegations.

Backport of MR !11899

Merge branch 'backport-ondrej/check-tool-err-glue-code-collision-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11906

4 weeks agoResolve ERR_MISSING_GLUE / ERR_EXTRA_AAAA value collision
Ondřej Surý [Wed, 29 Apr 2026 12:03:38 +0000 (14:03 +0200)] 
Resolve ERR_MISSING_GLUE / ERR_EXTRA_AAAA value collision

Both constants were defined as 5. The symbol table used by checkns() to
deduplicate log messages keys on (name, error_code), so logging an
extra-AAAA error caused logged() to also return true for the
missing-glue check, silently skipping the entire missing-glue block for
the same name in named-checkzone and named-checkconf -z.

Convert the ERR_* defines to an auto-numbered enum so the compiler
guarantees the values stay pairwise distinct.

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

4 weeks ago[9.18] chg: nil: Disable licensing check for root.hints
Colin Vidal [Tue, 28 Apr 2026 15:33:17 +0000 (17:33 +0200)] 
[9.18] chg: nil: Disable licensing check for root.hints

Removing REUSE licensing header check for `root.hints` files.

Backport of MR !11893

Merge branch 'backport-colin/disable-licensing-check-roothints-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11895

4 weeks agoRemove licensing header check for `root.hint[s]`
Colin Vidal [Tue, 28 Apr 2026 13:46:57 +0000 (14:46 +0100)] 
Remove licensing header check for `root.hint[s]`

Removing REUSE licensing header check for `root.hint` and `root.hints`
files.

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

5 weeks ago[9.18] new: doc: Add AI coding assistants guidance to CONTRIBUTING.md
Ondřej Surý [Mon, 27 Apr 2026 08:54:19 +0000 (10:54 +0200)] 
[9.18] new: doc: Add AI coding assistants guidance to CONTRIBUTING.md

Adapted from the Linux kernel's Documentation/process/coding-assistants.rst
to the BIND 9 context. Adds three subsections under the existing
"Guidelines for Tool-Generated Content" section:

- Licensing and legal requirements (MPL-2.0, SPDX identifiers).
- Signed-off-by and Developer Certificate of Origin: AI agents must
  not add Signed-off-by trailers; only the human submitter may
  certify the DCO.
- Attribution: the Assisted-by: AGENT_NAME:MODEL_VERSION trailer
  for recording AI involvement, with an explicit prohibition on
  AI-added Co-Authored-By trailers (Co-Authored-By designates a
  human co-author who shares responsibility).

Backport of MR !11888

Merge branch 'backport-ondrej/coding-assistants-doc-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11892

5 weeks agoAdd AI coding assistants guidance to CONTRIBUTING.md
Ondřej Surý [Wed, 22 Apr 2026 13:01:34 +0000 (15:01 +0200)] 
Add AI coding assistants guidance to CONTRIBUTING.md

Adapted from the Linux kernel's Documentation/process/coding-assistants.rst
to the BIND 9 context. Adds three subsections under the existing
"Guidelines for Tool-Generated Content" section:

- Licensing and legal requirements (MPL-2.0, SPDX identifiers).
- Signed-off-by and Developer Certificate of Origin: AI agents must
  not add Signed-off-by trailers; only the human submitter may
  certify the DCO.
- Attribution: the Assisted-by: AGENT_NAME:MODEL_VERSION trailer
  for recording AI involvement, with an explicit prohibition on
  AI-added Co-Authored-By trailers (Co-Authored-By designates a
  human co-author who shares responsibility).

(cherry picked from commit 2339bcd49381f4ab58c3f7cc9f43e4edc57bbf67)

6 weeks ago[9.18] fix: usr: Fix named crash when processing SIG records in dynamic updates
Ondřej Surý [Mon, 20 Apr 2026 10:14:57 +0000 (12:14 +0200)] 
[9.18] fix: usr: Fix named crash when processing SIG records in dynamic updates

Previously, :iscman:`named` could abort if a client sent a dynamic update containing a SIG record (the legacy signature type) to a zone configured with an update-policy. The function `dns_db_findrdataset` had an incorrect requirements prerequisite that prevented SIG records being looked up, which was triggered as part of processing an UPDATE request and could be triggered remotely by any client permitted to send updates. This has been fixed by ensuring that SIG records are handled consistently with RRSIG records during update processing.

Closes #5818

Backport of MR !11864

Merge branch 'backport-5818-fix-update-of-sig-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11877

6 weeks agoAdd test for SIG in prequisites of dynamic update
Matthijs Mekking [Thu, 16 Apr 2026 14:17:34 +0000 (16:17 +0200)] 
Add test for SIG in prequisites of dynamic update

Make sure the nameserver correctly handles SIG records in the
prerequisites of the dynamic update. The first check is to ensure that
the prerequisites are not examined prior to checking the credentials.

The second test case checks that the SIG present prerequisite is
examined and therefore refuses the update. Also this should not trigger
an assertion failure in dns__db_findrdataset() (due to the REQUIRE()
only accepted dns_rdatatype_rrsig when the covers parameter was set).

(cherry picked from commit 51f27fda46870acea69835f82835ca857c000bd0)

6 weeks agoAdd AXFR regression test for SIG covers preservation
Ondřej Surý [Thu, 16 Apr 2026 11:25:03 +0000 (13:25 +0200)] 
Add AXFR regression test for SIG covers preservation

diff.c rdata_covers() runs on both dns_diff_apply (IXFR, ns/update.c
dynamic updates) and dns_diff_load (AXFR).  After the previous commit
refused SIG and NXT in dynamic updates, the AXFR path remains the
most natural way to drive legacy SIG records into a secondary's zone
DB and regression-gate the rdata_covers() fix.

The test adds ans11 as an AsyncDnsServer primary for a small zone
whose AXFR carries two SIG rdatas at the same owner with different
covered types (A, MX) and different TTLs (600, 1200), and declares
ns6 a secondary of that zone.  With the bug present, dns_diff_load
groups both tuples at typepair (SIG, 0) and the MX-covering record
inherits the first-seen TTL (600); the fix keeps them at (SIG, A)
and (SIG, MX) with their original TTLs.

rndc dumpdb -zones on the secondary is used to inspect stored state
directly, because the wire-level SIG query response merges
same-(owner,type,class) RRs and masks the per-rdataset TTLs.

(cherry picked from commit e9f880c78ff3c2f799763628060eca0f0d64e70f)

6 weeks agoRefuse SIG and NXT records in dynamic updates
Ondřej Surý [Thu, 16 Apr 2026 10:23:34 +0000 (12:23 +0200)] 
Refuse SIG and NXT records in dynamic updates

SIG (24) and NXT (30) are obsolete DNSSEC record types, superseded by
RRSIG and NSEC in RFC 3755.  Allowing them through dynamic update
exposes two distinct bugs that the surrounding GL#5818 work already
fixes as defense-in-depth:

  - dns__db_findrdataset() used to REQUIRE that (covers == 0 ||
    type == RRSIG), which aborts named when a SIG update reaches the
    prescan foreach_rr() call.  Fixed to accept dns_rdatatype_issig().
  - diff.c rdata_covers() used to test only RRSIG, dropping the
    covered-type field for SIG rdatas; the zone DB then filed every
    SIG rdataset under typepair (SIG, 0) instead of
    (SIG, covered_type) and follow-up adds collided at that bucket.
    Fixed to use dns_rdatatype_issig().

Both underlying bugs are still reachable via inbound zone transfer
(diff.c rdata_covers() runs from both dns_diff_apply on the IXFR path
and dns_diff_load on the AXFR path), so the type-helper fixes above
remain necessary.  For the dynamic-update path, the simplest and
safest posture is to refuse SIG and NXT outright at the front door in
ns/update.c, alongside the existing NSEC/NSEC3/non-apex-RRSIG
refusals.  KEY remains permitted because it is still used to carry
public keys for SIG(0) transaction authentication.

The existing tcp-self SIG regression test is repointed to assert
REFUSED on the SIG add, a symmetric NXT test is added, and the
SIG-via-dyn-update covers-bucket test is removed because it is no
longer reachable through this entry point; AXFR-based coverage of
diff.c rdata_covers() follows in a separate commit.

(cherry picked from commit 3a44a13232991ba054aa157a1c3ffb8376359b42)

6 weeks agoAdd regression test for SIG covers being dropped in dns_diff_apply
Ondřej Surý [Thu, 16 Apr 2026 09:16:40 +0000 (11:16 +0200)] 
Add regression test for SIG covers being dropped in dns_diff_apply

rdata_covers() in lib/dns/diff.c tests `type == dns_rdatatype_rrsig`
instead of dns_rdatatype_issig(), so for a legacy SIG (24) rdata it
returns 0 and the covered type is discarded on the dynamic-update /
IXFR path.  The zone DB then files every SIG rdataset under typepair
(SIG, 0) instead of (SIG, covered_type), and a follow-up add with a
different covers field but a different TTL collides at that bucket,
trips DNS_DBADD_EXACTTTL in qpzone, returns DNS_R_NOTEXACT, and comes
back to the client as SERVFAIL.

The new test adds a PTR to establish the node (tcp-self requires the
client IP's reverse form to equal the owner), then two SIG updates
with different covers and different TTLs; on a buggy build the second
update is SERVFAIL and named logs `dns_diff_apply: .../SIG/IN: add
not exact`.  The test is expected to pass once rdata_covers() is
switched to dns_rdatatype_issig(), matching the fix already adopted
for dns__db_findrdataset() on this branch and the helper pattern used
in master.c, xfrout.c, and qpcache.c.

(cherry picked from commit b9fc0e595b5f907654bc241efee5f942d57b7903)

6 weeks agoFix dropped covers field for SIG records in dns_diff_apply
Ondřej Surý [Thu, 16 Apr 2026 09:21:48 +0000 (11:21 +0200)] 
Fix dropped covers field for SIG records in dns_diff_apply

rdata_covers() in lib/dns/diff.c discriminated only on
dns_rdatatype_rrsig (46) and returned 0 for the legacy SIG (24), so
the covered-type field was silently discarded on the dynamic-update
and IXFR paths.  Every SIG rdataset was then filed in the zone DB
under typepair (SIG, 0) instead of (SIG, covered_type); a second SIG
add with a different covers but a different TTL collided at that
bucket, tripped DNS_DBADD_EXACTTTL in qpzone, returned
DNS_R_NOTEXACT, and came back to the client as SERVFAIL.

Use dns_rdatatype_issig() here so both SIG and RRSIG carry their
covers through the diff, matching the helper pattern already used in
lib/dns/master.c, lib/ns/xfrout.c, lib/dns/qpcache.c, and the
dns__db_findrdataset() REQUIRE that the surrounding merge request
just relaxed.

(cherry picked from commit 0a5ba57116857779680d76fe4b20e125f3bc3b71)

6 weeks agoAdd system test for SIG record handling in update-policy tcp-self
Ondřej Surý [Tue, 7 Apr 2026 14:40:36 +0000 (16:40 +0200)] 
Add system test for SIG record handling in update-policy tcp-self

Verify that a SIG record sent via TCP dynamic update is accepted
by the tcp-self update-policy and correctly stored in the zone.

(cherry picked from commit ecddeab6962fe7aab70ccaff56fab8f496316a9b)

6 weeks agoFix assertion failure in dns_db_findrdataset() for SIG records
Mark Andrews [Tue, 7 Apr 2026 14:39:57 +0000 (16:39 +0200)] 
Fix assertion failure in dns_db_findrdataset() for SIG records

dns__db_findrdataset() had a REQUIRE() that only accepted
dns_rdatatype_rrsig when the covers parameter was set.  A dynamic
update containing a SIG record (type 24) would trigger this
assertion, crashing named.  Use dns_rdatatype_issig() to accept
both SIG and RRSIG.

(cherry picked from commit 03edeccaa16991e05c101ae82a03568ae1b2dbd0)

6 weeks ago[9.18] chg: test: Move conftest log initialization to conftest.py
Nicki Křížek [Mon, 20 Apr 2026 09:14:10 +0000 (11:14 +0200)] 
[9.18] chg: test: Move conftest log initialization to conftest.py

Backport of !8519

Merge branch 'backport-mr8519-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11884

6 weeks agoMove conftest log initialization to conftest.py
Tom Krizek [Wed, 13 Mar 2024 17:18:42 +0000 (18:18 +0100)] 
Move conftest log initialization to conftest.py

Initializing the conftest logging upon importing the isctest package
isn't practical when there are standalone pieces which can be used
outside of the testing framework, such as the asyncdnsserver module.

(cherry picked from commit 673387c4d515ecd1dd5dd6d854e629907b914970)

6 weeks ago[9.18] fix: dev: Fix inverted gethostname() check in rndc status
Ondřej Surý [Fri, 17 Apr 2026 16:46:49 +0000 (18:46 +0200)] 
[9.18] fix: dev: Fix inverted gethostname() check in rndc status

The replacement of named_os_gethostname() with raw gethostname()
inverted the success check: the "localhost" fallback runs on success,
and on failure the uninitialized hostname buffer is read by snprintf(),
leaking stack memory via the rndc status reply.

Closes #5889

Backport of MR !11879

Merge branch 'backport-5889-fix-gethostname-inverted-check-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11883

6 weeks agoFix inverted gethostname() check in rndc status
Ondřej Surý [Fri, 17 Apr 2026 14:28:50 +0000 (16:28 +0200)] 
Fix inverted gethostname() check in rndc status

When named_os_gethostname() was replaced with raw gethostname(), the
success/failure polarity was flipped: the fallback to "localhost" now
runs on success and the hostname buffer is left uninitialized on
failure.  In the failure path, snprintf() then reads the uninitialized
stack buffer, disclosing stack contents via the rndc status reply.

(cherry picked from commit f7859247df222fa17a0ad52f8ce87816e06984ec)

6 weeks ago[9.18] new: ci: Add "assign-milestones" job to CI
Andoni Duarte [Fri, 17 Apr 2026 09:49:44 +0000 (09:49 +0000)] 
[9.18] new: ci: Add "assign-milestones" job to CI

After a release is signed (the "sign" job), the "assign-milestones" job
will assign issues and merge requests to the corresponding version
milestones.

Backport of MR !11868

Merge branch 'backport-andoni/add-assign-milestone-ci-job-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11872

6 weeks agoAdd job to assign issues and merge requests to version milestones
Andoni Duarte Pintado [Thu, 26 Feb 2026 09:06:48 +0000 (10:06 +0100)] 
Add job to assign issues and merge requests to version milestones

After a release is signed (the "sign" job), the "assign-milestones" job
will assign issues and merge requests to the corresponding version
milestones.

(cherry picked from commit ad95cdb9e2ffeca43a652df2042c90191a515ce8)

6 weeks ago[9.18] new: ci: Extend the prepare-release-announcement job to post release links
Andoni Duarte [Fri, 17 Apr 2026 08:53:43 +0000 (08:53 +0000)] 
[9.18] new: ci: Extend the prepare-release-announcement job to post release links

The prepare-release-announcement job is now extended so that after
creating the announcement MR, it posts a message with links to the newly
released versions to Mattermost.

Backport of MR !11860

Merge branch 'backport-andoni/extend-prepare-release-announcement-with-urls-message-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11870

6 weeks agoExtend the prepare-release-announcement job post release links
Andoni Duarte Pintado [Thu, 16 Apr 2026 13:59:27 +0000 (15:59 +0200)] 
Extend the prepare-release-announcement job post release links

The prepare-release-announcement job is now extended so that after
creating the announcement MR, it posts a message with links to the newly
released versions to Mattermost.

(cherry picked from commit a486a38a7f023d26bdb4b5e4008c0c9a13638a73)

6 weeks ago[9.18] new: doc: Document opt-in 🤖 marker for agent-authored issues and MRs
Ondřej Surý [Thu, 16 Apr 2026 17:10:33 +0000 (19:10 +0200)] 
[9.18] new: doc: Document opt-in 🤖 marker for agent-authored issues and MRs

Add short notes in CONTRIBUTING.md telling automated agents to append
🤖 to the title of issues and merge requests so they can be routed
through the streamlined agent triage/merge process.

Backport of MR !11861

Merge branch 'backport-ondrej/agent-contributing-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11863

6 weeks agoDocument opt-in 🤖 marker for agent-authored issues and MRs
Ondřej Surý [Thu, 16 Apr 2026 16:51:01 +0000 (18:51 +0200)] 
Document opt-in 🤖 marker for agent-authored issues and MRs

Add short notes in CONTRIBUTING.md telling automated agents to append
🤖 to the title of issues and merge requests so they can be routed
through the streamlined agent triage/merge process.

(cherry picked from commit 2ec8d3ce7ca7128bd0710d440671eb22146876a3)

6 weeks agoChange the CONTRIBUTING to use Developer's Certificate of Origin 1.1
Ondřej Surý [Thu, 16 Oct 2025 16:23:17 +0000 (18:23 +0200)] 
Change the CONTRIBUTING to use Developer's Certificate of Origin 1.1

(cherry picked from commit 845eb2ebbc0f07fd9588ba844e61d09afd4165e4)

6 weeks ago[9.18] chg: ci: Test development version of libuv in CI
Štěpán Balážik [Wed, 15 Apr 2026 14:25:09 +0000 (14:25 +0000)] 
[9.18] chg: ci: Test development version of libuv in CI

Recently, a broken version of libuv was released breaking BIND on
several platforms. The offending [commit](https://github.com/libuv/libuv/issues/5030) was on the development branch
for months, but we didn't notice.

In nightly pipelines, build the current 'main' (actually 'v1.x') branch
of libuv and run the unit and system tests against it.

Backport of MR !11647

Merge branch 'backport-stepan/prelease-testing-for-libuv-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11843

6 weeks agoTest development version of libuv in CI
Štěpán Balážik [Mon, 9 Mar 2026 16:26:13 +0000 (17:26 +0100)] 
Test development version of libuv in CI

Recently, a broken version of libuv was released breaking BIND on
several platforms. The offending commit [1] was on the development
branch for months, but we didn't notice.

In nightly pipelines, build the current 'main' (actually 'v1.x') branch
of libuv and run the unit and system tests against it.

[1]: https://github.com/libuv/libuv/issues/5030

(cherry picked from commit 23d11de2b4024ab7eae3f2a2031a3ef1969b234c)

6 weeks ago[9.18] fix: usr: Remove unnecessary dns_name_free call
Mark Andrews [Wed, 15 Apr 2026 03:46:45 +0000 (13:46 +1000)] 
[9.18] fix: usr: Remove unnecessary dns_name_free call

When processing a catalog zone member's primaries definition and
there is a TXT record containing an invalid name TSIG key name,
dns_name_free was incorrectly called triggering an assertion.
This has been fixed.

Closes #5858

Backport of MR !11832

Merge branch 'backport-5858-remove-unnecessary-dns-name-free-call-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11849

6 weeks agoChecking invalid TSIG key name in a catalog zone
Mark Andrews [Fri, 10 Apr 2026 03:05:31 +0000 (13:05 +1000)] 
Checking invalid TSIG key name in a catalog zone

(cherry picked from commit 213e59ccf56f4d66cf65f363be4563f2e853d12f)

6 weeks agoRemove unnecessary dns_name_free call
Mark Andrews [Fri, 10 Apr 2026 03:07:26 +0000 (13:07 +1000)] 
Remove unnecessary dns_name_free call

When processing a catalog zone member's primaries definition and
there is a TXT record containing an invalid name TSIG key name,
dns_name_free was incorrectly called triggering an assertion.
This has been fixed.

(cherry picked from commit 9f411c93c4d87b8097d39024da5a9da447cddaf7)

7 weeks ago[9.18] fix: usr: Fix zone verification of NSEC3 signed zones
Mark Andrews [Fri, 10 Apr 2026 08:07:49 +0000 (18:07 +1000)] 
[9.18] fix: usr: Fix zone verification of NSEC3 signed zones

Previously, when computing the compressed bitmap during verification of an NSEC3-signed zone, an undersized buffer was used that resulted in an out-of-bounds write if there were too many active windows in the bitmap. This impacted mirror zones which are NSEC3-signed, `dnssec-signzone` and `dnssec-verifyzone`. This has been fixed.

Closes #5834

Backport of MR !11804

Merge branch 'backport-5834-fix-cbm-size-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11834

7 weeks agoChecking maximal sized compresses bit map works
Mark Andrews [Fri, 10 Apr 2026 07:21:42 +0000 (17:21 +1000)] 
Checking maximal sized compresses bit map works

Add records that will be at end of each compressed bitmap less 1
of the NSEC3 record. Zone verification should still work.

(cherry picked from commit e9a58de251e87227d573937d7838544a89c3091e)

7 weeks agoUse the correct maximal compressed bit map buffer size
Mark Andrews [Thu, 26 Mar 2026 02:10:45 +0000 (13:10 +1100)] 
Use the correct maximal compressed bit map buffer size

There are up to 256 windows in a NSEC/NSEC3 compressed bit
map of 32 + 2 octets each.

(cherry picked from commit e43e4bd20a99860e79294afbcc9b75f01ff28c26)

7 weeks ago[9.18] new: test: System test requires the h2 module
Michal Nowak [Thu, 9 Apr 2026 15:55:56 +0000 (17:55 +0200)] 
[9.18] new: test: System test requires the h2 module

Backport of MR !11829

Merge branch 'backport-mnowak/require-h2-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11831

7 weeks agoSystem test requires the h2 module
Michal Nowak [Thu, 9 Apr 2026 14:53:29 +0000 (16:53 +0200)] 
System test requires the h2 module

(cherry picked from commit 8b4b1aa6d9ad9767fb5b152c4fe628daa164cb86)

7 weeks ago[9.18] fix: ci: Purge distros token in a separate CI job
Michał Kępień [Thu, 9 Apr 2026 11:48:49 +0000 (13:48 +0200)] 
[9.18] fix: ci: Purge distros token in a separate CI job

The "publish" job runs on a dedicated, locked-down runner that lacks the
Python modules necessary to execute the manage_distros_token.py script.
Instead of deleting the token within the "publish" job, purge it in a
separate job that automatically runs on the "base" image after the
"publish" job succeeds.  Define "rules" for the new job so that the
token is only deleted for security releases, as it should have been
initially.

Backport of MR !11817

Merge branch 'backport-michal/purge-distros-token-in-a-separate-ci-job-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11827

7 weeks agoPurge distros token in a separate CI job
Michał Kępień [Thu, 9 Apr 2026 11:23:57 +0000 (13:23 +0200)] 
Purge distros token in a separate CI job

The "publish" job runs on a dedicated, locked-down runner that lacks the
Python modules necessary to execute the manage_distros_token.py script.
Instead of deleting the token within the "publish" job, purge it in a
separate job that automatically runs on the "base" image after the
"publish" job succeeds.  Define "rules" for the new job so that the
token is only deleted for security releases, as it should have been
initially.

(cherry picked from commit 36411e7c84384168ab3c0e3d107be459326c1647)

7 weeks ago[9.18] fix: doc: nsupdate does not handle zero length RDATA well
Mark Andrews [Thu, 9 Apr 2026 02:07:11 +0000 (12:07 +1000)] 
[9.18] fix: doc: nsupdate does not handle zero length RDATA well

Nsupdate does not distinguish between a non-existing RDATA field
and an empty RDATA field when determining which action is desired
when the RDATA field is empty. This only affects a few data types,
like APL, which allow an empty RDATA field.  Document a workaround
of using the '\# 0' form for entering these specific records. e.g.

    # delete the APL RRset
    update delete IN APL
    # delete the APL record with a zero length rdata
    update delete IN APL \# 0

Closes #5835

Backport of MR !11775

Merge branch 'backport-5835-nsupdate-doc-zero-length-rdata-how-to-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11824

7 weeks agonsupdate does not handle zero length RDATA well
Mark Andrews [Tue, 31 Mar 2026 01:26:42 +0000 (12:26 +1100)] 
nsupdate does not handle zero length RDATA well

Nsupdate does not distinguish between a non-existing RDATA field
and an empty RDATA field when determining which action is desired
when the RDATA field is empty. This only affects a few data types,
like APL, which allow an empty RDATA field.  Document a workaround
of using the '\# 0' form for entering these specific records. e.g.

    # delete the APL RRset
    update delete IN APL
    # delete the APL record with a zero length rdata
    update delete IN APL \# 0

(cherry picked from commit f45762a5beea8dd07604e49ba225bebe09f9f970)

7 weeks ago[9.18] fix: test: Check exit status of dig and nsupdate in nsupdate system test
Mark Andrews [Tue, 7 Apr 2026 21:57:36 +0000 (07:57 +1000)] 
[9.18] fix: test: Check exit status of dig and nsupdate in nsupdate system test

Add missing failure checks to six dig and nsupdate invocations in nsupdate system test so that command failures are properly caught instead of silently ignored.

Backport of MR !11811

Merge branch 'backport-marka/check-return-codes-in-nsupdate-test-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11814

7 weeks agoCheck exit status of dig and nsupdate in nsupdate system test
Mark Andrews [Thu, 19 Mar 2026 04:18:46 +0000 (15:18 +1100)] 
Check exit status of dig and nsupdate in nsupdate system test

Add missing `|| ret=1` to six dig and nsupdate invocations in
tests.sh so that command failures are properly caught instead
of silently ignored.

(cherry picked from commit 9ba03a1848904b605f64fbfe3dab00b551828e4b)

7 weeks ago[9.18] new: doc: Use ubuntu-24.04 for RTD, bump Python version
Michal Nowak [Tue, 7 Apr 2026 15:32:36 +0000 (17:32 +0200)] 
[9.18] new: doc: Use ubuntu-24.04 for RTD, bump Python version

Backport of MR !11806

Merge branch 'backport-mnowak/rtd-image-bump-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11810

7 weeks agoUse ubuntu-24.04 for RTD, bump Python version
Michal Nowak [Tue, 7 Apr 2026 11:35:03 +0000 (13:35 +0200)] 
Use ubuntu-24.04 for RTD, bump Python version

(cherry picked from commit 3a8e2f742716cd209b500db0431d18627fccf291)

8 weeks ago[9.18] chg: dev: Revert isdelegation() to return boolean value again
Matthijs Mekking [Tue, 7 Apr 2026 08:26:17 +0000 (08:26 +0000)] 
[9.18] chg: dev: Revert isdelegation() to return boolean value again

Closes #5838

Backport of MR !11792

Merge branch 'backport-5838-cid-645252-control-flow-issues-deadcode-in-validator-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11803

8 weeks agoRename isdelegation() to is_insecure_referral()
Matthijs Mekking [Thu, 2 Apr 2026 09:20:32 +0000 (11:20 +0200)] 
Rename isdelegation() to is_insecure_referral()

The name 'isdelegation()' was confusing. This function is not checking
whether this message is a delegation, but whether the denial of
existence proofs in this message is a proof of a referral to an
unsigned zone.

The name 'is_unsecure_referral()' is more appropriate.

(cherry picked from commit e0f09bb3743015b405ae48c9664f46a422f546e2)

8 weeks agoRevert isdelegation() to return boolean value again
Matthijs Mekking [Thu, 2 Apr 2026 09:16:29 +0000 (11:16 +0200)] 
Revert isdelegation() to return boolean value again

The isdelegation() was changed to return an isc_result_t because the
idea was to have a separate return value DNS_R_NSEC3ITERRANGE to signal
to the caller we could not verify the proof because of too many
iterations in the NSEC3 record, or perhaps ISC_R_UNEXPECTED for a more
generic cause that verification was not done.

But this would make error handling more fragile and all we care about
is whether we can reliably say the NS bit was not set.

If we can not reliably say so, we have to treat it as an insecure
referrral.

Since the answer is either yes or no, we can revert back to returning
a boolean value.

(cherry picked from commit 3ac1bb1c391394d23a40facd424e49acfa5513bf)

8 weeks ago[9.18] new: test: Add regression test for NSEC proof after unsigned-to-signed IXFR
Ondřej Surý [Fri, 3 Apr 2026 05:46:17 +0000 (07:46 +0200)] 
[9.18] new: test: Add regression test for NSEC proof after unsigned-to-signed IXFR

Test that a secondary receiving an IXFR transitioning a zone from
unsigned to NSEC-signed returns the correct covering NSEC record
for empty non-terminal names.

Backport of MR !11786

Merge branch 'backport-ondrej/fix-nsec-ixfr-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11798

8 weeks agoAdd regression test for NSEC proof after unsigned-to-signed IXFR
Ondřej Surý [Thu, 2 Apr 2026 08:45:03 +0000 (10:45 +0200)] 
Add regression test for NSEC proof after unsigned-to-signed IXFR

Test that a secondary receiving an IXFR transitioning a zone from
unsigned to NSEC-signed returns the correct covering NSEC record
for empty non-terminal names.

Add isctest.query.wait_for_serial() shared helper for waiting until
a server has a specific SOA serial.

(cherry picked from commit 8a4990d6ff692b50c3b295456b74b33441337cde)

2 months agoMerge tag 'v9.18.48' into bind-9.18
Michal Nowak [Wed, 1 Apr 2026 14:56:16 +0000 (14:56 +0000)] 
Merge tag 'v9.18.48' into bind-9.18

2 months agoUpdate BIND version for release v9.18.48
Michal Nowak [Tue, 31 Mar 2026 16:31:29 +0000 (18:31 +0200)] 
Update BIND version for release

2 months agonew: doc: Prepare documentation for BIND 9.18.48
Michal Nowak [Tue, 31 Mar 2026 16:28:09 +0000 (18:28 +0200)] 
new: doc: Prepare documentation for BIND 9.18.48

Merge branch 'mnowak/prepare-documentation-for-bind-9.18.48' into 'v9.18.48-release'

See merge request isc-private/bind9!973

2 months agoTweak and reword release notes
Michal Nowak [Tue, 31 Mar 2026 10:14:13 +0000 (12:14 +0200)] 
Tweak and reword release notes

2 months ago[9.18] chg: nil: License test data files in REUSE.toml
Nicki Křížek [Tue, 31 Mar 2026 15:57:52 +0000 (17:57 +0200)] 
[9.18] chg: nil: License test data files in REUSE.toml

In order to avoid the need to repeat the license header in named.conf
files and zone files, add the paths to REUSE.toml to assign the license.

Backport of MR !11766

Merge branch 'backport-nicki/reuse-cover-configs-and-zones-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11774

2 months agoPrepare release notes for BIND 9.18.48
Michal Nowak [Tue, 31 Mar 2026 15:52:28 +0000 (17:52 +0200)] 
Prepare release notes for BIND 9.18.48

2 months agoGenerate changelog for BIND 9.18.48
Michal Nowak [Tue, 31 Mar 2026 15:51:50 +0000 (17:51 +0200)] 
Generate changelog for BIND 9.18.48

2 months agoRemove license header files from _common test files
Nicki Křížek [Mon, 30 Mar 2026 15:53:08 +0000 (17:53 +0200)] 
Remove license header files from _common test files

These are either config file or zone file snippets. Their license is
declared in REUSE.toml.

(cherry picked from commit 2390bd3a8f636d45f017c8a61cabde243bf16a23)

2 months agoLicense test data files in REUSE.toml
Nicki Křížek [Mon, 30 Mar 2026 15:52:14 +0000 (17:52 +0200)] 
License test data files in REUSE.toml

In order to avoid the need to repeat the license header in named.conf
files and zone files, add the paths to REUSE.toml to assign the license.

All shared snippets in bin/tests/system/_common and
bin/tests/system/**named.conf* files are covered.

Note that the existing rule **/**.db** already covers zone files. Only
remove the extraneous special-cases.

(cherry picked from commit ef57bd3a02ff458e8c542ba9447f15106aae3a60)

2 months agochg: doc: Set up version for BIND 9.18.49
Michal Nowak [Tue, 31 Mar 2026 08:20:12 +0000 (10:20 +0200)] 
chg: doc: Set up version for BIND 9.18.49

Merge branch 'mnowak/set-up-version-for-bind-9.18.49' into 'bind-9.18'

See merge request isc-projects/bind9!11772

2 months agoUpdate BIND version to 9.18.49-dev
Michal Nowak [Tue, 31 Mar 2026 08:18:49 +0000 (10:18 +0200)] 
Update BIND version to 9.18.49-dev

2 months ago[9.18] sec: usr: Fix crash when reconfiguring zone update policy during active updates
Ondřej Surý [Mon, 30 Mar 2026 18:59:25 +0000 (20:59 +0200)] 
[9.18] sec: usr: Fix crash when reconfiguring zone update policy during active updates

Fixed a crash that could occur when running rndc reconfig to change a zone's update policy (e.g., from allow-update to update-policy) while DNS UPDATE requests were being processed for that zone.

ISC would like to thank Vitaly Simonovich for bringing this issue to our attention.

Fixes #5817

Backport of MR !11707

Merge branch 'backport-5817-fix-crash-via-SSU-table-desynchronization-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11739

2 months agoFix TOCTOU race in DNS UPDATE SSU table handling
Ondřej Surý [Wed, 18 Mar 2026 02:55:51 +0000 (03:55 +0100)] 
Fix TOCTOU race in DNS UPDATE SSU table handling

Pass the SSU table through the update event struct from
send_update() to update_action() instead of reading it from the
zone twice.  If rndc reconfig changed the zone's update policy
between the two reads (e.g., from allow-update to update-policy),
send_update() would skip the maxbytype allocation but
update_action() would see a non-NULL ssutable, triggering
INSIST(ssutable == NULL || maxbytype != NULL) and crashing named.

The ssutable reference is now taken once in send_update() and
transferred to update_action() via the event struct, ensuring
both functions see the same value.

(cherry picked from commit c172416559e62a31de27061648db7ffe3b1b7f63)

2 months ago[9.18] fix: ci: Fixes and tweaks for release-related jobs 11764/head
Michał Kępień [Wed, 25 Mar 2026 17:22:58 +0000 (18:22 +0100)] 
[9.18] fix: ci: Fixes and tweaks for release-related jobs

Backport of MR !11720

Merge branch 'backport-michal/release-job-tweaks-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11757

2 months agoFix distros token deletion in CI
Michał Kępień [Wed, 25 Mar 2026 17:09:02 +0000 (18:09 +0100)] 
Fix distros token deletion in CI

Clone the BIND 9 QA repository before invoking a script in it.

(cherry picked from commit 2ffae8e52a8dc6134a4364b374651e5abb9c908b)

2 months agoPrevent unscheduled release publication
Michał Kępień [Wed, 25 Mar 2026 17:09:02 +0000 (18:09 +0100)] 
Prevent unscheduled release publication

The "publish" job has no dependencies on other jobs, so nothing prevents
it from being accidentally started before the scheduled publication
date.  Although publication still requires confirmation via an SSH
connection to a dedicated, locked-down runner, performing that action
prematurely may have drastic consequences.  Therefore, it is worth
implementing additional safeguards.

Add an extra check to the "publish" job to ensure it can only be run on
the scheduled publication day.  In exceptional circumstances, this check
can be overridden by setting the FORCE_PUBLICATION CI variable to any
non-empty value.

(cherry picked from commit ce977f53b923072759a09f389d75de103e70c7e5)

2 months agoTighten dependencies for the "merge-tag" job
Michał Kępień [Wed, 25 Mar 2026 17:09:02 +0000 (18:09 +0100)] 
Tighten dependencies for the "merge-tag" job

The "merge-tag" job currently uses the "manual_release_job_qa" YAML
anchor, which makes it depend on the "staging" job.  Meanwhile, this job
requires the tag it was created for to be public for it to work.  While
this is harmless, as this job will simply fail if it is run too early,
it still makes sense for it to depend on the "publish" job instead, if
only to reduce confusion in the pipeline view.  Adjust the "needs" key
for the "merge-tag" job accordingly.

(cherry picked from commit 722290dce6d2caca8cf5615b5c3fa52ea500f1a1)

2 months agoExtend artifact lifetime for Cloudsmith build jobs
Michał Kępień [Wed, 25 Mar 2026 17:09:02 +0000 (18:09 +0100)] 
Extend artifact lifetime for Cloudsmith build jobs

The commit.txt file produced by each Cloudsmith build job is required to
run the corresponding publication job.  Therefore, the artifact lifetime
for the former must be long enough to prevent the file from expiring
before the publication job is run.  Set the lifetime of the artifacts
created by Cloudsmith build jobs to one month to ensure that the
publication jobs can access them.

(cherry picked from commit ce09f8d0f8fc9053ac4806f2231ee9625a9ed473)

2 months agoFix building EVN & -S Cloudsmith packages
Michał Kępień [Wed, 25 Mar 2026 17:09:02 +0000 (18:09 +0100)] 
Fix building EVN & -S Cloudsmith packages

Setting "artifacts: false" for the dependency on the "publish-private"
job prevents the url-*.txt files produced by that job from being pulled
from GitLab when the jobs that build EVN & -S Cloudsmith packages are
run, effectively breaking the latter.  Fix by making these jobs depend
on the artifacts of the "publish-private" job.

(cherry picked from commit b36f17238b5a4e00828aeffa39b03a89cfd9a257)

2 months ago[9.18] chg: test: Rename "nsec3-delegation" to "nsec3_delegation"
Michał Kępień [Wed, 25 Mar 2026 17:03:56 +0000 (18:03 +0100)] 
[9.18] chg: test: Rename "nsec3-delegation" to "nsec3_delegation"

The "nsec3-delegation" test was added in a release branch, before commit
2441028e724955eb6b1f9aa37884c32ea69c3e5a introduced the current system
test naming convention.  Rename the test to comply with that convention.

Backport of MR !11753

Merge branch 'backport-michal/rename-nsec3-delegation-test-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11755

2 months agoRename "nsec3-delegation" to "nsec3_delegation"
Michał Kępień [Wed, 25 Mar 2026 14:36:17 +0000 (15:36 +0100)] 
Rename "nsec3-delegation" to "nsec3_delegation"

The "nsec3-delegation" test was added in a release branch, before commit
2441028e724955eb6b1f9aa37884c32ea69c3e5a introduced the current system
test naming convention.  Rename the test to comply with that convention.

(cherry picked from commit 48bf3d3e6516417ea82619128aab319dca71b049)

2 months ago[9.18] fix: usr: Fix a crash triggered by rndc modzone on zone that already existed...
Matthijs Mekking [Wed, 25 Mar 2026 14:48:54 +0000 (14:48 +0000)] 
[9.18] fix: usr: Fix a crash triggered by rndc modzone on zone that already existed in NZF file

Calling `rndc modzone` didn't work properly for a zone hat was configured in
the configuration file. It could crash if BIND 9 was built without LMDB or if
there was already an NZF file for the zone. In addition, `rndc modzone` failed
in subsequent attempts. These problems are now fixed.

Closes #5826

Backport of MR !11743

Merge branch 'backport-5826-fix-modzone-issues-ytatuya-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11746

2 months agoensure rndc modzone succeeds twice for a zone in named.conf
JINMEI Tatuya [Mon, 23 Mar 2026 16:58:39 +0000 (09:58 -0700)] 
ensure rndc modzone succeeds twice for a zone in named.conf

If a zone is in named.conf, not originally added by rndc addzone,
rndc modzone for that zone succeeds once, but subsequent modzone
attempts fail. This is because do_modzone removes the zone config
from global or view options, but it would fail due to 'not found'
once the config is removed.

The fix is to ensure re-adding the updated zone config to the
global or view options. This also works as a more complete fix
for the issue 85453d3 atempted to solve, ensuring rndc showzone
shows the latest config: it now works for multple attemps of
modzone, and with named that is not built with LMDB.

The change in this commit relies on UNCONST in a few places.
That's not clean, but 'add/mod/delzone' generally seems to
need it (for example, delete_zoneconf uses it to modify the list
of zones). In that sense, this change follows the convention
(for a longer term, there may have to be a better API so that we
can modify config obtions that were once parsed).

(cherry picked from commit f2115e9d58ee6584a091d697499875ff6a78a243)

2 months agoRevert "Store zone config also on modzone"
JINMEI Tatuya [Mon, 23 Mar 2026 18:29:28 +0000 (11:29 -0700)] 
Revert "Store zone config also on modzone"

This reverts commit 85453d393d1b591ae1108603308c79dd63acca85.

This commit doesn't seem to be a complete solution of what
it appears to fix: showzone succeeds and shows the modified
config after first modzone, but subsequent attempts of modzone
fail (though not because of the commit being reverted), let
alone showing the correct new config.

Revering the change for now, and will provide a more comprehensive
fix in the next commit.

(cherry picked from commit 17416af24878d305000ca9035b48a7d837973662)

2 months agoprevent named crash on rndc modzone for a zone in named.conf
JINMEI Tatuya [Sat, 21 Mar 2026 06:33:04 +0000 (23:33 -0700)] 
prevent named crash on rndc modzone for a zone in named.conf

If named is built without LMDB and has a zone in named.conf,
then rndc modzone for that zone triggers an assertion failure
unless there's already an NZF file. This is because load_nzf
doesn't create 'nzf_config' when NZF is missing, while a valid
nzf_config is assumed in do_modzone when it tries to add the
modified zone config to add_parser.

The crash is fixed by skipping the call to cfg_parser_mapadd when
nzf_config is NULL. Skipping it should be okay since the config stored
in add_parser would be needed only for subsequently deleting a zone by
rndc delzone when the zone was originally added by rndc addzone, but
in this case the zone was not 'added'. Checking if nzf_config is NULL
before using it also seems to be consistent with other parts of the
implementation.

(cherry picked from commit 2ec6f856e3ff0228c8061df0c1b5dc26a5062585)

2 months agoMerge tag 'v9.18.47' into bind-9.18
Michał Kępień [Wed, 25 Mar 2026 14:24:34 +0000 (14:24 +0000)] 
Merge tag 'v9.18.47' into bind-9.18

2 months ago[9.18] fix: ci: Set User-Agent for Sphinx to fix gitlab.gnome.org
Michal Nowak [Wed, 25 Mar 2026 11:13:53 +0000 (12:13 +0100)] 
[9.18] fix: ci: Set User-Agent for Sphinx to fix gitlab.gnome.org

The linkcheck started to fail because of a new check on gitlab.gnome.org
that now forbids Sphinx User-Agent, returnin 406 HTTP status.

    (       chapter10: line  115) broken    https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home - 406 Client Error: Not Acceptable for url: https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home

Backport of MR !11747

Merge branch 'backport-mnowak/linkcheck-set-user-agent-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11749

2 months agoSet User-Agent for Sphinx to fix gitlab.gnome.org
Michal Nowak [Wed, 25 Mar 2026 09:39:15 +0000 (10:39 +0100)] 
Set User-Agent for Sphinx to fix gitlab.gnome.org

The linkcheck started to fail because of a new check on gitlab.gnome.org
that now forbids Sphinx User-Agent, returnin 406 HTTP status.

    (       chapter10: line  115) broken    https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home - 406 Client Error: Not Acceptable for url: https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home

(cherry picked from commit 617471d85d60309e6b970d311fa45f677afb4ade)

2 months ago[9.18] new: dev: Add MOVE_OWNERSHIP() macro for transferring pointer ownership
Ondřej Surý [Mon, 23 Mar 2026 11:05:22 +0000 (12:05 +0100)] 
[9.18] new: dev: Add MOVE_OWNERSHIP() macro for transferring pointer ownership

A helper macro that returns the current value of a pointer and sets
it to NULL in one expression, useful for transferring ownership in
designated initializers.

Backport of MR !11724

Merge branch 'backport-ondrej/TAKE_OWNERSHIP-macro-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11737

2 months agoAdd MOVE_OWNERSHIP() macro for transferring pointer ownership
Ondřej Surý [Fri, 20 Mar 2026 01:15:17 +0000 (02:15 +0100)] 
Add MOVE_OWNERSHIP() macro for transferring pointer ownership

A helper macro that returns the current value of a pointer and sets
it to NULL in one expression, useful for transferring ownership in
designated initializers.

(cherry picked from commit 0f3be0beb8e461428466172d4b7b800933038adb)

2 months ago[9.18] fix: doc: Fix dnssec-signzone usage output
Matthijs Mekking [Mon, 23 Mar 2026 10:14:26 +0000 (10:14 +0000)] 
[9.18] fix: doc: Fix dnssec-signzone usage output

The usage still said the default NSEC3 iterations is 10, but this
has been 0 for a while.

Backport of MR !11727

Merge branch 'backport-matthijs-dnssec-signzone-help-nsec3iter-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11735

2 months agoFix dnssec-signzone usage output
Matthijs Mekking [Fri, 20 Mar 2026 11:10:07 +0000 (12:10 +0100)] 
Fix dnssec-signzone usage output

The usage still said the default NSEC3 iterations is 10, but this
has been 0 for a while.

(cherry picked from commit c61bf8b5336961395881b2db184c37c95c716b36)

2 months agofix: nil: Remove extra fctx->result assignment from broken backport
Ondřej Surý [Fri, 20 Mar 2026 07:59:43 +0000 (08:59 +0100)] 
fix: nil: Remove extra fctx->result assignment from broken backport

The backport added extra line, but forgot to remove the old one.

Merge branch 'backport-ondrej/fix-data-race-on-fctx-result-in-validated-9.18-v2' into 'bind-9.18'

See merge request isc-projects/bind9!11725

2 months agoRemove extra fctx->result assignment from broken backport
Ondřej Surý [Fri, 20 Mar 2026 07:57:51 +0000 (08:57 +0100)] 
Remove extra fctx->result assignment from broken backport

The backport added extra line, but forgot to remove the old one.

2 months ago[9.18] fix: dev: Fix data race on fctx->vresult in validated()
Ondřej Surý [Fri, 20 Mar 2026 02:23:49 +0000 (03:23 +0100)] 
[9.18] fix: dev: Fix data race on fctx->vresult in validated()

Move the write to fctx->vresult after LOCK(&fctx->lock).  The field was
being set before acquiring the lock, but dns_resolver_logfetch() reads
it under the same lock from another thread.

Backport of MR !11717

Merge branch 'backport-ondrej/fix-data-race-on-fctx-result-in-validated-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11722

2 months agoFix data race on fctx->vresult in validated()
Ondřej Surý [Thu, 19 Mar 2026 02:42:08 +0000 (03:42 +0100)] 
Fix data race on fctx->vresult in validated()

Move the write to fctx->vresult after LOCK(&fctx->lock).  The field was
being set before acquiring the lock, but dns_resolver_logfetch() reads
it under the same lock from another thread.

(cherry picked from commit a2bd8339095c99b4f0faea0f1bc39128c048c3aa)

2 months ago[9.18] chg: dev: Use underscore for system test names
Nicki Křížek [Wed, 18 Mar 2026 14:52:25 +0000 (15:52 +0100)] 
[9.18] chg: dev: Use underscore for system test names

Change the convention for system test directory names to always use an
underscore rather than a hyphen. Names using underscore are valid python
package names and can be used with standard `import` facilities in
python, which allows easier code reuse.

Backport of MR !11710

Merge branch 'backport-nicki/system-test-dir-underscore-names-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11712

2 months agoRename all system test to use underscore
Nicki Křížek [Wed, 18 Mar 2026 11:59:44 +0000 (12:59 +0100)] 
Rename all system test to use underscore

All system tests previously using a hyphen have been renamed to use
underscore instead. A couple of symlinks were corrected and one path in
`nsec3-answer` adjusted accordingly.

(cherry picked from commit 67aca1f8c6f19de11f238a402604697be4ff64dc)

2 months agoUse underscore for system test names
Nicki Křížek [Tue, 17 Mar 2026 16:08:15 +0000 (17:08 +0100)] 
Use underscore for system test names

Change the convention for system test directory names to always use an
underscore rather than a hyphen. Names using underscore are valid python
package names and can be used with standard `import` facilities in
python, which allows easier code reuse.

The temporary directories for test execution and their convenience
symlinks have been switched to using hyphens rather than underscores to
keep the pytest collection, filtering and .gitignore working as
expected.

(cherry picked from commit 9f4c1d1993fe624c5d68cbc51521dd4761513cd2)

2 months ago[9.18] fix: usr: Fix a crash triggered by rndc modzone on zone from configuration...
Matthijs Mekking [Tue, 17 Mar 2026 14:36:21 +0000 (14:36 +0000)] 
[9.18] fix: usr: Fix a crash triggered by rndc modzone on zone from configuration file

Calling `rndc modzone` on a zone that was configured in the configuration file caused a crash. This has been fixed.

ISC would like to thank Nathan Reilly for reporting this.

Closes #5800

Backport of MR !11683

Merge branch 'backport-5800-rndc-modzone-non-dynamic-zone-crash-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11699

2 months agoStore zone config also on modzone
Matthijs Mekking [Tue, 17 Mar 2026 08:29:10 +0000 (09:29 +0100)] 
Store zone config also on modzone

'rndc modzone' deletes the old configuration. If we don't store the
new zone config, when we do a 'rndc showzone' it will be a failure.

This is not an issue in the 9.21 version, because of the effective
config behavior.

(cherry picked from commit acd0cb508b63b28bbcdefee6b28ff25bce9b7bf4)

2 months agoDon't call dns_zone_setadded() on modify
Matthijs Mekking [Fri, 13 Mar 2026 10:56:31 +0000 (11:56 +0100)] 
Don't call dns_zone_setadded() on modify

If we are modifiying the zone, the zone must have been added before.
Don't overwrite this value on modifications.

Also it feels cleaner to pass added=false to configure_zone() in
do_modzone().

(cherry picked from commit 780872e07eaa735c215765da570d2f1f78bfade7)
(cherry picked from commit fdd5317af70982f65cc7200390c964fe25951c2d)

2 months agoOnly lock view->newzone.lock if not already locked
Matthijs Mekking [Fri, 13 Mar 2026 10:52:47 +0000 (11:52 +0100)] 
Only lock view->newzone.lock if not already locked

Some code paths try to lock an already locked view->newzone.lock.

For example, do_modzone() aqcuires the lock and then calls
delete_zoneconf(), that wants to acquire the same lock.

Add a parameter to delete_zoneconf() that informs the function if the
lock has already been acquired.

(cherry picked from commit 71587b0816a9458895aaa14a85539acd91afda38)
(cherry picked from commit 784185ad1806c7b4ccde96ddcef028d35debc254)