Commit Graph

38694 Commits

Author SHA1 Message Date
Matthijs Mekking
349b666b3f Add CHANGES and release note for #4624
(cherry picked from commit bc600ae2a1)
2024-03-14 11:41:13 +01:00
Matthijs Mekking
a621e035d4 Detect invalid durations
Be stricter in durations that are accepted. Basically we accept ISO 8601
formats, but fail to detect garbage after the integers in such strings.

For example, 'P7.5D' will be treated as 7 days. Pass 'endptr' to
'strtoll' and check if the endptr is at the correct suffix.

(cherry picked from commit e39de45adc)
2024-03-14 11:40:43 +01:00
Mark Andrews
98cd1cd33d Merge branch '4608-ensure-static-stub-ns-records-are-not-returned-bind-9.18' into 'bind-9.18'
[9.18]  Resolve "Ensure static stub NS records are not returned'

See merge request isc-projects/bind9!8863
2024-03-14 05:20:16 +00:00
Mark Andrews
63988c0159 Add CHANGES note for [GL #4608]
(cherry picked from commit 6a91862ac5)
2024-03-14 15:33:25 +11:00
Mark Andrews
6d43b3011e Check static-stub synthesised NS is not returned
(cherry picked from commit 229bf863e2)
2024-03-14 15:33:25 +11:00
Mark Andrews
7498db6366 Don't use static stub when returning best NS
If we find a static stub zone in query_addbestns look for a parent
zone which isn't a static stub.

(cherry picked from commit 40816e4e35)
2024-03-14 15:33:25 +11:00
Evan Hunt
f0f8f41751 Merge branch '4630-deadcode-fix-bind-9.18' into 'bind-9.18'
[9.18] remove dead code in rbtdb.c

See merge request isc-projects/bind9!8862
2024-03-14 01:31:15 +00:00
Evan Hunt
bc237c6f4a remove dead code in rbtdb.c
dns_db_addrdataset() enforces a requirement that version can only be
NULL for a cache database. code that checks for zone semantics and
version == NULL can never be reached.

(cherry picked from commit b3c8b5cfb2)
2024-03-13 18:21:44 -07:00
Mark Andrews
3b6924df4a Merge branch '4633-undefined-behaviour-in-rdataslab-c-bind-9.18' into 'bind-9.18'
[9.18] Resolve "Undefined behaviour in rdataslab.c"

See merge request isc-projects/bind9!8860
2024-03-14 00:37:38 +00:00
Mark Andrews
3fadd9efec 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 228cc557fe)
2024-03-14 11:06:11 +11:00
Matthijs Mekking
0ea08e6dc0 Merge branch '4552-keymgr-depends-function-bug-v9.18' into 'bind-9.18'
[9.18] Fix bug in keymgr Depends function

See merge request isc-projects/bind9!8859
2024-03-13 18:23:49 +00:00
Matthijs Mekking
3ecccb678f Add CHANGES for #4552
(cherry picked from commit 32e43764dd)
2024-03-13 11:52:05 +01:00
Matthijs Mekking
1b2e6f494a Fix bug in keymgr Depends function
The Depends relation refers to types of rollovers in which a certain
record type is going to be swapped. Specifically, the Depends relation
says there should be no dependency on the predecessor key (the set
Dep(x, T) must be empty).

But if the key is phased out (all its states are in HIDDEN), there is
no longer a dependency. Since the relationship is still maintained
(Predecessor and Successor metadata), the keymgr_dep function still
returned true. In other words, the set Dep(x, T) is not considered
empty.

This slows down key rollovers, only retiring keys when the successor
key has been fully propagated.

(cherry picked from commit 0aac81cf80)
2024-03-13 11:51:02 +01:00
Michał Kępień
edc44ff82a Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.18.26' into 'bind-9.18'
Set up version and release notes for BIND 9.18.26

See merge request isc-projects/bind9!8857
2024-03-13 08:59:28 +00:00
Michał Kępień
e629704dfa Set up release notes for BIND 9.18.26 2024-03-13 09:55:18 +01:00
Michał Kępień
22e7942509 Update BIND version to 9.18.26-dev 2024-03-13 09:55:18 +01:00
Matthijs Mekking
9c1d25b7e1 Merge branch '4625-broken-trust-chain-on-corner-case-secure-chain-fixup-keytrap-test-only-v9_18' into 'bind-9.18'
[9.18] Test secure chain that includes inactive KSK

See merge request isc-projects/bind9!8850
2024-03-12 09:18:11 +00:00
Matthijs Mekking
464950214c 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 f0bfd276e0)
2024-03-12 09:35:46 +01:00
Ondřej Surý
1a31d58947 Merge branch '4621-fix-cache-pruning-after-rndc-flush-9.18' into 'bind-9.18'
[9.18] Move the task creation into cache_create_db()

See merge request isc-projects/bind9!8830
2024-03-06 16:53:37 +00:00
Ondřej Surý
79ee08c337 Add CHANGES and release note for [GL #4621] 2024-03-06 17:11:14 +01:00
Ondřej Surý
79040a669c 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.
2024-03-06 17:11:14 +01:00
Ondřej Surý
231b2375e5 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.
2024-03-06 17:11:14 +01:00
Ondřej Surý
3a01c749f9 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 454c75a33a)
2024-03-06 17:11:14 +01:00
Evan Hunt
dad3ea96e9 Merge branch 'each-move-rrl-broken-config-test-case-to-checkconf-bind-9.18' into 'bind-9.18'
[9.18] Move RRL broken-config check to checkconf

See merge request isc-projects/bind9!8812
2024-03-02 00:31:53 +00:00
Evan Hunt
046b62bf02 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 05398c1488)
2024-03-01 15:59:38 -08:00
Ondřej Surý
a5a094c0af Merge branch '4591-improve-ttl-based-cleaning-9.18' into 'bind-9.18'
[9.18] Remove expired rdataset headers from the heap

See merge request isc-projects/bind9!8755
2024-02-29 15:08:38 +00:00
Ondřej Surý
9584c4338e Add CHANGES note for [GL #4591]
(cherry picked from commit db69cc7891)
2024-02-29 16:07:42 +01:00
Ondřej Surý
b4d9f1cbab 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 d8220ca4ca)
2024-02-29 16:07:41 +01:00
Ondřej Surý
756555dbcf 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 a9383e4b95)
2024-02-29 16:07:41 +01:00
Ondřej Surý
efdfc8d87f Merge branch '4596-regression-in-cache-cleaning-9.18' into 'bind-9.18'
[9.18] Remove the contention when pruning RBTDB nodes

See merge request isc-projects/bind9!8766
2024-02-29 11:38:54 +00:00
Ondřej Surý
f255ab3bf7 Add CHANGES and release note for [GL #4596]
(cherry picked from commit f447557667)
2024-02-29 12:06:56 +01:00
Ondřej Surý
a4c225cb6d Simplify the parent cleaning in the prune_tree() mechanism
Instead of juggling with node locks in a cycle, cleanup the node we are
just pruning and send any the parent that's also subject to the pruning
to the prune tree via normal way (e.g. enqueue pruning on the parent).

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

(cherry picked from commit 0b32d323e0)
2024-02-29 12:06:56 +01:00
Ondřej Surý
4b32456705 Reduce lock contention during RBTDB tree pruning
The log message for commit a9af1ac5ae
explained:

    In some older BIND 9 branches, the extra queuing overhead eliminated by
    this change could be remotely exploited to cause excessive memory use.
    Due to architectural shift, this branch is not vulnerable to that issue,
    but applying the fix to the latter is nevertheless deemed prudent for
    consistency and to make the code future-proof.

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 reverts the change to the pruning mechanism introduced by
commit a9af1ac5ae as BIND branches newer
than 9.16 were not affected by the excessive event queueing overhead
issue mentioned in the log message for the above commit.

(cherry picked from commit eed17611d8)
2024-02-29 12:06:56 +01:00
Artem Boldariev
71b0d1ba3f Merge branch '4156-docs-ephemeral-tls-recreation-v9.18' into 'bind-9.18'
[9.18] Improve documentation on ephemeral TLS configuration

See merge request isc-projects/bind9!8793
2024-02-28 21:28:57 +00:00
Artem Boldariev
9e6b4334ef Improve documentation on ephemeral TLS configuration
This commit improves the documentation on the ephemeral TLS
configuration and describes in more detail what is happening with TLS
configurations on reconfiguration in general.

(cherry picked from commit 1ab0f6d918)
2024-02-28 22:57:25 +02:00
Mark Andrews
4237921a05 Merge branch '4604-fix-initial-tests-in-masterfile-system-test-bind-9.18' into 'bind-9.18'
[9.18] Resolve "Fix initial tests in masterfile system test"

See merge request isc-projects/bind9!8788
2024-02-28 01:21:20 +00:00
Mark Andrews
111abe9940 Split the first masterfile test into 3
Additionally read the correct zone for BIND 8 ttl checks

(cherry picked from commit e02b73c7a4)
2024-02-28 11:38:18 +11:00
Aydın Mercan
d2542a38ed Merge branch '4425-current-level-of-tcp-clients-missing-from-statistics-channel-v9_18' into 'bind-9.18'
[9.18] Expose the TCP client count in statistics channel

See merge request isc-projects/bind9!8660
2024-02-27 08:40:34 +00:00
Aydın Mercan
2cfb92439b Add CHANGES and release note for [GL #4425]
(cherry picked from commit cc2713700a)
2024-02-27 11:04:28 +03:00
Aydın Mercan
abc47f5ce4 Expose the TCP client count in statistics channel
The statistics channel does not expose the current number of TCP clients
connected, only the highwater. Therefore, users did not have an easy
means to collect statistics about TCP clients served over time. This
information could only be measured as a seperate mechanism via rndc by
looking at the TCP quota filled.

In order to expose the exact current count of connected TCP clients
(tracked by the "tcp-clients" quota) as a statistics counter, an
extra, dedicated Network Manager callback would need to be
implemented for that purpose (a counterpart of ns__client_tcpconn()
that would be run when a TCP connection is torn down), which is
inefficient. Instead, track the number of currently-connected TCP
clients separately for IPv4 and IPv6, as Network Manager statistics.

(cherry picked from commit 2690dc48d3)
2024-02-27 11:04:28 +03:00
Michal Nowak
56c37ca845 Merge branch 'mnowak/dialup-watch-log-from-start-9.18' into 'bind-9.18'
[9.18] Watch logs from start in dialup system test

See merge request isc-projects/bind9!8785
2024-02-26 12:02:17 +00:00
Michal Nowak
195b892bde Watch logs from start in dialup system test
When the first parametrized test takes a bit longer than usual, the zone
transfer in ns3 may succeed before the second parametrized test is even
started, and then watch_log_from_here() won't find the "Transfer status:
success" message in the named log. Using watch_log_from_start() instead
makes sure the test is more stable.

(cherry picked from commit 283a7ab17d)
2024-02-26 12:11:07 +01:00
Mark Andrews
0356a34673 Merge branch '4413-add-resinfo-261-type-to-named-bind-9.18' into 'bind-9.18'
[9.18] Resolve "Add RESINFO (261) type to named" !8464

See merge request isc-projects/bind9!8783
2024-02-26 02:58:40 +00:00
Mark Andrews
fefea3bc92 Add CHANGES entry for [GL #4413]
(cherry picked from commit 1bf03a2e9a)
2024-02-26 13:21:21 +11:00
Mark Andrews
2e224d46d2 Add RESINFO record type
This is a TXT clone using code point 261.

(cherry picked from commit 0651063658)
2024-02-26 13:20:48 +11:00
Michal Nowak
5138f7bbde Merge branch 'mnowak/pytest_rewrite_dsdigest-9.18' into 'bind-9.18'
[9.18] Rewrite dsdigest system test to pytest

See merge request isc-projects/bind9!8781
2024-02-23 13:52:45 +00:00
Michal Nowak
05416a52b8 Rewrite dsdigest system test to pytest
(cherry picked from commit cfb68bda79)
2024-02-23 14:19:22 +01:00
Michal Nowak
f4f7827cf9 Add isctest.check.servfail()
(cherry picked from commit 5830ac831f)
2024-02-23 14:19:18 +01:00
Michal Nowak
a16a210d1c Merge branch 'mnowak/pytest_rewrite_xferquota-9.18' into 'bind-9.18'
[9.18] Rewrite xferquota system test to pytest

See merge request isc-projects/bind9!8775
2024-02-23 12:15:08 +00:00
Michal Nowak
07bd58d836 Rewrite xferquota system test to pytest
(cherry picked from commit 69bf4432cc)
2024-02-23 11:49:47 +01:00