Commit graph

40497 commits

Author SHA1 Message Date
Michał Kępień
d12daaaf71
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 497f771ae3)
2026-05-21 11:31:34 +02:00
Michał Kępień
cf96626ab6
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 5cd870053e)
2026-05-21 11:31:34 +02:00
Michał Kępień
8030e7014c
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 4c0e93108e)
2026-05-21 11:31:34 +02:00
Michał Kępień
88867b73aa
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 98c3f339bf)
2026-05-21 11:31:34 +02:00
Michal Nowak
a5ad7777c0 [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
2026-05-21 08:55:46 +02:00
Michal Nowak
f650794f64 Add Fedora 44
(cherry picked from commit 175b4f1711)
2026-05-21 07:55:02 +02:00
Andoni Duarte
ec35c78729 Merge tag 'v9.18.49' into bind-9.18
Some checks are pending
CodeQL / Analyze (push) Waiting to run
SonarCloud / Build and analyze (push) Waiting to run
2026-05-20 10:18:26 +00:00
Ondřej Surý
9b53e4be29 [9.18] rem: usr: Remove ineffective TCP fallback after repeated UDP timeouts
Some checks are pending
CodeQL / Analyze (push) Waiting to run
SonarCloud / Build and analyze (push) Waiting to run
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
2026-05-19 13:05:19 +02:00
Ondřej Surý
f82c6f0cba 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 01523a078a)
2026-05-19 09:19:37 +00:00
Ondřej Surý
0fe9e2c923 [9.18] fix: nil: More changes to PR-Agent CI job
Some checks failed
CodeQL / Analyze (push) Has been cancelled
SonarCloud / Build and analyze (push) Has been cancelled
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
2026-05-17 12:22:29 +02:00
Ondřej Surý
440b313a63
Add both Claude 4.6 and ChatGPT in two separate job pipelines
(cherry picked from commit ee5e933933)
2026-05-17 11:45:00 +02:00
Ondřej Surý
8eca13c68a
Allow failure to not block pipelines for the PR-Agent CI job
(cherry picked from commit dae0820f80)
2026-05-17 11:44:33 +02:00
Ondřej Surý
ce794fc7be
Change the PR-Agent configuration to use Claude 4.6
(cherry picked from commit 99194aec84)
2026-05-17 11:44:33 +02:00
Ondřej Surý
d850afcbf4 [9.18] new: dev: Enable PR-Agent reviews on merge requests
Some checks are pending
CodeQL / Analyze (push) Waiting to run
SonarCloud / Build and analyze (push) Waiting to run
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
2026-05-16 15:08:29 +02:00
Ondřej Surý
1356ca2a96
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 07345b25d9)
(cherry picked from commit 4257454262)
(cherry picked from commit 5550fb84ae)
2026-05-16 13:39:49 +02:00
Ondřej Surý
eb56645333 [9.18] fix: test: Fix flaky reclimit test
Some checks are pending
CodeQL / Analyze (push) Waiting to run
SonarCloud / Build and analyze (push) Waiting to run
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
2026-05-15 09:51:18 +02:00
Ondřej Surý
0521f74bc4 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 80f04a9ee5)
2026-05-15 09:51:10 +02:00
Ondřej Surý
f175d8c63b [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
2026-05-15 09:50:52 +02:00
Ondřej Surý
a9501a9979
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 11bca1051f)
2026-05-15 08:06:34 +02:00
Michal Nowak
4b37896f7c [9.18] fix: ci: Don't forward parent yaml variables to stress child pipelines
Some checks failed
CodeQL / Analyze (push) Has been cancelled
SonarCloud / Build and analyze (push) Has been cancelled
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
2026-05-14 07:01:21 +02:00
Michal Nowak
f0badb8cb5 Inherit global TSAN_* variables for tsan stress jobs 2026-05-13 22:27:54 +02:00
Michal Nowak
ad5cb84652 Inherit global CONFIGURE variable for stress tests
CONFIGURE is needed to build BIND 9 stress tests of 9.20 and 9.18
branches.
2026-05-13 19:15:11 +02:00
Michal Nowak
bcd364d6f4 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 73915b73d1)
2026-05-13 16:42:14 +00:00
Michal Nowak
7bc73313bf [9.18] chg: ci: Set RUNNER_SCRIPT_TIMEOUTs
Some checks failed
CodeQL / Analyze (push) Has been cancelled
SonarCloud / Build and analyze (push) Has been cancelled
Backport of MR !11750

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

See merge request isc-projects/bind9!12007
2026-05-12 19:14:51 +02:00
Michal Nowak
3b8e943cf5 Get some useful data out of respdiff even in case of a failure
Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit 7928127d8b)
2026-05-12 18:37:57 +02:00
Michal Nowak
0f63c15718 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 4f410ee1e6)
2026-05-12 18:36:53 +02:00
Michal Nowak
69ca6ee366 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 e3d2f5ad94)
2026-05-12 16:05:25 +00:00
Michal Nowak
0f0d88447a [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
2026-05-12 15:22:25 +02:00
Mark Andrews
48eb8487c4 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)
2026-05-12 14:26:08 +02:00
Michal Nowak
cc8fa5349a
Do not run Noble Numbat unit test job in MRs
(cherry picked from commit 9978393c36)
2026-05-11 18:40:09 +02:00
Michal Nowak
9d74ea6e20
Add Ubuntu 26.04 Resolute Raccoon
(cherry picked from commit 14457ec326)
2026-05-11 18:40:09 +02:00
Michał Kępień
c21572cbbd [9.18] chg: ci: Add commit link and diff to RPM build job logs
Some checks are pending
CodeQL / Analyze (push) Waiting to run
SonarCloud / Build and analyze (push) Waiting to run
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
2026-05-11 17:46:55 +02:00
Michał Kępień
b08bc5f932 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 6d51073f22)
2026-05-11 15:44:34 +00:00
Michał Kępień
b9a5ab34cb [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
2026-05-11 16:27:39 +02:00
Michał Kępień
f9ced82a42
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 703ad9a6de)
2026-05-11 16:25:20 +02:00
Michał Kępień
a47dc9a7ed 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 bac4a57759)
2026-05-11 14:24:11 +00:00
Michał Kępień
bb4ce23873 [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
2026-05-11 10:14:13 +02:00
Michał Kępień
3e508bbbf5 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 bb40c34638)
2026-05-11 08:09:40 +00:00
Andoni Duarte Pintado
cd4a53b463 Update BIND version for release 2026-05-08 16:41:25 +02:00
Andoni Duarte
e356746b6c 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
2026-05-08 14:36:53 +00:00
Andoni Duarte Pintado
f56ed00f0e Tweak and reword release notes 2026-05-08 15:32:06 +02:00
Andoni Duarte Pintado
4b34c68781 Prepare release notes for BIND 9.18.49 2026-05-08 15:32:06 +02:00
Andoni Duarte Pintado
3659633ba2 Generate changelog for BIND 9.18.49 2026-05-08 15:32:05 +02:00
Michał Kępień
a8a2a15f44 [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
2026-05-07 18:08:34 +02:00
Petr Špaček
805beb13e5 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 afdf7bed60)
2026-05-07 16:06:06 +00:00
Michał Kępień
0b9c3ee546 [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
2026-05-07 17:55:32 +02:00
Michał Kępień
873b1e7214 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 88b94a2019)
2026-05-07 15:52:08 +00:00
Ondřej Surý
d489d825dc
[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
2026-05-07 13:21:59 +02:00
Ondřej Surý
874a19c71b
[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
2026-05-07 13:21:59 +02:00
Ondřej Surý
01c78f3fc6
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)
2026-05-07 13:21:59 +02:00