Commit graph

40242 commits

Author SHA1 Message Date
Štěpán Balážik
013af7818e Fix generate-tsan-stress-test-configs CI job
In a3d0f43d2 I moved the script that does this to the QA repo and
screwed up the path.

Fix the path and make the job run properly again.

(cherry picked from commit 4ed6c4e4e7)
2026-02-25 16:07:40 +01:00
Štěpán Balážik
9e23fcf74e [9.18] chg: ci: Move and/or rename Python scripts
Move some scripts to the QA repo, rename others to adhere to the snake-case Python convention.

Partial backport of MR !11499

Merge branch 'backport-stepan/python-tooling-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11575
2026-02-25 12:39:47 +00:00
Štěpán Balážik
65b779661d Rename Python files to adhere to the snake-case convention
(cherry picked from commit 50ed74197c)
2026-02-25 12:10:20 +00:00
Štěpán Balážik
708b8ecef1 Move utility Python scripts to the bind9-qa repo
I would have touched them anyway in this MR so let's bite the bullet
and move them there.

(cherry picked from commit a3d0f43d21)
2026-02-25 12:10:20 +00:00
Štěpán Balážik
aea6bc9066 Clone the bind9-qa repo to the project root in CI jobs
Cloning to a stable location allows clearer handling of paths when
calling scripts from CI jobs.

`unit:gcc:tarball` and `system:gcc:tarball` do `cd bind-*` in
`before_script` which lead to the `bind9-qa` directory ending up in
a different place in exactly these two jobs and that made reasoning
about paths in `.system_test_common` and `.unit_test_common` tricky.

(cherry picked from commit 482c1cc72f)
2026-02-25 12:10:20 +00:00
Ondřej Surý
97fd0c56e4 [9.18] chg: dev: Invalid NSEC3 can cause OOB read of the isdelegation() stack
When .next_length is longer than NSEC3_MAX_HASH_LENGTH, it causes a
harmless out-of-bound read of the isdelegation() stack.  This has been
fixed.

Closes #5749

Backport of MR !11553

Merge branch 'backport-5749-fix-OOB-read-in-isdelegation-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11595
2026-02-24 17:29:38 +01:00
Mark Andrews
e9c23f598b
Test maximum length NSEC3 hash detection
Adds text and wire format unit tests to verify the newly enforced
maximum NSEC3 hash length constraints.  These tests ensure that hash
lengths up to the 39-byte maximum are accepted, while larger sizes
correctly fail.

(cherry picked from commit e83a182056)
2026-02-24 16:42:19 +01:00
Mark Andrews
7eeefdc36a
Remove invalid REQUIRE in NSEC3 fromstruct method
The NSEC3 fromstruct method only worked for hash type 1
when it should work for all hash types.

(cherry picked from commit f030bc6756)
2026-02-24 16:42:19 +01:00
Mark Andrews
8d6e1c1a48
Enforce NSEC3 record consistency
NSEC3 hashes are required to fit within a single DNS label.  Since there
are 5 bits per label byte without pad characters, the maximum hash size
is floor(63*5/8) (39 bytes).

This patch enforces this maximum length for unknown algorithms, while
strictly enforcing the exact expected digest length for known algorithms
like SHA-1.

(cherry picked from commit 3801d0ebbf)
2026-02-24 16:31:33 +01:00
Ondřej Surý
368c75a9f5
Invalid NSEC3 can cause OOB read of the isdelegation() stack
When .next_length is longer than NSEC3_MAX_HASH_LENGTH, it causes a
harmless out-of-bound read of the isdelegation() stack.  This patch
fixes the issue by skipping NSEC3 records with an oversized hash length
during validation.

(cherry picked from commit 67b4fb56e4)
2026-02-24 16:31:10 +01:00
Ondřej Surý
aceaebe530 [9.18] new: doc: Provide guidelines for tool-generated content
In the last few years, the capabilities of coding tools have exploded.
As those capabilities have expanded, contributors and maintainers have
more and more questions about how and when to apply those capabilities.

Add new documentation to guide contributors on how to best use BIND 9
development tools, new and old.

In short: Please show your work and make sure your contribution is
easy to review.

This has been adopted from the Linux Kernel guidelines.

Backport of MR !11447

Merge branch 'backport-ondrej/clarify-the-use-of-tools-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11582
2026-02-23 08:03:42 +01:00
Ondřej Surý
877b946af7 Provide guidelines for tool-generated content
In the last few years, the capabilities of coding tools have exploded.
As those capabilities have expanded, contributors and maintainers have
more and more questions about how and when to apply those capabilities.

Add new documentation to guide contributors on how to best use BIND 9
development tools, new and old.

In short: Please show your work and make sure your contribution is
easy to review.

This has been adopted from the Linux Kernel guidelines.

(cherry picked from commit 3fe2215afb)
2026-02-23 06:23:54 +00:00
Petr Špaček
79db9393b1 [9.18] chg: ci: cross-version-config-tests should hard fail again
Backport of MR !11560

Merge branch 'backport-reenable-cross-version-tests-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11562
2026-02-19 14:07:43 +00:00
Petr Špaček
cbf826ab21 Cross-version-config-tests should hard fail again
New tag was released so we can now re-enable check disabled in
093bef9211.

(cherry picked from commit ae657429f6)
2026-02-18 15:20:44 +00:00
Petr Špaček
f42bbfb8e9 Merge tag 'v9.18.45' into bind-9.18 2026-02-18 10:33:52 +00:00
Mark Andrews
c94157ce53 [9.18] fix: doc: Document that dig's query options are order sensitive
Closes #5730

Backport of MR !11526

Merge branch 'backport-5730-document-query-options-order-sensitive-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11543
2026-02-10 10:31:28 +11:00
Mark Andrews
38189b6ec4 Document that query options are order sensitive
(cherry picked from commit 879d2ed480)
2026-02-09 22:47:20 +00:00
Ondřej Surý
600448e6fb [9.18] fix: nil: Release gnamebuf also on the error path
In dst_gssapi_acceptctx(), the gnamebuf could leak a little bit of
memory if dns_name_fromtext() would theoretically fail.  This would
require a Kerberos principal with invalid DNS name.

Closes #5737

Backport of MR !11536

Merge branch 'backport-5737-memory-leak-in-dst_gssapi_acceptctx-on-dns_name_fromtext-failure-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11538
2026-02-06 19:15:24 +01:00
Ondřej Surý
7a90d3c406
Release gnamebuf also on the error path
In dst_gssapi_acceptctx(), the gnamebuf could leak a little bit of
memory if dns_name_fromtext() would theoretically fail.  This would
require a Kerberos principal with invalid DNS name.

(cherry picked from commit 3ad87f1ad6)
2026-02-06 18:37:44 +01:00
Michał Kępień
ecbe2b7da3 [9.18] [CVE-2025-13878] sec: test: Add a regression test for the BRID/HHIT crash
Add two short records to example.com.db that cause assertion failures
when converted to wire form.

The checks added to tests.sh are technically not required: the relevant
assertion failures are already hit when the zone is transferred out of
ns1.

Update the relevant unit tests with 1-byte records.

Co-authored-by: Mark Andrews <marka@isc.org>

Closes #5616

Backport of MR !11522

Merge branch 'backport-5616-add-brid-hhit-towire-tests-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11524
2026-02-05 20:58:07 +01:00
Matthijs Mekking
ed2a7384b5 Add a regression test for the BRID/HHIT crash
Add two short records to example.com.db that cause assertion failures
when converted to wire form.

The checks added to tests.sh are technically not required: the relevant
assertion failures are already hit when the zone is transferred out of
ns1.

Update the relevant unit tests with 1-byte records.

Co-authored-by: Mark Andrews <marka@isc.org>
(cherry picked from commit ce1d68cbc5)
2026-02-05 18:23:56 +00:00
Petr Špaček
bfaaa12a8e Update BIND version for release 2026-02-04 15:50:14 +01:00
Petr Špaček
97e817a1a7 new: doc: Prepare documentation for BIND 9.18.45
Merge branch 'pspacek/prepare-documentation-for-bind-9.18.45' into 'v9.18.45-release'

See merge request isc-private/bind9!908
2026-02-04 14:08:04 +00:00
Petr Špaček
9b45629c63 Tweak and reword release notes 2026-02-04 15:02:29 +01:00
Petr Špaček
d6f4a18694 Prepare release notes for BIND 9.18.45 2026-02-04 15:00:18 +01:00
Petr Špaček
933210ebd8 Generate changelog for BIND 9.18.45 2026-02-04 14:59:50 +01:00
Petr Špaček
fb6433f6a2 chg: doc: Set up version for BIND 9.18.46
Merge branch 'andoni/set-up-version-for-bind-9.18.46' into 'bind-9.18'

See merge request isc-projects/bind9!11512
2026-02-04 09:04:53 +00:00
Andoni Duarte Pintado
89bdf1f4a0 Update BIND version to 9.18.46-dev 2026-02-04 09:37:22 +01:00
Mark Andrews
804dababd0 [9.18] fix: test: ISC_RUN_TEST_IMPL should use a static declaration
These functions don't need to be called from multiple places and
by making them static we will detect when they are not added to the
list functions to be tested.

Closes #5715

Backport of MR !11480

Merge branch 'backport-5715-isc_run_test_impl-should-use-a-static-declaration-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11503
2026-01-29 01:46:36 +11:00
Mark Andrews
837fc382b4 ISC_RUN_TEST_IMPL should use a static declaration
These functions don't need to be called from multiple places and
by making them static we will detect when they are not added to the
list functions to be tested.

(cherry picked from commit 22d664aa15)
2026-01-29 00:43:25 +11:00
Nicki Křížek
635a3d6824 [9.18] fix: test: Resolve the system_test_dir in pytest
If the system_test_dir contains a symlink, then it might cause issues
further down when using relative_to(), unless it is resolved first. This
has been observed on FreeBSD13 in CI where /home is a symlink to
/usr/home.

Backport of MR !11490

Merge branch 'backport-nicki/pytest-freebsd13-artifacts-path-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11495
2026-01-27 13:18:23 +01:00
Nicki Křížek
77a627dfd5 Resolve the system_test_dir in pytest
If the system_test_dir contains a symlink, then it might cause issues
further down when using relative_to(), unless it is resolved first. This
has been observed on FreeBSD13 in CI where /home is a symlink to
/usr/home.

(cherry picked from commit b1e3469059)
2026-01-27 12:33:33 +01:00
Mark Andrews
e3caaa16f1 [9.18] fix: usr: Fix brid and hhit implementation
Fix bugs in BRID and HHIT implementation and enable
the unit tests.

Closes #5710

Backport of MR !11491

Merge branch 'backport-5710-fix-hhit-and-brid-issues-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11493
2026-01-27 19:24:58 +11:00
Mark Andrews
975eab94b2 Fix brid and hhit unit tests
These tests were not being run.

(cherry picked from commit 97af8fc519)
2026-01-27 05:46:22 +00:00
Mark Andrews
3b049e21cf Remove extraneous space at start of brid and hhit records
(cherry picked from commit 10366e4f4e)
2026-01-27 05:46:22 +00:00
Mark Andrews
bf237274fc Fix isc_base64_tobuffer call for brid and hhit
Zero length records were not being rejected.

(cherry picked from commit bdb9c838a8)
2026-01-27 05:46:22 +00:00
Mark Andrews
6fd748d1fc [9.18] fix: usr: DSYNC record incorrectly used two octets for the Scheme Field
When creating the `DSYNC` record from a structure, `uint16_tobuffer` was used instead of `uint8_tobuffer` when adding the scheme, causing a `DSYNC` record that was one octet too long. This has been fixed.

Closes #5711

Backport of MR !11477

Merge branch 'backport-5711-dsync_fromstruct-produces-an-invalid-record-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11484
2026-01-24 02:15:13 +11:00
Mark Andrews
b0669eb377 Fix dsync unit test
The dsync unit test was not being run and the domain names in
the test data should have been fully qualified.

(cherry picked from commit 2159f74a1f)
2026-01-23 14:24:32 +00:00
Mark Andrews
17341ea835 dsync_from struct produced an invalid record
uint16_tobuffer was used instead of uint8_tobuffer when adding the
scheme to the buffer.  This produced a record that was one octet
too long.  This has been fixed.

(cherry picked from commit 3180e50459)
2026-01-23 14:24:32 +00:00
Andoni Duarte
5737de4698 [9.18] chg: ci: Use a small always-on runner for lightweight CI jobs
Some CI jobs spend more time pulling the docker image and setting up their environment than running the script. This MR adds a tag `smalljob` to jobs considered lightweight in order to run them on a dedicated small VM.

Backport of MR !11266

Merge branch 'backport-andoni/try-small-vm-for-lightweight-ci-jobs-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!11482
2026-01-23 12:41:19 +00:00
Andoni Duarte Pintado
c6f7763f63
Add smalljob tag to small jobs not in the quick-checks stage
Jobs using the "post_merge" and "manual_release_job_qa" anchors also
complete in less than a minute, so they now include the "smalljob" tag.

Since the "release" job is also a fast one, but without an anchor, the
"smalljob" tag is added to its definition.

The "autoconf_job" definion also includes the tag and it is kept in its
own stage.

(cherry picked from commit e9f2b7944e)
2026-01-23 12:52:57 +01:00
Andoni Duarte Pintado
3ae666b59f
De-duplicate yaml for "other-checks" jobs
In .gitlab-ci.yml, since "&other_checks_job" has "needs: []", remove
that line from the jobs that use that anchor.

(cherry picked from commit 66175b448c)
2026-01-23 12:52:57 +01:00
Andoni Duarte Pintado
1efc391e35
Move "needs: []" to the "quick_checks_job" anchor
Most jobs in this stage have it by default, so it makes sense to
add it to their common anchor. Jobs with different "needs:" will
override it.

(cherry picked from commit 432b7d7954)
2026-01-23 12:52:57 +01:00
Andoni Duarte Pintado
4f17d528e8
Group CI jobs in "quick-checks" stage together
Move the jobs in the "quick-checks" stage to the same place in
.gitlab-ci.yml.

(cherry picked from commit b3ac6b47d9)
2026-01-23 12:52:57 +01:00
Andoni Duarte Pintado
6e80903b85
Add faster CI jobs to the "quick-checks" stage
Given the short runtime (<1min) of the "linkcheck" and
"generate-tsan-stress-test-configs" CI jobs, move them to the
"quick-checks" stage.

(cherry picked from commit ae76829157)
2026-01-23 12:52:57 +01:00
Andoni Duarte Pintado
83af3d58dc
Move CI stage "other-checks" right after "quick-checks"
Move CI stage "other-checks" right after "quick-checks" and get the jobs
in it as close to each other as possible in .gitlab-ci.yml.

Since no job is allowed to depend (via "needs") on any job that is
assigned to a stage later than its own, move the "tsan:stress" and
"gcov" jobs to the "system" stage.

(cherry picked from commit 4f89d32bff)
2026-01-23 12:52:57 +01:00
Andoni Duarte Pintado
52841c2101
Move slower CI jobs out of "quick-checks" stage
Jobs with more than one minute of runtime are not considered for the
small VM.

The "tarball-create" job goes to the more appropriate "build" stage.

"coccinelle" and "checkbashisms" are moved to the generic
"other-checks".

(cherry picked from commit ba5844a1de)
2026-01-23 12:52:57 +01:00
Andoni Duarte Pintado
15fc00e7f2
Create "other_checks_job" anchor in CI yaml
Use an anchor for the common parts of "other-checks" jobs in CI yaml.

(cherry picked from commit e61bc3ad72)
2026-01-23 12:52:57 +01:00
Andoni Duarte Pintado
6daa51e3bb
Rename the "postcheck" stage to "other-checks" in CI
Rename the "postcheck" CI stage to the more generic "other-checks".
Slower jobs that still run in autoscaled runners belong here, as opposed
to the lightweight ones in "quick-checks".

(cherry picked from commit 6d442c4a06)
2026-01-23 12:52:57 +01:00
Andoni Duarte Pintado
1eeeb0dff4
Rename the "precheck" stage in CI to "quick-checks"
Most jobs in the "precheck" stage spend more time setting up their
environment than running the script (seconds), this allows us to add a
small always on dedicated runner instead of the autoscaled ones.

Hence, the stage is renamed to "quick-checks", and a tag "smalljob" is
added to the anchor so that these jobs are picked by the dedicated
runner.

(cherry picked from commit 9aa5041a88)
2026-01-23 12:52:57 +01:00