Commit Graph

38386 Commits

Author SHA1 Message Date
Mark Andrews
15601cca43 Regression check for missing RRSIGs
When transitioning from NSEC3 to NSEC the added records where not
being signed because the wrong time was being used to determine if
a key should be used or not.  Check that these records are actually
signed.

(cherry picked from commit bdb42d3838)
2023-12-19 12:44:27 +11:00
Mark Andrews
65fdc892eb Use 'now' rather than 'inception' in 'add_sigs'
When kasp support was added 'inception' was used as a proxy for
'now' and resulted in signatures not being generated or the wrong
signatures being generated.  'inception' is the time to be set
in the signatures being generated and is usually in the past to
allow for clock skew.  'now' determines what keys are to be used
for signing.

(cherry picked from commit 6066e41948)
2023-12-19 12:39:16 +11:00
Michał Kępień
3713d6c909 Merge branch '4497-trust-anchor-telemetry-is-no-longer-experimental-9.18' into 'bind-9.18'
[9.18] "trust-anchor-telemetry" is no longer experimental

See merge request isc-projects/bind9!8587
2023-12-18 14:50:16 +00:00
Michał Kępień
6961509039 Add CHANGES entry for GL #4497
(cherry picked from commit 693fee4836)
2023-12-18 15:13:34 +01:00
Michał Kępień
8882d88731 "trust-anchor-telemetry" is no longer experimental
Remove the CFG_CLAUSEFLAG_EXPERIMENTAL flag from the
"trust-anchor-telemetry" statement as the behavior of the latter has not
been changed since its initial implementation and there are currently no
plans to do so.  This silences a relevant log message that was emitted
even when the feature was explicitly disabled.

(cherry picked from commit b1baf7af3a)
2023-12-18 15:13:34 +01:00
Arаm Sаrgsyаn
8f9c0eb284 Merge branch '4477-tests-statschannel-loadtime-bugfix-9.18' into 'bind-9.18'
[9.18] Resolve "statschannel test intermittently fails with incorrect zone loadtime"

See merge request isc-projects/bind9!8583
2023-12-18 10:24:49 +00:00
Aram Sargsyan
ba923834b2 Fix a statschannel system test zone loadtime issue
The check_loaded() function compares the zone's loadtime value and
an expected loadtime value, which is based on the zone file's mtime
extracted from the filesystem.

For the secondary zones there may be cases, when the zone file isn't
ready yet before the zone transfer is complete and the zone file is
dumped to the disk, so a so zero value mtime is retrieved.

In such cases wait one second and retry until timeout. Also modify
the affected check to allow a possible difference of the same amount
of seconds as the chosen timeout value.

(cherry picked from commit 4e94ff2541)
2023-12-18 09:34:31 +00:00
Mark Andrews
418a1ad762 Merge branch '4478-redefinition-of-hmac-as-different-kind-of-symbol-on-netbsd-bind-9.18' into 'bind-9.18'
[9.18] Resolve "Redefinition of 'hmac' as different kind of symbol on NetBSD"

See merge request isc-projects/bind9!8573
2023-12-14 01:29:27 +00:00
Mark Andrews
c705fee830 Add CHANGES note for [GL #4478]
(cherry picked from commit 648fa635f8)
2023-12-14 11:14:04 +11:00
Mark Andrews
adfb365602 NetBSD has added 'hmac' to libc so rename our uses of hmac
(cherry picked from commit fd077c2661)
2023-12-14 11:14:04 +11:00
Michal Nowak
c54c268c4c Merge branch 'mnowak/alpine-3.19-9.18' into 'bind-9.18'
[9.18] Add Alpine Linux 3.19

See merge request isc-projects/bind9!8566
2023-12-12 10:42:39 +00:00
Michal Nowak
3b603d0fe5 Add Alpine Linux 3.19
(cherry picked from commit 1fc56d705e)
2023-12-12 11:12:15 +01:00
Michal Nowak
07f6d1e67f Merge branch 'mnowak/replace-danger-python-with-hazard-9.18' into 'bind-9.18'
[9.18] Replace danger-python with Hazard

See merge request isc-projects/bind9!8563
2023-12-11 17:23:57 +00:00
Tom Krizek
e97f4c0784 Handle empty MR description in dangerfile
A merge request might have no description at all (i.e. None, rather than
an empty string). This might happen when the MR is created via an API.
Check a description is present before trying to find a backport string
in it.

(cherry picked from commit 4f70f5bd7c)
2023-12-11 17:45:31 +01:00
Michał Kępień
a4fbb8edd0 Improve determining the lines added by a branch
Since the list of lines added to Git-tracked text files in a given
branch is not part of the Danger DSL [1], it is determined using custom
code in dangerfile.py.  The current implementation of that logic is less
than perfect as it examines the diff between the current tip of the
target branch and the source branch rather than the diff between the
merge base of the two branches and the source branch.  Consider a Git
history like this:

    *   F (target)
    ...
    *   E
    *   D
    *   C
    | * B (source)
    |/
    *   A (merge base)

If danger-python or Hazard are run for commit B, the current logic for
determining the list of added lines in dangerfile.py examines the diff
between commits F and B rather than between commits A and B.  Therefore,
the added_lines() function returns not just the lines added by commit B
on top of commit A, but also the list of lines that were removed between
commits A and F, which leads to confusing results.

Fix by using the triple-dot diff operator in the Git invocation whose
output is used as the source of information for determining the list of
lines added by a given branch.

Since Hazard fetches the target branch itself when it is run, remove the
explicit "git fetch" invocation that fetches the target branch from
GitLab (shortening its local history to a single commit in the process)
before "git diff" is invoked.

[1] https://danger.systems/js/reference.html#GitDSL

(cherry picked from commit 43126e81e6)
2023-12-11 17:45:29 +01:00
Michal Nowak
33ebaea600 Replace danger-python with Hazard
Hazard is a minimal danger-python replacement.

(cherry picked from commit 08ce1bc45f)
2023-12-11 17:45:28 +01:00
Tom Krizek
75b18cf01e Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.18.22' into 'bind-9.18'
Set up version and release notes for BIND 9.18.22

See merge request isc-projects/bind9!8561
2023-12-08 15:05:10 +00:00
Tom Krizek
cd310b4835 Set up release notes for BIND 9.18.22 2023-12-08 15:55:30 +01:00
Tom Krizek
1f93aecde3 Update BIND version to 9.18.22-dev 2023-12-08 15:55:30 +01:00
Ondřej Surý
bcb22e6e78 Merge branch '4448-improve-lur-cleaning-behaviour-bind-9.18' into 'bind-9.18'
[9.18] Resolve "Improve LRU cleaning behaviour" !8516

See merge request isc-projects/bind9!8556
2023-12-07 12:23:18 +00:00
Mark Andrews
c185821d96 Add CHANGES for [GL #4448]
(cherry picked from commit 6ef8d8d699)
2023-12-07 22:16:13 +11:00
Mark Andrews
9ded7428ad Use explict atomic for older compilers 2023-12-07 22:16:13 +11:00
Mark Andrews
2cc84d7678 Also cleanup the space for the rbt nodes
As we are in overmem state we want to free more memory than we are
adding so we need to add in an allowance for the rbtnodes that may
have been added and the names stored with them.  There is the node
for the owner name and a possible ENT node if there was a node split.

(cherry picked from commit 7e462c2b26)
2023-12-07 21:50:02 +11:00
Mark Andrews
8e5bd86416 Process the combined LRU lists in LRU order
Only cleanup headers that are less than equal to the rbt's last_used
time.  Adjust the rbt's last_used time when the target cleaning was
not achieved to the oldest value of the remaining set of headers.

When updating delegating NS and glue records last_used was not being
updated when it should have been.

When adding zero TTL records to the tail of the LRU lists set
last_used to rbtdb->last_used + 1 rather than now.  This appoximately
preserves the lists LRU order.

(cherry picked from commit 5e8f0e9ceb)
2023-12-07 21:34:19 +11:00
Evan Hunt
931437480a Merge branch '4405-remove-resolver-opts-bind-9.18' into 'bind-9.18'
[9.18] deprecate resolver-retry-interval and resolver-nonbackoff-tries

See merge request isc-projects/bind9!8553
2023-12-06 22:13:47 +00:00
Evan Hunt
374b4d6258 deprecate resolver-retry-interval and resolver-nonbackoff-tries
these options control default timing of retries in the resolver
for experimental purposes; they are not known to useful in production
environments.  they will be removed in the future; for now, we
only log a warning if they are used.

(cherry picked from commit 4aaa4f7dca)
2023-12-06 13:41:47 -08:00
Evan Hunt
4ee01a8b5a Merge branch '3498-glue-rehash-overflow' into 'bind-9.18'
correctly limit hash resize to RBTDB_GLUE_TABLE_MAX_BITS

See merge request isc-projects/bind9!8465
2023-12-06 19:44:40 +00:00
Evan Hunt
8f73814469 correctly limit hash resize to RBTDB_GLUE_TABLE_MAX_BITS
Use < instead of <= when testing the new new hash bits size,
otherwise it can exceed the limit.
2023-12-06 11:30:41 -08:00
Artem Boldariev
9f5d5971a7 Merge branch '4464-multithread-tls-initialisation-crash-fix-9.18' into 'bind-9.18'
[9.18]Fix TLS certs store deletion on concurrent access

See merge request isc-projects/bind9!8549
2023-12-06 16:21:32 +00:00
Artem Boldariev
7632a72739 Update CHANGES [GL #4464]
Mention that BIND crashing due to a `tls` multithreaded entry
initialisation attempts has been fixed.

(cherry picked from commit f7de766168)
2023-12-06 17:08:04 +02:00
Artem Boldariev
96228d9a08 doth test: add a secondary NS instance that reuses a 'tls' entry
This commit extends the 'doth' system tests with additional secondary
NS instance that reuses the same 'tls' entry for connecting the the
primary to download zones. This configurations were known to crash
secondaries in some cases.

(cherry picked from commit 10e626111f)
2023-12-06 17:07:12 +02:00
Artem Boldariev
d20f1240e2 Fix TLS certs store deletion on concurrent access
During initialisation or reconfiguration, it is possible that multiple
threads are trying to create a TLS context and associated data (like
TLS certs store) concurrently. In some cases, a thread might be too
late to add newly created data to the TLS contexts cache, in which
case it needs to be discarded. In the code that handles that case, it
was not taken into account that, in some cases, the TLS certs store
could not have been created or should not be deleted, as it is being
managed by the TLS contexts cache already. Deleting the store in such
cases might lead to crashes.

This commit fixes the issue.

(cherry picked from commit b109fa9192)
2023-12-06 17:06:51 +02:00
Mark Andrews
44e4b5cb4a Merge branch '4432-pointers-dereferenced-before-being-checked-bind-9.18' into 'bind-9.18'
[9.18] Resolve "Pointers Dereferenced before Being Checked" !8508

See merge request isc-projects/bind9!8544
2023-12-05 23:08:27 +00:00
Mark Andrews
3aaf20a2dc Ineffective DbC protections
Dereference before NULL checks.  Thanks to Eric Sesterhenn from X41
D-Sec GmbH for reporting this.

(cherry picked from commit decc17d3b0)
2023-12-06 09:01:05 +11:00
Michal Nowak
9736338bc3 Merge branch 'mnowak/drop-openbsd-system-test-job-9.18' into 'bind-9.18'
[9.18] Drop OpenBSD system test CI job

See merge request isc-projects/bind9!8540
2023-12-05 15:58:07 +00:00
Michal Nowak
9436384969 Run "make check" in system:gcc:sid:amd64
Following the discontinuation of the OpenBSD system test in CI, transfer
the execution of the system test using the "make check" method to the
Debian "sid" system test CI job.

(cherry picked from commit 27d51d6ab6)
2023-12-05 16:25:54 +01:00
Michal Nowak
84541be86d Drop OpenBSD system test CI job
The system tests on OpenBSD consistently exhibit lower stability
compared to our other CI platforms. Some of these challenges are
intrinsic to the system test itself and require attention. However,
there are OpenBSD issues, which seem to be more widespread on this
platform than others. In our daily CI pipelines, OpenBSD system tests
often bear the brunt of all failed CI jobs.

It's possible that our OpenBSD CI image could be optimized, but we
currently lack the domain-specific knowledge needed to make
improvements.

(cherry picked from commit 2ab292c169)
2023-12-05 16:24:04 +01:00
Tom Krizek
8fe21a15ce Merge branch '4452-pytest-improve-assert-messages-9.18' into 'bind-9.18'
[9.18] Improve assert messages in pytests

See merge request isc-projects/bind9!8538
2023-12-05 14:26:49 +00:00
Tom Krizek
41ce14f389 Refactor statschannel test to use isctest
Use common utility functions in favor of duplicating the code in a
test-specific file.

(cherry picked from commit 5de2b07daa)
2023-12-05 14:27:41 +01:00
Tom Krizek
1fe70c6095 Add system test utility package isctest
Create a utility package for code shared by the python tests. The
utility functions should use reasonable defaults and be split up into
modules according to their functionality.

Ensure assert rewriting is enabled for the modules to get the most
useful output from pytest.

(cherry picked from commit cba5a1d62c)
2023-12-05 14:27:41 +01:00
Tom Krizek
4e74513c1b Simplify statsport fixture in statschannel test
The ports fixture provides the required port numbers already and there's
no need to get the port number from environment.

(cherry picked from commit f0481c8600)
2023-12-05 14:27:41 +01:00
Tom Krizek
cf81c9e833 Allow assertion message rewrite in statschannel test
By default, the useful assertion message rewrite is used by pytest for
test modules only. Since another module is imported with shared
functionality, ensure it has pytest's assertion message rewriting
enabled to obtain more debug information in case it fails.

(cherry picked from commit a57af8163a)
2023-12-05 14:27:41 +01:00
Tom Krizek
33b61de350 Move helper functions in statchannel into single file
Since dnspython is now a required dependency, there's no need to keep
these two helper files separate.

(cherry picked from commit fc295b2b5d)
2023-12-05 14:27:40 +01:00
Tom Krizek
ad133d4c1c Add assert message to test doth/stress_http_quota.py
This file is executed outside of pytest with pure python, which doesn't
do any AssertionError message rewriting like pytest. Ensure the assert
messages in this file provide a useful debug message.

(cherry picked from commit 767f4670c6)
2023-12-05 14:27:37 +01:00
Tom Krizek
46925fb8f5 Merge branch '4421-deprecate-AES-based-DNS-cookies-9.18' into 'bind-9.18'
[9.18] Deprecate AES algorithm for DNS cookies

See merge request isc-projects/bind9!8486
2023-12-05 10:28:38 +00:00
Ondřej Surý
a9e4d6c682 Add CHANGES and release note for [GL #4421]
(cherry picked from commit 2a3b3beaf1)
2023-12-05 10:54:01 +01:00
Ondřej Surý
1285238d95 Deprecate AES algorithm for DNS cookies
The AES algorithm for DNS cookies was being kept for legacy reasons,
and it can be safely removed in the next major release.  Mark is as
deprecated, so the `named-checkconf` prints a warning when in use.

(cherry picked from commit 67d14b0ee5)
2023-12-05 10:52:03 +01:00
Michal Nowak
3b24611844 Merge branch '3198-add-rr-record-9.18' into 'bind-9.18'
[9.18] Add support for recording named with rr

See merge request isc-projects/bind9!8536
2023-12-04 19:51:39 +00:00
Michał Kępień
a195d9b126 Do not daemonize named instances with custom args
This enables the "logfileconfig" and "rpzextra" system tests to pass
when named is started under the supervision of rr (USE_RR=1).

(cherry picked from commit 422286e9c2)
2023-12-04 19:30:03 +01:00
Michal Nowak
3bd3dfd187 Fix process listing string of rpzextra ns3 server
(cherry picked from commit 920af590d1)
2023-12-04 19:28:49 +01:00