2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00
Commit Graph

39253 Commits

Author SHA1 Message Date
Michał Kępień
f933f1856b Reorder release notes 2023-06-09 11:53:33 +02:00
Michał Kępień
76877a83be Tweak and reword release notes 2023-06-09 11:53:33 +02:00
Michał Kępień
1f48e1c998 Prepare release notes for BIND 9.19.14 2023-06-09 11:53:33 +02:00
Michał Kępień
350613af9d Drop "Known Issues" entry for #4006 as it is fixed 2023-06-09 11:53:33 +02:00
Michał Kępień
eb88490e91 Re-add a code comment to the "hooks" system test
Commit 5a84c7a09b removed a useful code
comment from the "hooks" system test.  Add it back to prevent confusion.
2023-06-09 11:53:33 +02:00
Michał Kępień
f251588176 Add a missing word to the release note for #4004 2023-06-09 11:53:33 +02:00
Michal Nowak
f69434dc47 Merge branch '4055-improve-the-overmem-cache-cleaning' into 'security-main'
Improve RBT overmem cache cleaning

See merge request isc-private/bind9!520
2023-06-09 09:50:19 +00:00
Michal Nowak
1afde574e9 Set max-cache-size expectations for low values 2023-06-08 12:11:09 +02:00
Ondřej Surý
616bd7a96e Add CHANGES and release note for [GL #4055] 2023-06-08 12:11:09 +02:00
Ondřej Surý
da0eafcdee Improve RBT overmem cache cleaning
When cache memory usage is over the configured cache size (overmem) and
we are cleaning unused entries, it might not be enough to clean just two
entries if the entries to be expired are smaller than the newly added
rdata.  This could be abused by an attacker to cause a remote Denial of
Service by possibly running out of the operating system memory.

Currently, the addrdataset() tries to do a single TTL-based cleaning
considering the serve-stale TTL and then optionally moves to overmem
cleaning if we are in that condition.  Then the overmem_purge() tries to
do another single TTL based cleaning from the TTL heap and then continue
with LRU-based cleaning up to 2 entries cleaned.

Squash the TTL-cleaning mechanism into single call from addrdataset(),
but ignore the serve-stale TTL if we are currently overmem.

Then instead of having a fixed number of entries to clean, pass the size
of newly added rdatasetheader to the overmem_purge() function and
cleanup at least the size of the newly added data.  This prevents the
cache going over the configured memory limit (`max-cache-size`).

Additionally, refactor the overmem_purge() function to reduce for-loop
nesting for readability.
2023-06-08 12:11:09 +02:00
Arаm Sаrgsyаn
282c5605b6 Merge branch '4105-QryDropped-stats-counter-documentation-update' into 'main'
QryDropped stats counter documentation update

Closes #4105

See merge request isc-projects/bind9!8006
2023-06-07 14:00:50 +00:00
Aram Sargsyan
27c30fe8a4 QryDropped stats counter documentation update
Document which dropped queries are calculated by the QryDropped
statistics counter.
2023-06-07 13:06:58 +00:00
Michal Nowak
e15455f848 Merge branch 'mnowak/placeholder-for-issue-4055' into 'main'
Add CHANGES placeholder for [GL #4055]

See merge request isc-projects/bind9!8010
2023-06-07 11:42:58 +00:00
Michal Nowak
0856c08ae9 Add CHANGES placeholder for [GL #4055] 2023-06-07 13:39:12 +02:00
Michal Nowak
490b7bd352 Merge branch 'mnowak/placeholder-for-issue-4089' into 'main'
Add CHANGES placeholder for [GL #4089]

See merge request isc-projects/bind9!8009
2023-06-07 11:18:10 +00:00
Michal Nowak
a2b3c2a386 Add CHANGES placeholder for [GL #4089] 2023-06-07 13:07:51 +02:00
Michal Nowak
fd606a8ea8 Merge branch 'mnowak/placeholder-for-issue-3835' into 'main'
Add CHANGES placeholder for [GL #3835]

See merge request isc-projects/bind9!8008
2023-06-07 09:00:42 +00:00
Michal Nowak
e6ed763bf3 Add CHANGES placeholder for [GL #3835] 2023-06-07 10:47:37 +02:00
Ondřej Surý
5bca79da1a Merge branch '4115-fix-extra-dns_validator-detach' into 'main'
Fix extra detach when dns_validator create_fetch() detects deadlock

Closes #4115

See merge request isc-projects/bind9!8003
2023-06-06 17:34:22 +00:00
Ondřej Surý
1d03cac78a Add CHANGES note for [GL #4115] 2023-06-06 19:04:17 +02:00
Ondřej Surý
696506e164 Fix extra detach when dns_validator create_fetch() detects deadlock
When create_fetch() in the dns_validator unit detects deadlock, it
returns DNS_R_NOVALIDSIG, but it didn't attach to the validator.  The
other condition to returning result != ISC_R_SUCCESS would be error from
dns_resolver_createfetch().  The caller (in two places out of three)
would detect the error condition and always detach from the validator.

Move the dns_validator_detach() on dns_resolver_createfetch() error
condition to create_fetch() function and cleanup the extra detaches in
seek_dnskey() and get_dsset().
2023-06-06 19:04:17 +02:00
Ondřej Surý
fbab2dd45f Merge branch '4038-resize-send-buffers-to-avoid-excessive-memory-allocation' into 'main'
Use appropriately sized send buffers for DNS messages over TCP

Closes #4038

See merge request isc-projects/bind9!8004
2023-06-06 11:41:44 +00:00
Ondřej Surý
dff9a56f07 Merge branch 'ondrej/print-library-versions' into 'main'
Print the libuv, liburcu and OpenSSL versions from configure script

See merge request isc-projects/bind9!7998
2023-06-06 11:40:51 +00:00
Artem Boldariev
8672d54847 Update CHANGES and release note [GL #4038]
Mention that memory usage was reduced by allocating properly sized
send buffers for stream-based transports.
2023-06-06 13:40:42 +02:00
Artem Boldariev
d8a5feb556 Use appropriately sized send buffers for DNS messages over TCP
This commit changes send buffers allocation strategy for stream based
transports. Before that change we would allocate a dynamic buffers
sized at 64Kb even when we do not need that much. That could lead to
high memory usage on server. Now we resize the send buffer to match
the size of the actual data, freeing the memory at the end of the
buffer for being reused later.
2023-06-06 13:40:42 +02:00
Ondřej Surý
920dddb729 Print the libuv, liburcu and OpenSSL versions from configure script
The configure summary now prints versions of the mandatory libraries
found when configuring.
2023-06-06 12:42:02 +02:00
Mark Andrews
8169a0ee31 Merge branch '4116-building-with-with-liburcu-qsbr-fails' into 'main'
Resolve "Building with --with-liburcu=qsbr fails"

Closes #4116

See merge request isc-projects/bind9!8002
2023-06-05 23:46:49 +00:00
Mark Andrews
e6e4ac05b8 Fix typo in synchronize_rcu macro (add h)
synchronize_rcu has not been used until now in BIND9 and there
was a typo in the define (a 'h' was missing).
2023-06-06 08:10:09 +10:00
Mark Andrews
c26d66604b Merge branch '4093-use-rcu-for-view-zonetable' into 'main'
Use RCU for view->zonetable

Closes #4093

See merge request isc-projects/bind9!7990
2023-06-02 00:39:07 +00:00
Mark Andrews
47ed397806 Add CHANGES note for [GL #4093] 2023-06-01 16:51:38 +02:00
Mark Andrews
783c6a9538 Use dns_view_findzone instead of dns_zt_find
This ensures that rcu locking is properly applied for
view->zonetable.
2023-06-01 16:51:38 +02:00
Mark Andrews
8d86fa7135 Extend dns_view_findzone to take an options argument
This is in preparation to allow the few remaining direct
dns_zt_find(view->zonetable, ...) to use it for rcu mediated
access to view->zonetable.
2023-06-01 16:51:38 +02:00
Mark Andrews
ceb3264082 Add dns_view_apply
Add dns_view_apply to allow dns_zt_apply to be called on
view->zonetable with rcu locking applied.
2023-06-01 16:51:38 +02:00
Mark Andrews
e0f41259bd Add dns_view_delzone
dns_view_delzone performs the rcu locking required around accessing
view->zonetable.
2023-06-01 16:51:38 +02:00
Mark Andrews
ad747976bb Use rcu methods to lock access view->zonetable
dns_view_find* may be called after the final call to dns_view_detach
is made which detaches view->zonetable to permit the server to
shutdown.  We need to detect if view->zonetable is NULL during this
stage and appropriately recover.
2023-06-01 16:51:38 +02:00
Ondřej Surý
f760ee3f8c Disable URCU inlining if inlined rcu_dereference() fails to compile
In some cases, the inlined version rcu_dereference() would not compile
when working on pointer to opaque struct (namely Ubuntu Jammy).  Detect
such condition in the autoconf and disable the inlining of the small
functions if it breaks the build.
2023-06-01 16:51:38 +02:00
Arаm Sаrgsyаn
1b0e7e7a50 Merge branch '4074-fix-stale-answer-client-timeout-with-clients-per-query' into 'main'
Fix a clients-per-query miscalculation bug

Closes #4074

See merge request isc-projects/bind9!7977
2023-06-01 09:21:10 +00:00
Aram Sargsyan
466a7d9b5f Add CHANGES and release notes for [GL #4074] 2023-06-01 08:14:31 +00:00
Aram Sargsyan
2ae5c4a674 Fix a clients-per-query miscalculation bug
The number of clients per query is calculated using the pending
fetch responses in the list. The dns_resolver_createfetch() function
includes every item in the list when deciding whether the limit is
reached (i.e. fctx->spilled is true). Then, when the limit is reached,
there is another calculation in fctx_sendevents(), when deciding
whether it is needed to increase the limit, but this time the TRYSTALE
responses are not included in the calculation (because of early break
from the loop), and because of that the limit is never increased.

A single client can have more than one associated response/event in the
list (currently max. two), and calculating them as separate "clients"
is unexpected. E.g. if 'stale-answer-enable' is enabled and
'stale-answer-client-timeout' is enabled and is larger than 0, then
each client will have two events, which will effectively halve the
clients-per-query limit.

Fix the dns_resolver_createfetch() function to calculate only the
regular FETCHDONE responses/events.

Change the fctx_sendevents() function to also calculate only FETCHDONE
responses/events. Currently, this second change doesn't have any impact,
because the TRYSTALE events were already skipped, but having the same
condition in both places will help prevent similar bugs in the future
if a new type of response/event is ever added.
2023-06-01 08:13:09 +00:00
Aram Sargsyan
3bb2babcd0 Add clients-per-query checks for the fetchlimit system test
Check if clients-per-query quota works as expected with or without
a positive stale-answer-client-timeout value and serve-stale answers
enabled.
2023-06-01 08:13:09 +00:00
Aram Sargsyan
7ebd055c78 Light refactoring of the fetchlimit system test
Prepare the fetchlimit system test for adding a clients-per-query
check. Change some functions and commands to accept a destination
NS IP address instead of using the hardcoded 10.53.0.3.
2023-06-01 08:13:09 +00:00
Aram Sargsyan
101d829b02 Fix fetchlimit system test issues
1. Fix the numbering.
2. Fix an artifacts rewriting issue.
3. Add missing checks of 'ret' after some checks.
2023-06-01 08:13:09 +00:00
Michal Nowak
a9ec626652 Merge branch 'mnowak/alpine-3.18' into 'main'
Add Alpine Linux 3.18

See merge request isc-projects/bind9!7985
2023-05-31 10:02:52 +00:00
Michal Nowak
ddb846454d Add Alpine Linux 3.18 2023-05-31 12:01:26 +02:00
Arаm Sаrgsyаn
01605a7ed1 Merge branch 'aram/statschannel-spilled-clients-counter' into 'main'
Add ClientQuota statistics channel counter

See merge request isc-projects/bind9!7978
2023-05-31 09:52:29 +00:00
Aram Sargsyan
fa9172d996 Add a CHANGES note for [GL !7978] 2023-05-31 09:09:35 +00:00
Aram Sargsyan
08ebf39d1e Update the documentation of the resolver statistics counters
The reference manual doesn't document all the available resolver
statistics counters. Add information about the missing counters.
2023-05-31 09:08:58 +00:00
Aram Sargsyan
04648d7c2f Add ClientQuota statistics channel counter
This counter indicates the number of the resolver's spilled
queries due to reaching the clients per query quota.
2023-05-31 09:08:58 +00:00
Evan Hunt
c8b69a0289 Merge branch '4012-remove-win2k-hacks' into 'main'
remove win2k gss-tsig hacks

Closes #4012

See merge request isc-projects/bind9!7843
2023-05-31 08:29:20 +00:00
Evan Hunt
f58b9e9d2c CHANGES and release notes for [GL #4012] 2023-05-30 15:36:15 -07:00