Commit Graph

41774 Commits

Author SHA1 Message Date
Nicki Křížek
0d97fe02bc Fix dnssec-policy options formatting and links in ARM
The statements that already exist in the grammar can't be created with
the namedconf:statement. Use a plain definition list for these
statements and add a manual anchor for each one so links to them can be
created.

Avoid using the :any: syntax in the definition lists, as that just
creates a link to the duplicate and completely unrelated statement,
which just makes the documentation more confusing.
2024-09-06 15:48:07 +02:00
Nicki Křížek
c779edf78b Add Known Issue [#GL 4898] 2024-09-06 15:48:07 +02:00
Nicki Křížek
0314131499 Remove a fixed known issue [GL #4793] 2024-09-06 15:08:29 +02:00
Nicki Křížek
466939abcf Prepare release notes for BIND 9.21.1 2024-09-06 15:08:29 +02:00
Nicki Křížek
95b824f505 Generate release notes 2024-09-06 15:08:29 +02:00
Nicki Křížek
fadea7dd2f Generate changelog 2024-09-06 15:08:29 +02:00
Nicki Křížek
cfdded4667 chg: dev: Double the number of threadpool threads
Introduce this temporary workaround to reduce the impact of long-running
tasks in offload threads which can block the resolution of queries.

Related isc-projects/bind9#4898

Merge branch '4898-workaround-double-threadpool-threads' into 'v9.21.1-release'

See merge request isc-private/bind9!740
2024-09-06 13:03:20 +00:00
Nicki Křížek
6857df20a4 Double the number of threadpool threads
Introduce this temporary workaround to reduce the impact of long-running
tasks in offload threads which can block the resolution of queries.
2024-09-06 14:15:21 +02:00
Nicki Křížek
31245213a0 fix: usr: Fix an assertion failure in validate_dnskey_dsset_done()
Under rare circumstances, named could terminate unexpectedly
when validating a DNSKEY resource record if the validation
was canceled in the meantime. This has been fixed.

Closes isc-projects/bind9#4911

Merge branch '4911-assertion-failure-in-validate_dnskey_dsset_done' into 'v9.21.1-release'

See merge request isc-private/bind9!731
2024-09-04 14:18:25 +00:00
Aram Sargsyan
d85918aebf Process canceled/shut down results in validate_dnskey_dsset_done()
When a validator is already shut down, val->name becomes NULL. We
need to process and keep the ISC_R_CANCELED or ISC_R_SHUTTINGDOWN
result code before calling validate_async_done(), otherwise, when it
is called with the hardcoded DNS_R_NOVALIDSIG result code, it can
cause an assetion failure when val->name (being NULL) is used in
proveunsecure().
2024-09-02 15:40:30 +00:00
Evan Hunt
8a09d54d6b fix: usr: Delay release of root privileges until after configuring controls
Delay relinquishing root privileges until the control channel has been configured, for the benefit of systems that require root to use privileged port numbers.  This mostly affects systems without fine-grained privilege systems (i.e., other than Linux).

Closes #4793

Merge branch '4793-bind-9-19-24-not-listening-to-rndc-port-953-on-localhost' into 'main'

Closes #4793

See merge request isc-projects/bind9!9123
2024-08-29 18:11:15 +00:00
Evan Hunt
d57fa148af Delay release of root privileges until after configuring controls
On systems where root access is needed to configure privileged
ports, we don't want to fully relinquish root privileges until
after the control channel (which typically runs on port 953) has
been established.

named_os_changeuser() now takes a boolean argument 'permanent'.
This allows us to switch the effective userid temporarily with
named_os_changeuser(false) and restore it with named_os_restoreuser(),
before permanently dropping privileges with named_os_changeuser(true).
2024-08-29 10:34:38 -07:00
Ondřej Surý
9afcdc2b18 chg: usr: Follow the number of CPU set by taskset/cpuset
Administrators may wish to constrain the set of cores that BIND 9 runs on via the 'taskset', 'cpuset' or 'numactl' programs (or equivalent on other O/S).

If the admin has used taskset, the `named` will now follow to automatically use the given number of CPUs rather than the system wide count.

Closes #4884

Merge branch '4884-use-cpuset-to-get-number-of-cpus' into 'main'

Closes #4884

See merge request isc-projects/bind9!9398
2024-08-29 14:43:34 +00:00
Ondřej Surý
5a2df8caf5 Follow the number of CPU set by taskset/cpuset
Administrators may wish to constrain the set of cores that BIND 9 runs
on via the 'taskset', 'cpuset' or 'numactl' programs (or equivalent on
other O/S), for example to achieve higher (or more stable) performance
by more closely associating threads with individual NIC rx queues. If
the admin has used taskset, it follows that BIND ought to
automatically use the given number of CPUs rather than the system wide
count.

Co-Authored-By: Ray Bellis <ray@isc.org>
2024-08-29 14:43:18 +00:00
Michal Nowak
b65533beff 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-max-recursion-queries-100' into 'main'

Closes #4897

See merge request isc-projects/bind9!9435
2024-08-29 14:38:06 +00:00
Michal Nowak
8e0244d300 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.
2024-08-29 14:37:37 +00:00
Mark Andrews
78d48f7ae2 fix: chg: Improve performance when looking for the closest encloser when returning NSEC3 proofs
Use the fact that the database returns the longest matching part of the requested name to find the required NSEC3 record. If there are multiple versions present in the database we may have to search further.

Closes #4460

Merge branch '4460-auth-nsec3-many-labels' into 'main'

Closes #4460

See merge request isc-projects/bind9!9436
2024-08-29 13:24:09 +00:00
Mark Andrews
d42ea08f16 Return partial match when requested
Return partial match from dns_db_find/dns_db_find when requested
to short circuit the closest encloser discover process.  Most of the
time this will be the actual closest encloser but may not be when
there yet to be committed / cleaned up versions of the zone with
names below the actual closest encloser.
2024-08-29 12:48:20 +00:00
Mark Andrews
7ea6b16d0d fix: Accessing fctx->state without holding lock
Move lock earlier in the call sequence to address access without lock report.

```
1559        /*
1560         * Caller must be holding the fctx lock.
1561         */
      	
CID 468796: (#1 of 1): Data race condition (MISSING_LOCK)
1. missing_lock: Accessing fctx->state without holding lock fetchctx.lock. Elsewhere, fetchctx.state is written to with fetchctx.lock held 2 out of 2 times.
1562        REQUIRE(fctx->state == fetchstate_done);
1563
1564        FCTXTRACE("sendevents");
1565
1566        LOCK(&fctx->lock);
1567
```

Closes #4902

Merge branch '4902-accessing-fctx-state-without-holding-lock' into 'main'

Closes #4902

See merge request isc-projects/bind9!9427
2024-08-29 12:46:12 +00:00
Mark Andrews
43f0b0e8eb Move lock earlier in the call sequence
fctx->state should be read with the lock held.

    1559        /*
    1560         * Caller must be holding the fctx lock.
    1561         */

    CID 468796: (#1 of 1): Data race condition (MISSING_LOCK)
    1. missing_lock: Accessing fctx->state without holding lock fetchctx.lock.
       Elsewhere, fetchctx.state is written to with fetchctx.lock held 2 out of 2 times.
    1562        REQUIRE(fctx->state == fetchstate_done);
    1563
    1564        FCTXTRACE("sendevents");
    1565
    1566        LOCK(&fctx->lock);
    1567
2024-08-29 04:33:56 +00:00
Mark Andrews
15b2f0125d fix: Address potential TSAN issue with find->status
find->status is a private field of dns_adbfind_t so it now has an accessor function and has been made atomic.

Closes #4802

Merge branch '4802-address-potential-tsan-issue-with-find-status' into 'main'

Closes #4802

See merge request isc-projects/bind9!9137
2024-08-29 03:58:50 +00:00
Mark Andrews
a45e39d114 Use atomics to access find->status 2024-08-28 22:42:16 +00:00
Mark Andrews
c900300f21 Use an accessor fuction to access find->status
find->status is marked as private and access is controlled
by find->lock.
2024-08-28 22:42:16 +00:00
Michal Nowak
d32b65b699 chg: ci: Generate TSAN stress test
Merge branch 'mnowak/generate-tsan-stress-jobs' into 'main'

See merge request isc-projects/bind9!9334
2024-08-28 09:39:32 +00:00
Michal Nowak
338d4c8dd3 Generate TSAN stress test 2024-08-28 11:01:11 +02:00
Michal Nowak
fa5d85f29d chg: ci: Cleanup stress test artifacts
Merge branch 'mnowak/avoid-some-artifacts-in-stress-tests' into 'main'

See merge request isc-projects/bind9!9424
2024-08-28 07:58:03 +00:00
Michal Nowak
6f86885304 Some stress test artifacts should not be saved in CI artifact 2024-08-27 12:56:04 +02:00
Arаm Sаrgsyаn
4cd73e2536 chg: usr: Exempt prefetches from the fetches-per-zone and fetches-per-server quotas
Fetches generated automatically as a result of 'prefetch' are now
exempt from the 'fetches-per-zone' and 'fetches-per-server' quotas.
This should help in maintaining the cache from which query responses
can be given.

Closes #4219

Merge branch '4219-exempt-good-queries-from-fetch-limits' into 'main'

Closes #4219

See merge request isc-projects/bind9!9095
2024-08-26 15:50:50 +00:00
Aram Sargsyan
ad329ddcaa Document that prefeteches are exempt from select quotas
Add notes to the 'fetches-per-zone' and 'fetches-per-server' clauses
documentation to document that prefetches are exempted.
2024-08-26 15:50:21 +00:00
Aram Sargsyan
c7e8b7cf63 Exempt prefetches from the fetches-per-server quota
Give prefetches a free pass through the quota so that the cache
entries for popular zones could be updated successfully even if the
quota for is already reached.
2024-08-26 15:50:21 +00:00
Aram Sargsyan
cada2de31f Exempt prefetches from the fetches-per-zone quota
Give prefetches a free pass through the quota so that the cache entry
for a popular zone could be updated successfully even if the quota for
it is already reached.
2024-08-26 15:50:21 +00:00
Ondřej Surý
f99da39934 fix: dev: Stop using malloc_usable_size and malloc_size
The `malloc_usable_size()` can return size larger than originally allocated and when these sizes disagree the fortifier enabled by `_FORTIFY_SOURCE=3` detects overflow and stops the `named` execution abruptly.  Stop using these convenience functions as they are primary used for introspection-only.

Closes #4880

Merge branch '4880-dont-use-malloc_usable_size' into 'main'

Closes #4880

See merge request isc-projects/bind9!9400
2024-08-26 15:01:03 +00:00
Ondřej Surý
d61712d14e Stop using malloc_usable_size and malloc_size
Although the nanual page of malloc_usable_size says:

    Although the excess bytes can be over‐written by the application
    without ill effects, this is not good programming practice: the
    number of excess bytes in an allocation depends on the underlying
    implementation.

it looks like the premise is broken with _FORTIFY_SOURCE=3 on newer
systems and it might return a value that causes program to stop with
"buffer overflow" detected from the _FORTIFY_SOURCE.  As we do have own
implementation that tracks the allocation size that we can use to track
the allocation size, we can stop relying on this introspection function.

Also the newer manual page for malloc_usable_size changed the NOTES to:

    The value returned by malloc_usable_size() may be greater than the
    requested size of the allocation because of various internal
    implementation details, none of which the programmer should rely on.
    This function is intended to only be used for diagnostics and
    statistics; writing to the excess memory without first calling
    realloc(3) to resize the allocation is not supported.  The returned
    value is only valid at the time of the call.

Remove usage of both malloc_usable_size() and malloc_size() to be on the
safe size and only use the internal size tracking mechanism when
jemalloc is not available.
2024-08-26 15:00:44 +00:00
Michal Nowak
b37c15d244 chg: ci: Drop removed system tests from cross-version-config-tests
The cross-version-config-tests job fails when a system test is removed
from the upcoming release. To avoid this, remove the system test also
from the $BIND_BASELINE_VERSION.

See the failure mode at https://gitlab.isc.org/isc-projects/bind9/-/jobs/4668947.

Merge branch 'mnowak/remove-dialup-from-cross-version-config-tests-job' into 'main'

See merge request isc-projects/bind9!9413
2024-08-26 14:28:47 +00:00
Michal Nowak
60f5f2a9d9 Drop removed system tests from $BIND_BASELINE_VERSION
The cross-version-config-tests job fails when a system test is removed
from the upcoming release. To avoid this, remove the system test also
from the $BIND_BASELINE_VERSION.
2024-08-26 13:41:47 +02:00
Petr Špaček
0b9ce9c05b fix: dev: Preserve statement tag order in documentation
This supports bit-for-bit reproducibility of built documentation.

Closes #4886

Merge branch 'issue-4886/order-preserving-documentation-tags' into 'main'

Closes #4886

See merge request isc-projects/bind9!9399
2024-08-23 13:57:31 +00:00
Petr Špaček
5b832126b3 Disallow duplicate statement tags in docs
I can't think of a use-case for them, so let's simplify code and treat
them as an invalid input.
2024-08-23 15:34:54 +02:00
James Addison
5a79b36f56 Preserve de-duplicated tag order in documentation
The 'set' datatype in Python does not provide iteration-order
guarantees related to insertion-order.  That means that its
usage in the 'split_csv' helper function during documentation
build can produce nondeterministic results.

That is non-desirable for two reasons: it means that the
documentation output may appear to vary unnecessarily between
builds, and secondly there could be loss-of-information in cases
where tag order in the source documentation is significant.

This patch implements order-preserving de-duplication of tags,
allowing authors to specify tags using intentional priority
ordering, while also removing tags that appear more than once.
2024-08-23 15:34:00 +02:00
Petr Špaček
5c5d4eb40a new: ci: Automate parts of MR workflow
Merge branch 'pspacek/post-merge-ci' into 'main'

See merge request isc-projects/bind9!9244
2024-08-23 07:50:22 +00:00
Petr Špaček
73b950dc29 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.
2024-08-23 07:38:27 +00:00
Petr Špaček
146743d5a3 Remove 'Release notes' label check from dangerfile
This label is now handled automatically by 'merged-metadata' CI job.
2024-08-23 07:38:27 +00:00
Petr Špaček
edf0e6415a Remove 'No CHANGES' check from dangerfile
This label is now handled automatically by 'merged-metadata' CI job.
2024-08-23 07:38:27 +00:00
Petr Špaček
d1c64d588b 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.
2024-08-23 07:38:27 +00:00
Petr Špaček
3165261ecd Mark backports CI job as non-interruptible
Previously CI job for the autobackport bot inherited "interruptible:
true" global configuration. This caused premature termination of the job
when another merge was finished before the autobackport job ran to
completion.
2024-08-23 07:38:27 +00:00
Evan Hunt
a133a33b65 rem: usr: Remove the 'dialup' and 'heartbeat-interval' options
The `dialup` and `heartbeat-interval` options have been removed, along with all code implementing them. Using these options is now a fatal error.

Closes #4237

Merge branch '4237-remove-dialup' into 'main'

Closes #4237

See merge request isc-projects/bind9!8160
2024-08-22 19:43:49 +00:00
Evan Hunt
642a1b985d remove the "dialup" and "heartbeat-interval" options
mark "dialup" and "heartbeat-interval" options as ancient and
remove the documentation and the code implementing them.
2024-08-22 11:11:10 -07:00
Arаm Sаrgsyаn
99b18bab7e new: usr: implement the 'request-ixfr-max-diffs' configuration option
The new 'request-ixfr-max-diffs' configuration option sets the
maximum number of incoming incremental zone transfer (IXFR) differences,
exceeding which triggers a full zone transfer (AXFR).

Closes #4389

Merge branch '4389-request-ixfr-max-diffs' into 'main'

Closes #4389

See merge request isc-projects/bind9!9094
2024-08-22 15:33:17 +00:00
Aram Sargsyan
397e007a8e Document the 'request-ixfr-max-diffs' configuration option
Document the new configuration option and its default value.
2024-08-22 13:42:27 +00:00
Aram Sargsyan
49505cb93d Test the 'request-ixfr-max-diffs' configuration option
Configure a maximum of 3 allowed differences and add 5 new records.
Check that named detected that the differences exceed the allowed
limit and successfully retries with AXFR.
2024-08-22 13:42:27 +00:00
Aram Sargsyan
c05a823e8b Implement the 'request-ixfr-max-diffs' configuration option
This limits the maximum number of received incremental zone
transfer differences for a secondary server. Upon reaching the
confgiured limit, the secondary aborts IXFR and initiates a full
zone transfer (AXFR).
2024-08-22 13:42:27 +00:00