Commit Graph
35913 Commits
Author SHA1 Message Date
Petr Špaček bed0aea14f Remove milestone check from dangerfile
Milestone is automatically set by 'merged-metadata' CI job to 'Not
released yet' so it does not matter what the original value was.

(cherry picked from commit 73b950dc29)
2024-08-23 10:44:28 +02:00
Petr Špaček 1258078e8a Automatically adjust MR metadata after merge
1. Set milestone to 'Not released yet' after merge
   We will set milestone to actual version number when we actually tag a
   particular version. This will get rid of mass MR reassignment when we
   do last minute changes to a release plan etc.

2. Adjust No CHANGES and Release Notes MR labels to match gitchangelog
   workflow.

(cherry picked from commit 3165261ecd)
(cherry picked from commit d1c64d588b)
2024-08-23 10:44:28 +02:00
Ondřej Surý 5afaed14d3 [9.16] new: usr: Tighten 'max-recursion-queries' and add 'max-query-restarts' option
There were cases in resolver.c when the `max-recursion-queries` quota was ineffective. It was possible to craft zones that would cause a resolver to waste resources by sending excessive queries while attempting to resolve a name. This has been addressed by correcting errors in the implementation of `max-recursion-queries`, and by reducing the default value from 100 to 32.

In addition, a new `max-query-restarts` option has been added which limits the number of times a recursive server will follow CNAME or DNAME records before terminating resolution. This was previously a hard-coded limit of 16, and now defaults to 11.
 
Closes #4741

Backport of MR !9281

Merge branch 'backport-4741-reclimit-restarts-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9284
2024-08-22 09:31:53 +00:00
Evan HuntandOndřej Surý 3e0643a6dc implement 'max-query-restarts'
implement, document, and test the 'max-query-restarts' option
which specifies the query restart limit - the number of times
we can follow CNAMEs before terminating resolution.

(cherry picked from commit 104f3b82fb)
(cherry picked from commit 2e04f0380c)
2024-08-20 17:35:07 +00:00
Evan HuntandOndřej Surý a7a479c258 reduce the max-recursion-queries default to 32
the number of iterative queries that can be sent to resolve a
name now defaults to 32 rather than 100.

(cherry picked from commit 7e3b425dc2)
(cherry picked from commit a11367ade3)
2024-08-20 17:35:07 +00:00
Evan HuntandOndřej Surý 95376b45f5 make "max_restarts" a configurable value
MAX_RESTARTS is no longer hard-coded; ns_server_setmaxrestarts()
and dns_client_setmaxrestarts() can now be used to modify the
max-restarts value at runtime. in both cases, the default is 11.

(cherry picked from commit c5588babaf)
(cherry picked from commit bfbc6a6c84)
2024-08-20 17:35:07 +00:00
Evan HuntandOndřej Surý d1797c9151 reduce MAX_RESTARTS to 11
the number of steps that can be followed in a CNAME chain
before terminating the lookup has been reduced from 16 to 11.
(this is a hard-coded value, but will be made configurable later.)

(cherry picked from commit 05d78671bb)
(cherry picked from commit dd88a4cdfc)
2024-08-20 17:35:07 +00:00
Evan HuntandOndřej Surý 2b756caa4c add debug logging when creating or attaching to a query counter
fctx_create() now logs at debug level 9 when the fctx attaches
to an existing counter or creates a new one.

(cherry picked from commit 825f3d68c5)
(cherry picked from commit 14bce7e275)
2024-08-20 17:35:07 +00:00
Evan HuntandOndřej Surý f89f8af34a apply max-recursion-queries quota to validator queries
previously, validator queries for DNSKEY and DS records were
not counted toward the quota for max-recursion-queries; they
are now.

(cherry picked from commit af7db89513)
(cherry picked from commit 18e39d989f)
2024-08-20 17:35:07 +00:00
Evan HuntandOndřej Surý 1e54e9bb92 attach query counter to NS fetches
there were cases in resolver.c when queries for NS records were
started without passing a pointer to the parent fetch's query counter;
as a result, the max-recursion-queries quota for those queries started
counting from zero, instead of sharing the limit for the parent fetch,
making the quota ineffective in some cases.

(cherry picked from commit d3b7e92783)
(cherry picked from commit 5ab4cae4ed)
2024-08-20 17:35:07 +00:00
Michal Nowak a33dfc4c6f [9.16] rem: ci: Drop Oracle Linux 7
See #3729

Backport of MR !9352

Merge branch 'backport-3729-drop-oracle-linux-7-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9353
2024-08-19 15:57:48 +00:00
Michal Nowak f917cc3abb Drop Oracle Linux 7
(cherry picked from commit 4af28f9ffc)
2024-08-19 17:49:20 +02:00
Ondřej Surý 3644299c49 [9.16] chg: test: Drop TSAN jobs, drop bullseye jobs
The new TSAN images, the TSAN-enabled images install libraries to
opt/tsan, this doesn't work, just drop the TSAN jobs.

Additionally, drop Debian bullseye that's EOL now.

Backport of MR !9324

Merge branch 'backport-ondrej/use-staging-tsan-images-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9327
2024-08-16 07:09:39 +00:00
Ondřej Surý 3aa7be0c4f Also drop softhsm2.6 jobs 2024-08-16 09:07:52 +02:00
Ondřej Surý 8b3b25935d Don't bother with TSAN jobs for end-of-life release 2024-08-16 08:36:05 +02:00
Ondřej Surý a3372ccb5d Remove Debian bullseye jobs
The Debian bullseye has reached end-of-life, remove it from the CI.

(cherry picked from commit d02d6af2b9)
2024-08-16 08:24:05 +02:00
Ondřej Surý f1f88ccc15 For TSAN builds, use libraries from /opt/tsan
The new TSAN images, the TSAN-enabled images install libraries to
/opt/tsan, synchronize the configure options and CFLAGS between gcc:tsan
and clang:tsan images and set the PKG_CONFIG_PATH to /opt/tsan/lib.

(cherry picked from commit 2a46396f29)
2024-08-16 08:06:03 +02:00
Ondřej Surý 39ee669f7e [9.16] chg: test: Use new images with TSAN-enabled libraries
The new Fedora 40 TSAN images use libuv, urcu and OpenSSL libraries compiled with ThreadSanitizer.  This (in theory) should enable better detection of memory races in those (most important) libraries.

Backport of MR !9264

Merge branch 'backport-ondrej/test-new-tsan-images-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9280
2024-08-07 16:02:51 +00:00
Ondřej Surý bdb4f57549 Add configure for libraries in /usr/local for the gcc:tsan job
The TSAN-enabled libraries are installed to /usr/local, pass the
PKG_CONFIG_PATH and few other options to CFLAGS to the configure
arguments.

(cherry picked from commit ed766efc15)
2024-08-07 16:02:42 +00:00
Michał Kępień 17e6a3e334 [9.16] fix: test: refresh base image repos before installing from them
Stale repositories cause issue on installation in the `docs:pdf` CI job:

    E: Failed to fetch http://deb.debian.org/debian/pool/main/s/systemd/libsystemd-shared_252.22-1%7edeb12u1_amd64.deb  404  Not Found [IP: 2a04:4e42:78::644 80]
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Validation job: https://gitlab.isc.org/isc-projects/bind9/-/jobs/4487570

Backport of MR !9164

Merge branch 'mnowak/refresh-base-image-repo-before-installation' into 'bind-9.16'

See merge request isc-projects/bind9!9129
2024-08-07 15:41:57 +00:00
Michal NowakandMichał Kępień a9bc69889c Refresh base image repos before installing from them
Stale repositories cause issue on installation in the docs:pdf CI job:

    E: Failed to fetch http://deb.debian.org/debian/pool/main/s/systemd/libsystemd-shared_252.22-1%7edeb12u1_amd64.deb  404  Not Found [IP: 2a04:4e42:78::644 80]
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

(cherry picked from commit 0077cfd7a6)
2024-08-07 17:04:04 +02:00
Michał Kępień 8026a59dba chg: test: use --without-python for Debian "sid" builds
Debian "sid" images used in GitLab CI no longer contain the distutils
Python module, which prevents the ./configure script from succeeding on
that operating system.  Instead of explicitly installing optional
dependencies for a branch that is no longer actively maintained, add the
--without-python switch to the ./configure invocations on Debian "sid"
to work around the problem.

Merge branch 'michal/disable-python-for-debian-sid-builds' into 'bind-9.16'

See merge request isc-projects/bind9!9260
2024-08-06 11:22:38 +00:00
Michał Kępień 5254bf662d chg: test: use --without-python for Debian "sid" builds
Debian "sid" images used in GitLab CI no longer contain the distutils
Python module, which prevents the ./configure script from succeeding on
that operating system.  Instead of explicitly installing optional
dependencies for a branch that is no longer actively maintained, add the
--without-python switch to the ./configure invocations on Debian "sid"
to work around the problem.
2024-08-06 09:34:53 +02:00
Nicki Křížek 62eb73b626 [9.16] chg: Remove danger checks for release notes and CHANGES
Since 9.21.0-dev, the release notes and changelog process has been
changed. Backport to the EoL branch are no longer expected to have
either CHANGES or release notes, as we aren't going to release any more
versions anyway.

Related #75

Merge branch '75-gitchangelog-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9182
2024-08-05 15:55:46 +00:00
Nicki Křížek 7ee9398e10 Remove danger checks for release notes and CHANGES
Since 9.21.0-dev, the release notes and changelog process has been
changed. Backport to the EoL branch are no longer expected to have
either CHANGES or release notes, as we aren't going to release any more
versions anyway.
2024-08-05 16:53:52 +02:00
Ondřej Surý 07077fb199 [9.16] fix: usr: Add a compatibility shim for older libuv versions (< 1.19.0)
The uv_stream_get_write_queue_size() is supported only in relatively newer versions of libuv (1.19.0 or higher).  Provide a compatibility shim for this function , so BIND 9 can be built in environments with older libuv version.

Fixes: #4822

Backport of MR !9153

Merge branch 'backport-uv_stream_get_write_queue_size_wrapper-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9248
2024-08-05 10:32:36 +00:00
JINMEI TatuyaandOndřej Surý aca98dfaa5 add a trivial wrapper for uv_stream_get_write_queue_size
(cherry picked from commit b9bef2cc89)
2024-08-05 10:31:15 +00:00
Ondřej Surý d420df5fa2 fix: dev: Pull the doc/misc/options{,.active} from the CI
The doc/misc/options{,.active} were built on system with different
configuration than we have in the CI, so the docs job just keeps
failing.  Pull the files from the CI, so they match what we have
in the CI images.

Merge branch 'ondrej/make-docs-job-happy-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9242
2024-08-05 09:11:51 +00:00
Ondřej Surý 881612de2d Pull the doc/misc/options{,.active} from the CI
The doc/misc/options{,.active} were built on system with different
configuration than we have in the CI, so the docs job just keeps
failing.  Pull the files from the CI, so they match what we have
in the CI images.
2024-08-05 09:11:45 +00:00
Ondřej Surý 6652066f31 [9.16] fix: test: Use LC_ALL to override all system locales
The system tests were overriding the local locale by setting LANG to C.
This does not override the locale in case there are individual LC_<*>
variables like LC_CTYPE explicitly set.

Use LC_ALL=C instead which is the proper way of overriding all currently
set locales.

Backport of MR !9109

Merge branch 'backport-ondrej/use-LC_ALL-not-LANG-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9237
2024-08-05 08:38:57 +00:00
Ondřej Surý 8fca60cbb9 Use LC_ALL to override all system locales
The system tests were overriding the local locale by setting LANG to C.
This does not override the locale in case there are individual LC_<*>
variables like LC_CTYPE explicitly set.

Use LC_ALL=C instead which is the proper way of overriding all currently
set locales.
2024-08-05 09:41:57 +02:00
Petr Špaček 8a7eb06d40 [9.16] new: test: Import fuzzers from bind-9.18 branch
Merge branch 'pspacek/9.16-fuzzers' into 'bind-9.16'

See merge request isc-projects/bind9!8685
2024-08-02 11:21:12 +00:00
Petr Špaček d6acd06249 Import fuzzers from bind-9.18 branch
It required minor resync of other auxiliary files in fuzz/ directory.
2024-08-02 11:18:25 +02:00
Ondřej SurýandPetr Špaček e5a62e9407 Add the ability specify the signing / verification time
When fuzzing it is useful for all signing operations to happen
at a specific time for reproducability.  Add two variables to
the message structure (fuzzing and fuzztime) to specify if a
fixed time should be used and the value of that time.

(cherry picked from commit 3e85d8c3d6)
2024-08-02 11:18:25 +02:00
Nicki Křížek 0673d10cc7 [9.16] chg: test: Retry job in case of AWS Spot Instance interruption event
Closes #4777

Backport of MR !9107

Merge branch '4777-retry-job-aws-spot-instance-interruption-event-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9186
2024-07-29 14:53:29 +00:00
Emanuel PetrandNicki Křížek 3ac3aef2fa Retry job in case of AWS Spot Instance interruption
(cherry picked from commit bbcce1bfc1)
2024-07-29 13:26:58 +00:00
Ondřej Surý 3f1826f2f7 [9.16] chg: usr: Backport max-types-per-name to BIND 9.16
This aligns the fix for large number of RRs in RRSet with 9.18 and up
by backporting to `max-records-per-type` configuration option to
BIND 9.16.

Merge branch 'ondrej/max-types-per-rr-backport-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9178
2024-07-29 10:56:27 +00:00
Ondřej Surý d3ca4be21c Add more tests for adding many RR types to the database
More reclimit tests that test various scenarios adding combinations of
priority and non-priority RR types into the database.
2024-07-29 12:27:25 +02:00
Matthijs MekkingandOndřej Surý d72adf4b92 Log error when update fails
The new "too many records" error can make an update fail without the
error being logged. This commit fixes that.

(cherry picked from commit 558923e5405894cf976d102f0d246a28bdbb400c)
2024-07-29 12:27:25 +02:00
Petr ŠpačekandOndřej Surý e08f268387 Remove duplicated empty zone files
(cherry picked from commit 1456b4fc7778b851256107dbc79fb67d45f752f5)
2024-07-29 12:27:25 +02:00
Petr ŠpačekandOndřej Surý da5bac8104 masterformat: rename zone names to reflect intended meaning
(cherry picked from commit d34bfb1eeaa2f8faab80b1620b992b5495e6f88c)
2024-07-29 12:27:25 +02:00
Petr ŠpačekandOndřej Surý eb4355c9f3 Test owner name rename: a b c d e -> <number>-txt
(cherry picked from commit 6ce03f75d1935c2e1991e9c0a01c49b0099a58cb)
2024-07-29 12:27:25 +02:00
Petr ŠpačekandOndřej Surý 6516c92c07 Test variable rename i->_attempt
(cherry picked from commit 13417eb277cc8a30ee4ddbb6fc02442b0d8e6d3c)
2024-07-29 12:27:25 +02:00
Petr ŠpačekandOndřej Surý 747da63896 Test variable rename a->rrcount
(cherry picked from commit 338b45ae713cded921fd3e5494ca38bd59ff9ee8)
2024-07-29 12:27:25 +02:00
Ondřej Surý b6f6e12bbf Add test for not-loading many RRsets per name on a secondary
This tests makes sure the zone with many RRsets per name is not loaded
via XFR on the secondary server.

(cherry picked from commit 4cfeed912a5e7440f04cb088a461ff47305da2e7)
2024-07-29 12:27:25 +02:00
Ondřej Surý a36ab2eb36 Add a test for not caching large number of RRsets
Send a recursive query for a large number of RRsets, which should
fail when using the default max-types-per-name setting of 100, but
succeed when the cap is disabled.

(cherry picked from commit 7e4530f847c8dc541c5e5bf9f790deed520aaa16)
2024-07-29 12:27:25 +02:00
Ondřej Surý 92a680a3ef Be smarter about refusing to add many RR types to the database
Instead of outright refusing to add new RR types to the cache, be a bit
smarter:

1. If the new header type is in our priority list, we always add either
   positive or negative entry at the beginning of the list.

2. If the new header type is negative entry, and we are over the limit,
   we mark it as ancient immediately, so it gets evicted from the cache
   as soon as possible.

3. Otherwise add the new header after the priority headers (or at the
   head of the list).

4. If we are over the limit, evict the last entry on the normal header
   list.

(cherry picked from commit 57cd34441a)
2024-07-29 12:27:25 +02:00
Evan HuntandOndřej Surý a080317de0 fix a memory leak that could occur when signing
when signatures were not added because of too many types already
existing at a node, the diff was not being cleaned up; this led to
a memory leak being reported at shutdown.

(cherry picked from commit 2825bdb1ae5be801e7ed603ba2455ed9a308f1f7)
2024-07-29 12:27:25 +02:00
Ondřej Surý 89f1779bc2 Add a limit to the number of RR types for single name
Previously, the number of RR types for a single owner name was limited
only by the maximum number of the types (64k).  As the data structure
that holds the RR types for the database node is just a linked list, and
there are places where we just walk through the whole list (again and
again), adding a large number of RR types for a single owner named with
would slow down processing of such name (database node).

Add a configurable limit to cap the number of the RR types for a single
owner.  This is enforced at the database (rbtdb, qpzone, qpcache) level
and configured with new max-types-per-name configuration option that
can be configured globally, per-view and per-zone.

(cherry picked from commit 00d16211d6368b99f070c1182d8c76b3798ca1db)
2024-07-29 12:27:25 +02:00
Ondřej Surý 2f2f0a900b [9.16] chg: usr: Backport max-records-per-type to BIND 9.16
This aligns the fix for large number of RRs in RRSet with 9.18 and up
by backporting to `max-records-per-type` configuration option to
BIND 9.16.

Merge branch 'ondrej/max-records-per-type-backport-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9177
2024-07-29 10:04:45 +00:00