Commit graph

35969 commits

Author SHA1 Message Date
Michal Nowak
68acd1136b
Replace Oracle Linux Docker images with AlmaLinux ones
To be consistent with the replacing of Oracle Linux QCOW2 images with
AlmaLinux AWS AMIs, also replace Docker images.

(cherry picked from commit 63947a2062)
2025-05-29 17:22:47 +02:00
Michal Nowak
35ceab95de [9.16] rem: ci: Drop Ubuntu 20.04 Focal Fossa
Focal-specific ./configure options were moved to Jammy.

Backport of MR !9899

Merge branch 'backport-mnowak/drop-ubuntu-focal-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!10457
2025-05-13 17:29:52 +00:00
Michal Nowak
ac9a24c7fb
Make FreeBSD 12.x part of Community-Maintained platforms
(cherry picked from commit ff39441874)
2025-05-13 18:44:44 +02:00
Michal Nowak
0728ca4b70
Drop Ubuntu 20.04 Focal Fossa
Focal-specific ./configure options were moved to Jammy.

(cherry picked from commit 326e19a65a)
2025-05-13 18:43:16 +02:00
Ondřej Surý
dbb559c58f [9.16] [9.18] fix: dev: Unify the int32_t vs int_fast32_t when working with atomic types
There's a mismatch between the atomic and non-atomic types that could
potentialy lead to a rwlock deadlock (after two billion 2^32) writes.
Use int_fast32_t when loading the atomic_int_fast32_t types in the
isc_rwlock unit.

Closes #5280

Backport of MR !10390

Merge branch 'backport-5280-match-the-types-in-isc_rwlock-9.18-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!10391
2025-04-14 19:19:32 +00:00
Ondřej Surý
ae54bd8076 Unify the int32_t vs int_fast32_t when working with atomic types
There's a mismatch between the atomic and non-atomic types that could
potentialy lead to a rwlock deadlock (after two billion 2^32) writes.
Use int_fast32_t when loading the atomic_int_fast32_t types in the
isc_rwlock unit.

(cherry picked from commit 86673ee67a)
2025-04-14 17:40:09 +00:00
Nicki Křížek
f34be9f549 [9.16] new: ci: Allow pushing branches and tags to customer git repos
For pipelines in the private repository, add an optional manual job,
which allows the current branch to be pushed into the specified
customer's git repository. This can be useful to provide patch previews
for early testing.

For tags created in a private repository, add a manual job which pushes
the created tag to all entitled customers.

Backport of MR !10323

Merge branch 'backport-nicki/ci-customer-git-automation-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!10358
2025-04-02 11:13:28 +00:00
Nicki Křížek
3aed419aaa Allow pushing branches and tags to customer git repos
For pipelines in the private repository, add an optional manual job,
which allows the current branch to be pushed into the specified
customer's git repository. This can be useful to provide patch previews
for early testing.

For tags created in a private repository, add a manual job which pushes
the created tag to all entitled customers.

(cherry picked from commit 378b412e94)
2025-04-02 11:04:27 +00:00
Michal Nowak
28d169f47b Add Clang 20
Clang 18 is no longer in the base image with a recent image update and clang-format and scan-build fail.

Merge branch 'mnowak/missing-clang-18' into 'bind-9.16'

See merge request isc-projects/bind9!10269
2025-03-19 08:09:38 +00:00
Michal Nowak
4cea574ddc Drop scan-build job
With the updated Clang 20, the scan-build job fails identifying 10 bugs,
but they are unlikely to be addressed in this EoL branch.
2025-03-19 08:02:18 +00:00
Michal Nowak
d00d73e953 Drop clang-format job
With updated Clang, the job won't pass. Reformating the code just for
the sake of the job seems futile.
2025-03-19 08:02:18 +00:00
Michal Nowak
9038fc194b Update CLANG_VERSION to 20
With a recent image update Clang 18 is no longer in the base image.
Update the Clang version used to 20.
2025-03-19 08:02:18 +00:00
Arаm Sаrgsyаn
c99cdd2b0d [9.16] new: dev: Implement -T cookiealwaysvalid
When `-T cookiealwaysvalid` is passed to `named`, DNS cookie checks for
the incoming queries always pass, given they are structurally correct.

Backport of MR !10232

Merge branch 'backport-aram/new-named-minus-T-option-of-cookiealwaysvalid-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!10266
2025-03-18 16:20:10 +00:00
Aram Sargsyan
7010948de9 Test -T cookiealwaysvalid
Add a check in the "cookie" system test to make sure that the new
'-T cookiealwaysvalid' option works.

(cherry picked from commit 4e75a20b6a)
2025-03-17 12:15:24 +00:00
Aram Sargsyan
3aa51f574e Implement -T cookiealwaysvalid
When -T cookiealwaysvalid is passed to named, DNS cookie checks for
the incoming queries always pass, given they are structurally correct.

(cherry picked from commit 807ef8545d)
2025-03-17 12:05:50 +00:00
Michal Nowak
bfefc88125 Drop unused libvirt anchor
This is a leftover from f08f69c54d.

Merge branch 'mnowak/drop-libvirt-anchor' into 'bind-9.16'

See merge request isc-projects/bind9!10231
2025-03-11 13:12:18 +00:00
Michal Nowak
5d3f867d52
Drop unused libvirt anchor
This is a leftover from f08f69c54d.
2025-03-11 14:10:37 +01:00
Michal Nowak
53f940f77a Drop FreeBSD and OpenBSD from CI
Both FreeBSD and OpenBSD in the CI are tested on outdated images.
Current FreeBSD images can't even be rebuild because in the maintained
branches they were ported from QCOW2 to the AWS autoscaler (also a
future of the OpenBSD image). This is something we don't want to
backport to EoL branches.

Merge branch 'mnowak/drop-bsd-images-from-ci' into 'bind-9.16'

See merge request isc-projects/bind9!10229
2025-03-11 12:42:59 +00:00
Michal Nowak
f08f69c54d
Drop FreeBSD and OpenBSD from CI
Both FreeBSD and OpenBSD in the CI are tested on outdated images.
Current FreeBSD images can't even be rebuild because in the maintained
branches they were ported from QCOW2 to the AWS autoscaler (also a
future of the OpenBSD image). This is something we don't want to
backport to EoL branches.
2025-03-11 10:56:18 +01:00
Michal Nowak
4c9d4ddbaf Drop some unit tests
After isc-projects/images!330, kyua is present in fewer images.

Merge branch 'mnowak/drop-some-unit-tests' into 'bind-9.16'

See merge request isc-projects/bind9!10041
2025-02-03 19:02:54 +00:00
Michal Nowak
ddb31932bb
Revert "Build contrib dlz modules in the CI"
The libsqlite3-dev package is not present in "bookworm" images and some
unsupported contrib modules won't build.

This reverts commit 8f2f5c426e.
2025-02-03 19:52:44 +01:00
Michal Nowak
a23b6b6934
Drop Tumbleweed unit test
openSUSE Tumbleweed image does not have kyua anymore.
2025-02-03 12:09:40 +01:00
Michal Nowak
d3ddcd8660
Drop unit:gcc:focal:amd64
The "focal" image does not have kyua.
2025-02-03 12:09:40 +01:00
Michal Nowak
10d2ec2c2e
Move --without-cmocka to Ubuntu 20.04 (Focal Fossa)
"focal" does not have kyua in its stock repositories and is a good
candidate to build BIND 9 with this ./configure option.
2025-02-03 12:09:40 +01:00
Petr Špaček
02ad95cec1 [9.16] fix: ci: Do not trigger post-merge jobs for cross-project pushes
Backport of MR !10029
Backport of MR !10042

Merge branch 'backport-pspacek/no-cross-project-after-merge-jobs-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!10045
2025-01-31 14:16:39 +00:00
Petr Špaček
ee94b97cea Fix shell escaping in post-merge before_script
Fixup for commit 6014060774
"Do not trigger post-merge jobs for cross-project pushes".

Related: isc-projects/bind9!10029
(cherry picked from commit 6276e0b23b)
2025-01-31 15:12:37 +01:00
Petr Špaček
cc491cf977 Do not trigger post-merge jobs for cross-project pushes
We need to avoid double-triggering of post-merge jobs in the following
scenario:

 1. A private MR gets merged into the private BIND 9 repository.

 2. This merge operation triggers a "push" pipeline in the private
    repository, which correctly runs post-merge jobs, e.g. to set MR
    metadata in the private project.

 3. When a release is published, a script is run to change the
    automatically assigned milestone value ("Not released yet") to
    something else.

 4. Shortly afterwards, the result of the merge from step 1 is merged
    back into a maintenance branch in the public repository.

 5. The push operation triggers another "push" pipeline, this time in
    the public project.

At this point there are two problems:

  - If the script is dumb (like it currently is), it will extract the
    merge request ID from the merge commit description and change the
    milestone for a merge request in the wrong project namespace.

  - Even if the script was fixed to extract and use the correct GitLab
    project reference, it would reset the milestone for the merge
    request in the private repository back to "Not released yet" - while
    the milestone set in step 3 should be retained.

An alternative would be to change the order of operations so that
post-release milestoning happens at a later stage, while also fixing the
script to correctly follow cross-project references, but that approach
seems more fragile than simply failing on all cross-project pushes.  The
rule to enforce is: each project should only take care of its own
post-merge tasks.

(cherry picked from commit 6014060774)
2025-01-31 14:49:41 +01:00
Michał Kępień
77397bb05a [9.16] chg: ci: Use default cloning depth for the Danger CI job
With shallow fetching working reliably in pygit2 1.17.0+, there is no
longer any need for GitLab CI runners to clone the BIND 9 repository
with a fixed depth of 1000 during every "danger" CI job as Hazard is now
able to fetch remote refs with an arbitrary depth, controlled by the
HAZARD_FETCH_DEPTH environment variable.  The latter can be defined via
GitLab project's CI settings and adjusted as needed over time, without
the need to update .gitlab-ci.yml every time its value needs to be
changed.

Backport of MR !9946

Merge branch 'backport-michal/use-default-cloning-depth-for-the-danger-ci-job-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!10039
2025-01-31 09:37:54 +00:00
Michał Kępień
df5390230f
Use default cloning depth for the Danger CI job
With shallow fetching working reliably in pygit2 1.17.0+, there is no
longer any need for GitLab CI runners to clone the BIND 9 repository
with a fixed depth of 1000 during every "danger" CI job as Hazard is now
able to fetch remote refs with an arbitrary depth, controlled by the
HAZARD_FETCH_DEPTH environment variable.  The latter can be defined via
GitLab project's CI settings and adjusted as needed over time, without
the need to update .gitlab-ci.yml every time its value needs to be
changed.

(cherry picked from commit e39e7afc16)
2025-01-31 10:37:15 +01:00
Nicki Křížek
15754f7845 Merge branch 'bind-9.16-release' into bind-9.16 2025-01-29 19:40:05 +01:00
Michal Nowak
14f88bc241 Drop stress tests
After isc-projects/bind9-qa!9 merged BIND 9 releases without DoH/DoT
support are not supported.

Merge branch 'mnowak/drop-stress-tests' into 'bind-9.16'

See merge request isc-projects/bind9!10005
2025-01-27 16:10:36 +00:00
Michal Nowak
4a7753cda3
Drop stress tests
After isc-projects/bind9-qa!9 merged BIND 9 releases without DoH/DoT
support are not supported.
2025-01-27 16:26:54 +01:00
Nicki Křížek
4aa5ace95d [9.16] [CVE-2024-11187] sec: usr: Limit the additional processing for large RDATA sets
When answering queries, don't add data to the additional section if the answer has more than 13 names in the RDATA. This limits the number of lookups into the database(s) during a single client query, reducing query processing load.

Backport of MR !750

See isc-projects/bind9#5034

Merge branch '5034-security-limit-additional-9.16' into 'bind-9.16-release'

See merge request isc-private/bind9!760
2025-01-20 16:17:08 +00:00
Ondřej Surý
9dc22c65e8 Limit the additional processing for large RDATA sets
When answering queries, don't add data to the additional section if
the answer has more than 13 names in the RDATA.  This limits the
number of lookups into the database(s) during a single client query,
reducing query processing load.

Also, don't append any additional data to type=ANY queries. The
answer to ANY is already big enough.

(cherry picked from commit a1982cf1bb)
2025-01-20 17:05:38 +01:00
Ondřej Surý
da68396086 Isolate using the -T noaa flag only for part of the resolver test
Instead of running the whole resolver/ns4 server with -T noaa flag,
use it only for the part where it is actually needed.  The -T noaa
could interfere with other parts of the test because the answers don't
have the authoritative-answer bit set, and we could have false
positives (or false negatives) in the test because the authoritative
server doesn't follow the DNS protocol for all the tests in the resolver
system test.

(cherry picked from commit e51d4d3b88)
2025-01-20 17:05:38 +01:00
Arаm Sаrgsyаn
4f876e7111 [9.16] fix: dev: Fix a bug in isc_rwlock_trylock()
When isc_rwlock_trylock() fails to get a read lock because another
writer was faster, it should wake up other waiting writers in case
there are no other readers, but the current code forgets about
the currently active writer when evaluating 'cntflag'.

Unset the WRITER_ACTIVE bit in 'cntflag' before checking to see if
there are other readers, otherwise the waiting writers, if they exist,
might not wake up.

Closes #5121

Backport of MR !9937

Merge branch 'backport-aram/isc_rwlock_trylock-bugfix-9.18-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9938
2025-01-08 12:39:51 +00:00
Aram Sargsyan
aef3f26aaf Fix a bug in isc_rwlock_trylock()
When isc_rwlock_trylock() fails to get a read lock because another
writer was faster, it should wake up other waiting writers in case
there are no other readers, but the current code forgets about
the currently active writer when evaluating 'cntflag'.

Unset the WRITER_ACTIVE bit in 'cntflag' before checking to see if
there are other readers, otherwise the waiting writers, if they exist,
might not wake up.

(cherry picked from commit 73b6d9e9e5)
2025-01-08 10:30:05 +00:00
Michal Nowak
40ecc8a67e [9.16] chg:test: Disable too-many/too-few pylint checks
Enforcing pylint standards and default for our test code seems
counter-productive. Since most of the newly added code are tests or is
test-related, encountering these checks rarely make us refactor the code
in other ways and we just disable these checks individually. Code that
is too complex or convoluted will be pointed out in reviews anyways.

(cherry picked from commit f7319a38cf277c2140f0ed7ab46fd616b9322587)

Backport of MR !9626

Merge branch 'backport-nicki/pylint-disable-too-few-too-many-checks-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9806
2024-12-03 10:32:21 +00:00
Nicki Křížek
d4fb094ee8
Disable too-many/too-few pylint checks
Enforcing pylint standards and default for our test code seems
counter-productive. Since most of the newly added code are tests or is
test-related, encountering these checks rarely make us refactor the code
in other ways and we just disable these checks individually. Code that
is too complex or convoluted will be pointed out in reviews anyways.

(cherry picked from commit 7639c58c48)
2024-12-03 10:42:58 +01:00
Evan Hunt
31d8e3b21f [9.16] new: usr: Update bind.keys with the new 2025 IANA root key
Add an 'initial-ds' entry to bind.keys for the new root key, ID
38696, which is scheduled for publication in January 2025.

Closes #4896

Backport of MR !9422

Merge branch 'backport-4896-update-bind-keys-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9748
2024-11-16 00:31:28 +00:00
Evan Hunt
a2f8b76c5e Add the DS for the new root key (38696)
Add an 'initial-ds' entry to bind.keys for the new root key, ID
38696, scheduled for publication in January 2025.

(cherry picked from commit 609bf35075)
2024-11-15 15:58:37 -08:00
Michal Nowak
ce033c945d [9.16] chg: test: Support dnspython 2.7.0
Closes #4988

Backport of MR !9634

Merge branch 'backport-4988-dnspython-2.7.0-support-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9677
2024-10-22 07:13:12 +00:00
Nicki Křížek
11beae640e
Support dnspython 2.7.0
CookieOption with new .server/.client attributes (rather than .data) was
added to dnspython. Adjust the code to use the new attributes if
available and fall back to the old code for dnspython<2.7.0
compatibility.

(cherry picked from commit 0d90b13646)
2024-10-22 08:31:07 +02:00
Michal Nowak
463a47bcc2 [9.16] chg: ci: Exclude some RPZ files from long stress test artifacts
This fixes 6f86885304, that excluded files
only from short stress tests.

Validation jobs:
- [x] short - [#4756989](https://gitlab.isc.org/isc-projects/bind9/-/jobs/4756989/artifacts/browse/output/ns4/) - 
- [x] long - [#4757196](https://gitlab.isc.org/isc-projects/bind9/-/jobs/4757196/artifacts/browse/output/ns4/)

Backport of MR !9522

Merge branch 'backport-mnowak/exclude-some-rpz-files-from-long-stress-tests-artifacts-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9540
2024-09-23 12:25:34 +00:00
Michal Nowak
2a500446ed Exclude some RPZ files from long stress test artifacts
This fixes 6f86885304, that excluded files
only from short stress tests.

(cherry picked from commit 871eeed519)
2024-09-23 11:21:00 +00:00
Michal Nowak
4540b3dd2d [9.16] chg: test: Be more patient when stopping servers in the system tests
When the TCP test is run on the busy server, the server might take a
while to wind the server down because it might still be processing all
that 300k invalid XFR requests.

Increate the rncd wait time to 120 seconds, the SIGTERM time to 300
seconds, and reduce the time to wait for ans servers from 1200 second
to just 120 seconds.

(cherry picked from commit d971472321)

Backport of MR !6847

Merge branch 'backport-ondrej-increase-the-time-to-wait-for-servers-to-gracefully-shutdown-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9468
2024-09-10 12:44:51 +00:00
Ondřej Surý
6d5e81c096
Be more patient when stopping servers in the system tests
When the TCP test is run on the busy server, the server might take a
while to wind the server down because it might still be processing all
that 300k invalid XFR requests.

Increate the rncd wait time to 120 seconds, the SIGTERM time to 300
seconds, and reduce the time to wait for ans servers from 1200 second
to just 120 seconds.

(cherry picked from commit d971472321)
2024-09-10 12:50:20 +02:00
Michal Nowak
b16314289f [9.16] chg: ci: Cleanup stress test artifacts
Backport of MR !9424

Merge branch 'backport-mnowak/avoid-some-artifacts-in-stress-tests-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9430
2024-08-28 08:56:33 +00:00
Michal Nowak
aa83d1150d Some stress test artifacts should not be saved in CI artifact
(cherry picked from commit 6f86885304)
2024-08-28 08:01:32 +00:00
Michal Nowak
5112d78950 chg: test: Bump max-recursion-queries to 100 in resolver system test
With max-recursion-queries set to 50 the resolver system test was
unstable in the "checking query resolution for a domain with a valid
glueless delegation chain" check as ns1 replied with SERVFAIL.

Closes #4897

Merge branch '4897-resolver-ns1-bump-max-recursion-queries-to-100' into 'bind-9.16'

See merge request isc-projects/bind9!9421
2024-08-28 07:26:13 +00:00