]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
2 years agoMerge branch '4334-CVE-2023-5679-test-fix-9.16' into 'bind-9.16'
Michał Kępień [Thu, 28 Mar 2024 18:35:12 +0000 (18:35 +0000)] 
Merge branch '4334-CVE-2023-5679-test-fix-9.16' into 'bind-9.16'

[9.16] Fix check interaction in the "serve-stale" test

See merge request isc-projects/bind9!8926

2 years agoMerge branch '4334-CVE-2023-5679-test-9.16' into 'bind-9.16'
Michał Kępień [Thu, 28 Mar 2024 17:57:57 +0000 (17:57 +0000)] 
Merge branch '4334-CVE-2023-5679-test-9.16' into 'bind-9.16'

[9.16] [CVE-2023-5679] Check dns64 + server-stale short timeout

See merge request isc-projects/bind9!8924

2 years agoFix check interaction in the "serve-stale" test
Michał Kępień [Thu, 28 Mar 2024 17:56:35 +0000 (18:56 +0100)] 
Fix check interaction in the "serve-stale" test

Commit f351c210344c4ce0b69a307ae8e0e22efd107097 modified the
"serve-stale" system test by adding the ns3/named9.conf.in configuration
file and making the ns3 named instance load that file near the end of
the test.  However, ns3/named9.conf.in changes the
stale-answer-client-timeout setting to a very low value, which affects
all subsequent checks in tests.sh (rather than just the check that needs
the low value to be set) and may cause false positives.  Fix by
reloading configuration from ns3/named8.conf.in as soon as the check
using a very low stale-answer-client-timeout value is finished.

(cherry picked from commit cd64a3747b7c25a89a532e39a593fc823e78d5b7)

2 years agoCheck dns64 + server-stale short timeout
Mark Andrews [Thu, 12 Oct 2023 04:25:57 +0000 (15:25 +1100)] 
Check dns64 + server-stale short timeout

Check that named correctly returns a synthesized DNS64 answer when the
server stale timer triggers for the A lookup.  Use a small value for
stale-answer-client-timeout (2ms) and delay the A response by 1 second.

(cherry picked from commit 2eee1e176182657d6a8e147386b2fd187af823a8)

2 years agoMerge branch '4281-CVE-2023-5517-test-9.16' into 'bind-9.16'
Michał Kępień [Thu, 28 Mar 2024 14:12:22 +0000 (14:12 +0000)] 
Merge branch '4281-CVE-2023-5517-test-9.16' into 'bind-9.16'

[9.16] [CVE-2023-5517] Checking nxdomain-redirect against built-in RFC-1918 zone

See merge request isc-projects/bind9!8921

2 years agoChecking nxdomain-redirect against built-in RFC-1918 zone
Mark Andrews [Mon, 9 Oct 2023 23:54:16 +0000 (10:54 +1100)] 
Checking nxdomain-redirect against built-in RFC-1918 zone

Check that RFC 1918 leak detection does not trigger an assertion
when nxdomain redirection is enabled in the server but not for the
RFC 1918 reverse namespace.

(cherry picked from commit 2789906ce40f3e38b6ae1c96c99a99e4191c3b86)

2 years agoMerge branch 'mnowak/freebsd-use-mit-kerberos5-9.16' into 'bind-9.16'
Michal Nowak [Wed, 27 Mar 2024 09:24:12 +0000 (09:24 +0000)] 
Merge branch 'mnowak/freebsd-use-mit-kerberos5-9.16' into 'bind-9.16'

[9.16] Build FreeBSD with MIT Kerberos5 instead of Heimdal

See merge request isc-projects/bind9!8916

2 years agoBuild FreeBSD with MIT Kerberos5 instead of Heimdal
Michal Nowak [Fri, 22 Mar 2024 10:31:23 +0000 (11:31 +0100)] 
Build FreeBSD with MIT Kerberos5 instead of Heimdal

tsiggss system tests crash or are unstable with the base FreeBSD
(Heimdal-based) GSS-API.

Move the --without-gssapi ./configure option to Alpine Linux, so the
option is tested somewhere.

(cherry picked from commit d6df757fdc196f8cf1c6a7f1292ea4bf87440d73)

2 years agoMerge branch 'mnowak/replace-IO-Socket-INET6-with-IO-Socket-IP-9.16' into 'bind-9.16'
Michal Nowak [Tue, 26 Mar 2024 13:12:19 +0000 (13:12 +0000)] 
Merge branch 'mnowak/replace-IO-Socket-INET6-with-IO-Socket-IP-9.16' into 'bind-9.16'

[9.16] IO::Socket::INET6 has been replaced by IO::Socket::IP

See merge request isc-projects/bind9!8912

2 years agoIO::Socket::INET6 has been replaced by IO::Socket::IP
Mark Andrews [Tue, 27 Sep 2022 05:18:25 +0000 (15:18 +1000)] 
IO::Socket::INET6 has been replaced by IO::Socket::IP

IO::Socket::INET6 is no longer being maintained and its functionality
has been replaced by IO::Socket::IP.

(cherry picked from commit d1983adc22f7cb0e995f74636ba022e81fb2b734)
(cherry picked from commit fff8de843017ac770e55f4f31abcff2c96df4410)

2 years agoMerge branch 'mnowak/revert-05b09f2b5bb68a916288f56bf627babad4055b90-9.16' into ...
Michal Nowak [Mon, 25 Mar 2024 14:44:28 +0000 (14:44 +0000)] 
Merge branch 'mnowak/revert-05b09f2b5bb68a916288f56bf627babad4055b90-9.16' into 'bind-9.16'

[9.16] Revert "Work around a TSAN issue with newer kernels"

See merge request isc-projects/bind9!8909

2 years agoRevert "Work around a TSAN issue with newer kernels"
Michal Nowak [Thu, 21 Mar 2024 13:06:00 +0000 (14:06 +0100)] 
Revert "Work around a TSAN issue with newer kernels"

This reverts commit 05b09f2b5bb68a916288f56bf627babad4055b90.

The workaround has been moved to the AMI image (isc-private/packer!10).

(cherry picked from commit aba16af556bfe142f2a3c5eb1da72713a41cf746)

2 years agoMerge branch 'tkrizek/resolver-test-export-home-9.16' into 'bind-9.16'
Tom Krizek [Thu, 21 Mar 2024 14:25:31 +0000 (14:25 +0000)] 
Merge branch 'tkrizek/resolver-test-export-home-9.16' into 'bind-9.16'

[9.16] Export variable in resolver system test

See merge request isc-projects/bind9!8899

2 years agoExport variable in resolver system test
Tom Krizek [Fri, 12 Jan 2024 14:03:53 +0000 (15:03 +0100)] 
Export variable in resolver system test

Variable assignment when calling subroutines might not be portable.
Notably, it doesn't work with FreeBSD shell, where the value of HOME
would be ignored in this case.

Since the commands are already executed in a subshell, export the HOME
variable to ensure it is properly handled in all shells.

(cherry picked from commit 86a192cecea5413db85b30fb478cc48986452fe4)

2 years agoMerge branch 'michal/add-pipelines-to-ci-job-trigger-lists-9.16' into 'bind-9.16'
Michał Kępień [Thu, 21 Mar 2024 11:33:00 +0000 (11:33 +0000)] 
Merge branch 'michal/add-pipelines-to-ci-job-trigger-lists-9.16' into 'bind-9.16'

[9.16] Add "pipelines" to CI job trigger lists

See merge request isc-projects/bind9!8897

2 years agoAdd "pipelines" to CI job trigger lists
Michał Kępień [Thu, 21 Mar 2024 11:29:21 +0000 (12:29 +0100)] 
Add "pipelines" to CI job trigger lists

To enable GitLab CI jobs in other projects to trigger pipelines in the
BIND 9 project using their CI_JOB_TOKEN, add "pipelines" to the relevant
GitLab CI job trigger lists.

(cherry picked from commit a4e9ce500a42d596e64c477df66c9bcdd692b06b)

2 years agoMerge branch '4649-work-around-a-tsan-issue-with-newer-kernels-9.16' into 'bind-9.16'
Petr Špaček [Thu, 21 Mar 2024 08:40:11 +0000 (08:40 +0000)] 
Merge branch '4649-work-around-a-tsan-issue-with-newer-kernels-9.16' into 'bind-9.16'

[9.16] Work around a TSAN issue with newer kernels

See merge request isc-projects/bind9!8895

2 years agoWork around a TSAN issue with newer kernels
Michał Kępień [Thu, 21 Mar 2024 05:47:29 +0000 (06:47 +0100)] 
Work around a TSAN issue with newer kernels

The ThreadSanitizer version currently available from Fedora 39
repositories is unable to cope with very high ASLR entropy, which is the
default in some recent Linux distributions [1].  This causes all
TSAN-enabled builds to fail on the affected systems with an error like:

    FATAL: ThreadSanitizer: unexpected memory mapping 0x7d00e0772000-0x7d00e0c00000

Work around the problem by reducing ASLR entropy for all TSAN-enabled
builds until the problem is resolved upstream.

[1] https://github.com/google/sanitizers/issues/1716

(cherry picked from commit 05b09f2b5bb68a916288f56bf627babad4055b90)

2 years agoMerge branch '4580-add-resolver-arpa-to-the-built-in-empty-zones-bind-9.16' into...
Mark Andrews [Thu, 21 Mar 2024 00:51:23 +0000 (00:51 +0000)] 
Merge branch '4580-add-resolver-arpa-to-the-built-in-empty-zones-bind-9.16' into 'bind-9.16'

[9.16] Resolve "Add resolver.arpa to the built in empty zones"

See merge request isc-projects/bind9!8891

2 years agoAdd release note for [GL #4580]
Mark Andrews [Wed, 14 Feb 2024 05:37:49 +0000 (16:37 +1100)] 
Add release note for [GL #4580]

(cherry picked from commit ecb043fc7b1a99a7e2ffb3d34974d16c00348471)

2 years agoAdd CHANGES entry for [GL #4580]
Mark Andrews [Wed, 14 Feb 2024 05:35:15 +0000 (16:35 +1100)] 
Add CHANGES entry for [GL #4580]

(cherry picked from commit d12c23875062852b5830f60e1865f89412fd373f)

2 years agoAdd RESOLVER.ARPA to the built in empty zones
Mark Andrews [Wed, 14 Feb 2024 05:32:33 +0000 (16:32 +1100)] 
Add RESOLVER.ARPA to the built in empty zones

RFC 9462 adds RESOLVER.ARPA to the list of built in empty zones.

(cherry picked from commit 49561277ded03bb63f769822f0c185b2dad75463)

2 years agoMerge tag 'v9.16.49' into bind-9.16
Michał Kępień [Wed, 20 Mar 2024 13:37:45 +0000 (14:37 +0100)] 
Merge tag 'v9.16.49' into bind-9.16

2 years agoMerge branch 'mnowak/freebsd-13.3-9.16' into 'bind-9.16'
Michal Nowak [Mon, 18 Mar 2024 16:04:08 +0000 (16:04 +0000)] 
Merge branch 'mnowak/freebsd-13.3-9.16' into 'bind-9.16'

[9.16] Add FreeBSD 13.3

See merge request isc-projects/bind9!8877

2 years agoAdd FreeBSD 13.3
Michal Nowak [Tue, 5 Mar 2024 19:22:47 +0000 (20:22 +0100)] 
Add FreeBSD 13.3

(cherry picked from commit 9019985d2d7b364585f80940372a05123158b65c)

2 years agoMerge branch 'mnowak/move-stress-tests-to-freebsd-13-9.16' into 'bind-9.16'
Michal Nowak [Fri, 15 Mar 2024 11:20:32 +0000 (11:20 +0000)] 
Merge branch 'mnowak/move-stress-tests-to-freebsd-13-9.16' into 'bind-9.16'

[9.16] FreeBSD "stress" tests now run on FreeBSD 13.2

See merge request isc-projects/bind9!8873

2 years agoFreeBSD "stress" tests now run on FreeBSD 13.2
Michal Nowak [Thu, 1 Feb 2024 15:09:05 +0000 (16:09 +0100)] 
FreeBSD "stress" tests now run on FreeBSD 13.2

(cherry picked from commit 176bf877e131cbac249fd1c4e9f33f8458344040)

2 years agoMerge branch 'matthijs-add-rfc-9460-to-arm-v9.16' into 'bind-9.16'
Matthijs Mekking [Thu, 14 Mar 2024 13:29:27 +0000 (13:29 +0000)] 
Merge branch 'matthijs-add-rfc-9460-to-arm-v9.16' into 'bind-9.16'

[9.16] Add RFC 9460 to list of supported RFCs

See merge request isc-projects/bind9!8866

2 years agoAdd RFC 9460 to list of supported RFCs
Matthijs Mekking [Mon, 11 Mar 2024 07:55:26 +0000 (08:55 +0100)] 
Add RFC 9460 to list of supported RFCs

The specification was implemented (#1132) when it was a draft. Now that
it is RFC, add the RFC to the list of supported RFCs.

(cherry picked from commit 5b5f43babcaf69bcb7bdc7c4bf8de443a118c93d)

2 years agoMerge branch '4633-undefined-behaviour-in-rdataslab-c-bind-9.16' into 'bind-9.16'
Mark Andrews [Thu, 14 Mar 2024 00:50:22 +0000 (00:50 +0000)] 
Merge branch '4633-undefined-behaviour-in-rdataslab-c-bind-9.16' into 'bind-9.16'

[9.16] Resolve "Undefined behaviour in rdataslab.c"

See merge request isc-projects/bind9!8861

2 years agoOnly call memmove if the rdata length is non zero
Mark Andrews [Tue, 12 Mar 2024 23:15:03 +0000 (10:15 +1100)] 
Only call memmove if the rdata length is non zero

This avoids undefined behaviour on zero length rdata where the
data pointer is NULL.

(cherry picked from commit 228cc557fe4ca29e34eccb3a1846d7f754879aed)

2 years agoMerge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.50' into 'bind...
Michał Kępień [Wed, 13 Mar 2024 08:59:32 +0000 (08:59 +0000)] 
Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.50' into 'bind-9.16'

Set up version and release notes for BIND 9.16.50

See merge request isc-projects/bind9!8858

2 years agoSet up release notes for BIND 9.16.50
Michał Kępień [Wed, 13 Mar 2024 08:56:26 +0000 (09:56 +0100)] 
Set up release notes for BIND 9.16.50

2 years agoUpdate BIND version to 9.16.50-dev
Michał Kępień [Wed, 13 Mar 2024 08:56:26 +0000 (09:56 +0100)] 
Update BIND version to 9.16.50-dev

2 years agoMerge branch '4625-broken-trust-chain-on-corner-case-secure-chain-fixup-keytrap-test...
Matthijs Mekking [Tue, 12 Mar 2024 12:48:58 +0000 (12:48 +0000)] 
Merge branch '4625-broken-trust-chain-on-corner-case-secure-chain-fixup-keytrap-test-only-v9_16' into 'bind-9.16'

[9.16] Test secure chain that includes inactive KSK

See merge request isc-projects/bind9!8851

2 years agoTest secure chain that includes inactive KSK
Matthijs Mekking [Mon, 11 Mar 2024 10:52:03 +0000 (11:52 +0100)] 
Test secure chain that includes inactive KSK

Add a regression test case for the scenario where a secure chain of
trust includes an inactive KSK, that is a KSK that is not signing the
DNSKEY RRset.

(cherry picked from commit f0bfd276e02f861b7a98d569b03e267b0261f599)

2 years agoMerge branch 'prep-release' into v9.16.49-release v9.16.49
Michał Kępień [Tue, 12 Mar 2024 08:43:03 +0000 (09:43 +0100)] 
Merge branch 'prep-release' into v9.16.49-release

2 years agoprep 9.16.49
Michał Kępień [Tue, 12 Mar 2024 08:42:34 +0000 (09:42 +0100)] 
prep 9.16.49

2 years agoMerge branch 'pspacek/prepare-documentation-for-bind-9.16.49' into 'v9.16.49-release'
Michał Kępień [Tue, 12 Mar 2024 08:41:23 +0000 (08:41 +0000)] 
Merge branch 'pspacek/prepare-documentation-for-bind-9.16.49' into 'v9.16.49-release'

Prepare documentation for BIND 9.16.49

See merge request isc-private/bind9!672

2 years agoPrepare release notes for BIND 9.16.49
Petr Špaček [Fri, 8 Mar 2024 17:19:28 +0000 (18:19 +0100)] 
Prepare release notes for BIND 9.16.49

2 years agoMerge branch '4621-account-for-changes-to-struct-dns_rbtnode-9.16.49' into 'v9.16...
Petr Špaček [Thu, 7 Mar 2024 09:24:06 +0000 (09:24 +0000)] 
Merge branch '4621-account-for-changes-to-struct-dns_rbtnode-9.16.49' into 'v9.16.49-release'

[9.16.49] Account for changes to struct dns_rbtnode

See merge request isc-projects/bind9!8841

2 years agoMerge branch '4621-account-for-changes-to-struct-dns_rbtnode' into 'bind-9.16'
Michał Kępień [Thu, 7 Mar 2024 09:02:45 +0000 (09:02 +0000)] 
Merge branch '4621-account-for-changes-to-struct-dns_rbtnode' into 'bind-9.16'

Account for changes to struct dns_rbtnode

See merge request isc-projects/bind9!8840

2 years agoAccount for changes to struct dns_rbtnode
Michał Kępień [Thu, 7 Mar 2024 08:42:38 +0000 (09:42 +0100)] 
Account for changes to struct dns_rbtnode

Commit eba7fb5f9f4925bbfd0d85847117847586b1ee9e modified the definition
of struct dns_rbtnode.  Doing that changes the layout of map-format zone
files.  Bump MAPAPI and update the offsets used in map-format zone file
checks in the "masterformat" system test, as these changes were
inadvertently omitted from the aforementioned change.

(cherry picked from commit 52fe0b6be7cb99f2e13462ef86a31cc74185162d)

2 years agoAccount for changes to struct dns_rbtnode
Michał Kępień [Thu, 7 Mar 2024 08:42:38 +0000 (09:42 +0100)] 
Account for changes to struct dns_rbtnode

Commit 540a5b5a2c82170acc5c08d2c2ef74a700c7236f modified the definition
of struct dns_rbtnode.  Doing that changes the layout of map-format zone
files.  Bump MAPAPI and update the offsets used in map-format zone file
checks in the "masterformat" system test, as these changes were
inadvertently omitted from the aforementioned change.

2 years agoMerge branch '4621-fix-cache-pruning-after-rndc-flush-9.16.49' into 'v9.16.49-release'
Michał Kępień [Wed, 6 Mar 2024 18:28:43 +0000 (18:28 +0000)] 
Merge branch '4621-fix-cache-pruning-after-rndc-flush-9.16.49' into 'v9.16.49-release'

[9.16.49] Move the task creation into cache_create_db()

See merge request isc-projects/bind9!8836

2 years agoAdd CHANGES and release note for [GL #4621]
Ondřej Surý [Wed, 6 Mar 2024 12:39:25 +0000 (13:39 +0100)] 
Add CHANGES and release note for [GL #4621]

(cherry picked from commit bde5e18cb11ecc79ae52ecb00f883abd9edb50bd)

2 years agoMove the task creation into cache_create_db()
Ondřej Surý [Wed, 6 Mar 2024 12:26:04 +0000 (13:26 +0100)] 
Move the task creation into cache_create_db()

The dns_cache_flush() drops the old database and creates a new one, but
it forgets to create the task(s) that runs the node pruning and cleaning
the rbtdb when flushing it next time.  This causes the cleaning to skip
cleaning the parent nodes (with .down == NULL) leading to increased
memory usage over time until the database is unable to keep up and just
stays overmem all the time.

(cherry picked from commit d4bc4e5cc6802c7ea382145d431782be28bc97a9)

2 years agoCreate a second pruning task for rbtdb with unlimited quantum
Ondřej Surý [Fri, 1 Mar 2024 11:43:15 +0000 (12:43 +0100)] 
Create a second pruning task for rbtdb with unlimited quantum

Previously, rbtdb->task had quantum of 1 because it was originally used
just for freeing RBTDB contents, which can happen on a "best effort"
basis (does not need to be prioritized).  However, when tree pruning was
implemented, it also started sending events to that task, enabling the
latter to become clogged up with a significant event backlog because it
only pruned a single RBTDB node per event.

To prioritize tree pruning (as it is necessary for enforcing the
configured memory use limit for the cache memory context), create a
second task with a virtually unlimited quantum (UINT_MAX) and send the
tree-pruning events to this new task, to ensure that all nodes scheduled
for pruning will be processed before further nodes are queued in a
similar fashion.

This change enables dropping the prunenodes list and restoring the
originally-used logic that allocates and sends a separate event for each
node to prune.

(cherry picked from commit 540a5b5a2c82170acc5c08d2c2ef74a700c7236f)

2 years agoRestore the parent cleaning logic in prune_tree()
Ondřej Surý [Mon, 4 Mar 2024 06:34:34 +0000 (07:34 +0100)] 
Restore the parent cleaning logic in prune_tree()

Reconstruct the variant of the prune_tree() parent cleaning to consider
all elibible parents in a single loop as we were doing before all the
changes that led to this commit.

Update code comments so that they more precisely describe what the
relevant bits of code actually do.

(cherry picked from commit 12c42a6c07692ae76775bc4602d4c1ccf47ed5ca)

2 years agoMerge branch '4621-fix-cache-pruning-after-rndc-flush-9.16' into 'bind-9.16'
Michał Kępień [Wed, 6 Mar 2024 18:16:26 +0000 (18:16 +0000)] 
Merge branch '4621-fix-cache-pruning-after-rndc-flush-9.16' into 'bind-9.16'

[9.16] Move the task creation into cache_create_db()

See merge request isc-projects/bind9!8831

2 years agoAdd CHANGES and release note for [GL #4621]
Ondřej Surý [Wed, 6 Mar 2024 12:39:25 +0000 (13:39 +0100)] 
Add CHANGES and release note for [GL #4621]

(cherry picked from commit 79ee08c3377f4e15d406c32dfa8f4060cce52cd6)

2 years agoMove the task creation into cache_create_db()
Ondřej Surý [Wed, 6 Mar 2024 12:26:04 +0000 (13:26 +0100)] 
Move the task creation into cache_create_db()

The dns_cache_flush() drops the old database and creates a new one, but
it forgets to create the task(s) that runs the node pruning and cleaning
the rbtdb when flushing it next time.  This causes the cleaning to skip
cleaning the parent nodes (with .down == NULL) leading to increased
memory usage over time until the database is unable to keep up and just
stays overmem all the time.

(cherry picked from commit 79040a669ca26b75b06c25d27418cee7ab658013)

2 years agoCreate a second pruning task for rbtdb with unlimited quantum
Ondřej Surý [Fri, 1 Mar 2024 11:43:15 +0000 (12:43 +0100)] 
Create a second pruning task for rbtdb with unlimited quantum

Previously, rbtdb->task had quantum of 1 because it was originally used
just for freeing RBTDB contents, which can happen on a "best effort"
basis (does not need to be prioritized).  However, when tree pruning was
implemented, it also started sending events to that task, enabling the
latter to become clogged up with a significant event backlog because it
only pruned a single RBTDB node per event.

To prioritize tree pruning (as it is necessary for enforcing the
configured memory use limit for the cache memory context), create a
second task with a virtually unlimited quantum (UINT_MAX) and send the
tree-pruning events to this new task, to ensure that all nodes scheduled
for pruning will be processed before further nodes are queued in a
similar fashion.

This change enables dropping the prunenodes list and restoring the
originally-used logic that allocates and sends a separate event for each
node to prune.

(cherry picked from commit 231b2375e5b9b98096711f5e883911134adb6392)

2 years agoRestore the parent cleaning logic in prune_tree()
Ondřej Surý [Mon, 4 Mar 2024 06:34:34 +0000 (07:34 +0100)] 
Restore the parent cleaning logic in prune_tree()

Reconstruct the variant of the prune_tree() parent cleaning to consider
all elibible parents in a single loop as we were doing before all the
changes that led to this commit.

Update code comments so that they more precisely describe what the
relevant bits of code actually do.

(cherry picked from commit 454c75a33a0459131f8b7dcb31e5519a97b6fde2)

2 years agoMerge branch '4596-check-the-prunelink-member-of-the-correct-node-9.16.49' into ...
Michał Kępień [Sat, 2 Mar 2024 05:39:32 +0000 (05:39 +0000)] 
Merge branch '4596-check-the-prunelink-member-of-the-correct-node-9.16.49' into 'v9.16.49-release'

[9.16.49] Check the prunelink member of the correct node

See merge request isc-projects/bind9!8815

2 years agoCheck the prunelink member of the correct node
Michał Kępień [Sat, 2 Mar 2024 05:36:37 +0000 (06:36 +0100)] 
Check the prunelink member of the correct node

Commit 37101c7c8abbacaf07c30d5094bc6880cf4f7ca0 checks the prunelink
member of the node that was just pruned, not its parent node that was
intended to be examined.  Fix by checking the prunelink member of the
parent node, so that adding the latter to its relevant prunenodes list
twice is properly guarded against.

(cherry picked from commit 7d9be24bb1e021560d58949d933274df53a2d69f)

2 years agoMerge branch '4596-check-the-prunelink-member-of-the-correct-node' into 'bind-9.16'
Michał Kępień [Sat, 2 Mar 2024 05:37:21 +0000 (05:37 +0000)] 
Merge branch '4596-check-the-prunelink-member-of-the-correct-node' into 'bind-9.16'

[9.16] Check the prunelink member of the correct node

See merge request isc-projects/bind9!8814

2 years agoCheck the prunelink member of the correct node
Michał Kępień [Sat, 2 Mar 2024 05:36:37 +0000 (06:36 +0100)] 
Check the prunelink member of the correct node

Commit 4b6fc97af6f936616a12e733b14ffc450af6df87 checks the prunelink
member of the node that was just pruned, not its parent node that was
intended to be examined.  Fix by checking the prunelink member of the
parent node, so that adding the latter to its relevant prunenodes list
twice is properly guarded against.

2 years agoMerge branch 'each-move-rrl-broken-config-test-case-to-checkconf-bind-9.18-bind-9...
Evan Hunt [Sat, 2 Mar 2024 01:11:18 +0000 (01:11 +0000)] 
Merge branch 'each-move-rrl-broken-config-test-case-to-checkconf-bind-9.18-bind-9.16' into 'bind-9.16'

[9.16] Move RRL broken-config check to checkconf

See merge request isc-projects/bind9!8813

2 years agomove RRL broken-config check to checkconf
Evan Hunt [Tue, 6 Feb 2024 21:33:21 +0000 (13:33 -0800)] 
move RRL broken-config check to checkconf

the RRL test included a test case that tried to start named with
a broken configuration.  the same error could be found with
named-checkconf, so it should have been tested in the checkconf
system test.

(cherry picked from commit 05398c14889550a052cc262d454edbd05900bba7)
(cherry picked from commit 046b62bf02b0d98f1d54fef10f862cf61a408438)

2 years agoMerge branch '4596-do-not-re-add-a-node-to-the-same-prunenodes-list-9.16.49' into...
Michał Kępień [Fri, 1 Mar 2024 17:22:32 +0000 (17:22 +0000)] 
Merge branch '4596-do-not-re-add-a-node-to-the-same-prunenodes-list-9.16.49' into 'v9.16.49-release'

[9.16.49] Do not re-add a node to the same prunenodes list

See merge request isc-projects/bind9!8811

2 years agoDo not re-add a node to the same prunenodes list
Michał Kępień [Fri, 1 Mar 2024 17:12:37 +0000 (18:12 +0100)] 
Do not re-add a node to the same prunenodes list

If a node cleaned up by prune_tree() happens to belong to the same node
bucket as its parent, the latter is directly appended to the prunenodes
list currently processed by prune_tree().  However, the relevant code
branch does not account for the fact that the parent might already be on
the list it is trying to append it to.  Fix by only calling
ISC_LIST_APPEND() for parent nodes not yet added to their relevant
prunenodes list.

(cherry picked from commit 4b6fc97af6f936616a12e733b14ffc450af6df87)

2 years agoMerge branch '4596-do-not-re-add-a-node-to-the-same-prunenodes-list' into 'bind-9.16'
Michał Kępień [Fri, 1 Mar 2024 17:19:15 +0000 (17:19 +0000)] 
Merge branch '4596-do-not-re-add-a-node-to-the-same-prunenodes-list' into 'bind-9.16'

Do not re-add a node to the same prunenodes list

See merge request isc-projects/bind9!8810

2 years agoDo not re-add a node to the same prunenodes list
Michał Kępień [Fri, 1 Mar 2024 17:12:37 +0000 (18:12 +0100)] 
Do not re-add a node to the same prunenodes list

If a node cleaned up by prune_tree() happens to belong to the same node
bucket as its parent, the latter is directly appended to the prunenodes
list currently processed by prune_tree().  However, the relevant code
branch does not account for the fact that the parent might already be on
the list it is trying to append it to.  Fix by only calling
ISC_LIST_APPEND() for parent nodes not yet added to their relevant
prunenodes list.

2 years agoMerge branch '4596-gracefully-handle-resending-a-node-to-prune_tree-9.16.49' into...
Michał Kępień [Thu, 29 Feb 2024 17:09:08 +0000 (17:09 +0000)] 
Merge branch '4596-gracefully-handle-resending-a-node-to-prune_tree-9.16.49' into 'v9.16.49-release'

[9.16.49] Gracefully handle resending a node to prune_tree()

See merge request isc-projects/bind9!8805

2 years agoGracefully handle resending a node to prune_tree()
Michał Kępień [Thu, 29 Feb 2024 16:38:52 +0000 (17:38 +0100)] 
Gracefully handle resending a node to prune_tree()

Commit 801e888d03e0ae34c5ecf00385defa77844f4023 made the prune_tree()
function use send_to_prune_tree() for triggering pruning of deleted leaf
nodes' parents.  This enabled the following sequence of events to
happen:

 1. Node A, which is a leaf node, is passed to send_to_prune_tree() and
    its pruning is queued.

 2. Node B is added to the RBTDB as a child of node A before the latter
    gets pruned.

 3. Node B, which is now a leaf node itself (and is likely to belong to
    a different node bucket than node A), is passed to
    send_to_prune_tree() and its pruning gets queued.

 4. Node B gets pruned.  Its parent, node A, now becomes a leaf again
    and therefore the prune_tree() call that handled node B calls
    send_to_prune_tree() for node A.

 5. Since node A was already queued for pruning in step 1 (but not yet
    pruned), the INSIST(!ISC_LINK_LINKED(node, prunelink)); assertion
    fails for node A in send_to_prune_tree().

The above sequence of events is not a sign of pathological behavior.
Replace the assertion check with a conditional early return from
send_to_prune_tree().

(cherry picked from commit f6289ad93141a29443d1e8e9874e36d44f16e686)

2 years agoMerge branch '4596-gracefully-handle-resending-a-node-to-prune_tree' into 'bind-9.16'
Michał Kępień [Thu, 29 Feb 2024 17:04:50 +0000 (17:04 +0000)] 
Merge branch '4596-gracefully-handle-resending-a-node-to-prune_tree' into 'bind-9.16'

[9.16] Gracefully handle resending a node to prune_tree()

See merge request isc-projects/bind9!8804

2 years agoGracefully handle resending a node to prune_tree()
Michał Kępień [Thu, 29 Feb 2024 16:38:52 +0000 (17:38 +0100)] 
Gracefully handle resending a node to prune_tree()

Commit 2df147cb1264b30c7f26c1d75310a010615687bc made the prune_tree()
function use send_to_prune_tree() for triggering pruning of deleted leaf
nodes' parents.  This enabled the following sequence of events to
happen:

 1. Node A, which is a leaf node, is passed to send_to_prune_tree() and
    its pruning is queued.

 2. Node B is added to the RBTDB as a child of node A before the latter
    gets pruned.

 3. Node B, which is now a leaf node itself (and is likely to belong to
    a different node bucket than node A), is passed to
    send_to_prune_tree() and its pruning gets queued.

 4. Node B gets pruned.  Its parent, node A, now becomes a leaf again
    and therefore the prune_tree() call that handled node B calls
    send_to_prune_tree() for node A.

 5. Since node A was already queued for pruning in step 1 (but not yet
    pruned), the INSIST(!ISC_LINK_LINKED(node, prunelink)); assertion
    fails for node A in send_to_prune_tree().

The above sequence of events is not a sign of pathological behavior.
Replace the assertion check with a conditional early return from
send_to_prune_tree().

2 years agoMerge branch '4591-improve-ttl-based-cleaning-9.16-v9.16.49-release' into 'v9.16...
Ondřej Surý [Thu, 29 Feb 2024 15:28:16 +0000 (15:28 +0000)] 
Merge branch '4591-improve-ttl-based-cleaning-9.16-v9.16.49-release' into 'v9.16.49-release'

[9.16.49] Remove expired rdataset headers from the heap

See merge request isc-projects/bind9!8802

2 years agoAdd CHANGES note for [GL #4591]
Ondřej Surý [Tue, 20 Feb 2024 12:27:05 +0000 (13:27 +0100)] 
Add CHANGES note for [GL #4591]

(cherry picked from commit db69cc7891d966dfc767cb2da469771fbe4d0997)
(cherry picked from commit 99d0ba442054189257b2c5e23be4b59e5df1c98c)

2 years agoMake the TTL-based cleaning more aggressive
Ondřej Surý [Tue, 20 Feb 2024 07:50:58 +0000 (08:50 +0100)] 
Make the TTL-based cleaning more aggressive

It was discovered that the TTL-based cleaning could build up
a significant backlog of the rdataset headers during the periods where
the top of the TTL heap isn't expired yet.  Make the TTL-based cleaning
more aggressive by cleaning more headers from the heap when we are
adding new header into the RBTDB.

(cherry picked from commit d8220ca4ca45e0aadf1ad938ed6264c8f95c7e55)
(cherry picked from commit 496fe6bc607057d8be74277ed4d6e8e4b1ef5b09)

2 years agoRemove expired rdataset headers from the heap
Ondřej Surý [Tue, 20 Feb 2024 07:50:58 +0000 (08:50 +0100)] 
Remove expired rdataset headers from the heap

It was discovered that an expired header could sit on top of the heap
a little longer than desireable.  Remove expired headers (headers with
rdh_ttl set to 0) from the heap completely, so they don't block the next
TTL-based cleaning.

(cherry picked from commit a9383e4b95256a65f9f05e64a79b086a9a1ed035)
(cherry picked from commit abe080d16eac4f5dcca62cb08bd9ca2f82bdaa2b)

2 years agoMerge branch '4591-improve-ttl-based-cleaning-9.16' into 'bind-9.16'
Ondřej Surý [Thu, 29 Feb 2024 15:10:56 +0000 (15:10 +0000)] 
Merge branch '4591-improve-ttl-based-cleaning-9.16' into 'bind-9.16'

[9.16] Remove expired rdataset headers from the heap

See merge request isc-projects/bind9!8764

2 years agoAdd CHANGES note for [GL #4591]
Ondřej Surý [Tue, 20 Feb 2024 12:27:05 +0000 (13:27 +0100)] 
Add CHANGES note for [GL #4591]

(cherry picked from commit db69cc7891d966dfc767cb2da469771fbe4d0997)

2 years agoMake the TTL-based cleaning more aggressive
Ondřej Surý [Tue, 20 Feb 2024 07:50:58 +0000 (08:50 +0100)] 
Make the TTL-based cleaning more aggressive

It was discovered that the TTL-based cleaning could build up
a significant backlog of the rdataset headers during the periods where
the top of the TTL heap isn't expired yet.  Make the TTL-based cleaning
more aggressive by cleaning more headers from the heap when we are
adding new header into the RBTDB.

(cherry picked from commit d8220ca4ca45e0aadf1ad938ed6264c8f95c7e55)

2 years agoRemove expired rdataset headers from the heap
Ondřej Surý [Tue, 20 Feb 2024 07:50:58 +0000 (08:50 +0100)] 
Remove expired rdataset headers from the heap

It was discovered that an expired header could sit on top of the heap
a little longer than desireable.  Remove expired headers (headers with
rdh_ttl set to 0) from the heap completely, so they don't block the next
TTL-based cleaning.

(cherry picked from commit a9383e4b95256a65f9f05e64a79b086a9a1ed035)

2 years agoMerge branch '4596-regression-in-cache-cleaning-9.16-v9.16.49-release' into 'v9.16...
Ondřej Surý [Thu, 29 Feb 2024 12:45:46 +0000 (12:45 +0000)] 
Merge branch '4596-regression-in-cache-cleaning-9.16-v9.16.49-release' into 'v9.16.49-release'

[9.16.49] Reduce lock contention during RBTDB tree pruning

See merge request isc-projects/bind9!8797

2 years agoAdd CHANGES and release note for [GL #4596]
Ondřej Surý [Thu, 22 Feb 2024 07:56:46 +0000 (08:56 +0100)] 
Add CHANGES and release note for [GL #4596]

(cherry picked from commit 774204ea743f46b1d1771df5e51764e7fc5dbdca)

2 years agoReduce lock contention during RBTDB tree pruning
Ondřej Surý [Wed, 21 Feb 2024 11:07:04 +0000 (12:07 +0100)] 
Reduce lock contention during RBTDB tree pruning

The log message for commit c3377cbfaa44dcb033f5abfb2db031612c8f47d1
explained:

    Instead of issuing a separate isc_task_send() call for every RBTDB node
    that triggers tree pruning, maintain a list of nodes from which tree
    pruning can be started from and only issue an isc_task_send() call if
    pruning has not yet been triggered by another RBTDB node.

    The extra queuing overhead eliminated by this change could be remotely
    exploited to cause excessive memory use.

However, it turned out that having a single queue for the nodes to be
pruned increased lock contention to a level where cleaning up nodes from
the RBTDB took too long, causing the amount of memory used by the cache
to grow indefinitely over time.

This commit makes the prunenodes list bucketed, adds a quantum of 10
items per prune_tree() run, and simplifies parent node cleaning in the
prune_tree() logic.

Instead of juggling node locks in a cycle, only clean up the node
currently being pruned and queue its parent (if it is also eligible) for
pruning in the same way (by sending an event).

This simplifies the code and also spreads the pruning load across more
task loop ticks, which is better for lock contention as less things run
in a tight loop.

(cherry picked from commit 2df147cb1264b30c7f26c1d75310a010615687bc)

2 years agoMerge branch '4596-regression-in-cache-cleaning-9.16' into 'bind-9.16'
Ondřej Surý [Thu, 29 Feb 2024 11:46:55 +0000 (11:46 +0000)] 
Merge branch '4596-regression-in-cache-cleaning-9.16' into 'bind-9.16'

[9.16] Remove the contention when pruning RBTDB nodes

See merge request isc-projects/bind9!8767

2 years agoAdd CHANGES and release note for [GL #4596]
Ondřej Surý [Thu, 22 Feb 2024 07:56:46 +0000 (08:56 +0100)] 
Add CHANGES and release note for [GL #4596]

2 years agoReduce lock contention during RBTDB tree pruning
Ondřej Surý [Wed, 21 Feb 2024 11:07:04 +0000 (12:07 +0100)] 
Reduce lock contention during RBTDB tree pruning

The log message for commit c3377cbfaa44dcb033f5abfb2db031612c8f47d1
explained:

    Instead of issuing a separate isc_task_send() call for every RBTDB node
    that triggers tree pruning, maintain a list of nodes from which tree
    pruning can be started from and only issue an isc_task_send() call if
    pruning has not yet been triggered by another RBTDB node.

    The extra queuing overhead eliminated by this change could be remotely
    exploited to cause excessive memory use.

However, it turned out that having a single queue for the nodes to be
pruned increased lock contention to a level where cleaning up nodes from
the RBTDB took too long, causing the amount of memory used by the cache
to grow indefinitely over time.

This commit makes the prunenodes list bucketed, adds a quantum of 10
items per prune_tree() run, and simplifies parent node cleaning in the
prune_tree() logic.

Instead of juggling node locks in a cycle, only clean up the node
currently being pruned and queue its parent (if it is also eligible) for
pruning in the same way (by sending an event).

This simplifies the code and also spreads the pruning load across more
task loop ticks, which is better for lock contention as less things run
in a tight loop.

2 years agoMerge branch '4604-fix-initial-tests-in-masterfile-system-test-bind-9.16' into 'bind...
Mark Andrews [Wed, 28 Feb 2024 01:56:11 +0000 (01:56 +0000)] 
Merge branch '4604-fix-initial-tests-in-masterfile-system-test-bind-9.16' into 'bind-9.16'

[9.16] Resolve "Fix initial tests in masterfile system test"

See merge request isc-projects/bind9!8789

2 years agoSplit the first masterfile test into 3
Mark Andrews [Tue, 27 Feb 2024 04:42:06 +0000 (15:42 +1100)] 
Split the first masterfile test into 3

Additionally read the correct zone for BIND 8 ttl checks

(cherry picked from commit e02b73c7a4413353b3c6ac3410a09dacd4cfb242)

2 years agoMerge branch '4595-fix-expire-lru-headers-race-9.16' into 'v9.16.49-release'
Ondřej Surý [Fri, 23 Feb 2024 14:51:19 +0000 (14:51 +0000)] 
Merge branch '4595-fix-expire-lru-headers-race-9.16' into 'v9.16.49-release'

[9.16] Do not use header_prev in expire_lru_headers

See merge request isc-projects/bind9!8777

2 years agoAdd CHANGES and release note for [GL #4495]
Mark Andrews [Fri, 23 Feb 2024 02:38:19 +0000 (13:38 +1100)] 
Add CHANGES and release note for [GL #4495]

(cherry picked from commit 4f8539ac23011c9d8bb31028c0a993967dac4628)

2 years agoDo not use header_prev in expire_lru_headers
Mark Andrews [Thu, 22 Feb 2024 23:12:47 +0000 (10:12 +1100)] 
Do not use header_prev in expire_lru_headers

dns__cacherbt_expireheader can unlink / free header_prev underneath
it.  Use ISC_LIST_TAIL after calling dns__cacherbt_expireheader
instead to get the next pointer to be processed.

(cherry picked from commit 7ce2e86024f022decb2678963538515ca39ab4ab)

2 years agoMerge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.49-v9.16.49-relea...
Ondřej Surý [Fri, 23 Feb 2024 11:29:26 +0000 (11:29 +0000)] 
Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.49-v9.16.49-release' into 'v9.16.49-release'

Update BIND version to 9.16.49-dev

See merge request isc-projects/bind9!8780

2 years agoSet up release notes for BIND 9.16.49
Michał Kępień [Sun, 11 Feb 2024 10:10:14 +0000 (11:10 +0100)] 
Set up release notes for BIND 9.16.49

(cherry picked from commit ae9d795a133e61adc49fbc171f00a57e2c29ddf0)

2 years agoUpdate BIND version to 9.16.49-dev
Michał Kępień [Sun, 11 Feb 2024 10:10:14 +0000 (11:10 +0100)] 
Update BIND version to 9.16.49-dev

(cherry picked from commit 8e4896ffa4c9059ab77ed98e8179f39d0e2c9097)

2 years agoMerge branch 'michal/post-release-tweaks-9.16' into 'bind-9.16'
Michał Kępień [Wed, 14 Feb 2024 16:23:14 +0000 (16:23 +0000)] 
Merge branch 'michal/post-release-tweaks-9.16' into 'bind-9.16'

[9.16] Miscellaneous post-release tweaks

See merge request isc-projects/bind9!8740

2 years agoMention CVE-2023-50868 in CHANGES entry 6322
Michał Kępień [Wed, 14 Feb 2024 13:49:49 +0000 (14:49 +0100)] 
Mention CVE-2023-50868 in CHANGES entry 6322

Since CVE-2023-50868 does not have a dedicated fix in BIND 9, mention
its CVE identifier in the CHANGES entry for CVE-2023-50387 (KeyTrap),
which accompanied the code change that addresses both of these
vulnerabilities.

(cherry picked from commit 2fd20bbaf5832963bf7e92b58f986d33590d1405)

2 years agoMerge tag 'v9.16.48' into bind-9.16
Michał Kępień [Wed, 14 Feb 2024 12:41:33 +0000 (13:41 +0100)] 
Merge tag 'v9.16.48' into bind-9.16

BIND 9.16.48

2 years agoMerge branch 'prep-release' into v9.16.48-release v9.16.48
Michał Kępień [Sun, 11 Feb 2024 11:31:39 +0000 (12:31 +0100)] 
Merge branch 'prep-release' into v9.16.48-release

2 years agoprep 9.16.48
Michał Kępień [Sun, 11 Feb 2024 11:31:23 +0000 (12:31 +0100)] 
prep 9.16.48

2 years agoMerge branch 'michal/prepare-documentation-for-bind-9.16.48' into 'v9.16.48-release'
Michał Kępień [Sun, 11 Feb 2024 11:29:36 +0000 (11:29 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.16.48' into 'v9.16.48-release'

Prepare documentation for BIND 9.16.48

See merge request isc-private/bind9!658

2 years agoAdd release note for GL #4459
Michał Kępień [Sun, 11 Feb 2024 11:10:17 +0000 (12:10 +0100)] 
Add release note for GL #4459

2 years agoPrepare release notes for BIND 9.16.48
Michał Kępień [Sun, 11 Feb 2024 11:10:17 +0000 (12:10 +0100)] 
Prepare release notes for BIND 9.16.48

2 years agoMerge branch '4568-fix-isc_ht-case-insensitive-matching-9.16' into 'v9.16.48-release'
Michał Kępień [Sun, 11 Feb 2024 11:06:57 +0000 (11:06 +0000)] 
Merge branch '4568-fix-isc_ht-case-insensitive-matching-9.16' into 'v9.16.48-release'

[9.16] Fix case insensitive matching in isc_ht hash table implementation

See merge request isc-private/bind9!654

2 years agoAdd CHANGES note for [GL #4568]
Ondřej Surý [Sat, 10 Feb 2024 23:59:30 +0000 (00:59 +0100)] 
Add CHANGES note for [GL #4568]

(cherry picked from commit e91884553f8b53d8e7f595a36914d351c1a1789d)