Commit Graph
33367 Commits
Author SHA1 Message Date
Michał Kępień 09dbebd964 Merge branch '2777-use-minimal-sized-caches-for-non-recursive-views-v9_16' into 'v9_16'
[v9_16] Use minimal-sized caches for non-recursive views

See merge request isc-projects/bind9!5211
2021-06-22 13:56:36 +00:00
Michał Kępień 87aa343424 Add CHANGES entry
(cherry picked from commit f9500f824d)
2021-06-22 15:32:27 +02:00
Michał Kępień 7427da27fa Hardcode "max-cache-size" for the "_bind" view
The built-in "_bind" view does not allow recursion and therefore does
not need a large cache database.  However, as "max-cache-size" is not
explicitly set for that view in the default configuration, it inherits
that setting from global options.  Set "max-cache-size" for the built-in
"_bind" view to a fixed value (2 MB, i.e. the smallest allowed value) to
prevent needlessly preallocating memory for its cache RBT hash table.

(cherry picked from commit 86698ded32)
2021-06-22 15:32:27 +02:00
Michał Kępień 126436cc96 Use minimal-sized caches for non-recursive views
Currently the implicit default for the "max-cache-size" option is "90%".
As this option is inherited by all configured views, using multiple
views can lead to memory exhaustion over time due to overcommitment.
The "max-cache-size 90%;" default also causes cache RBT hash tables to
be preallocated for every configured view, which does not really make
sense for views which do not allow recursion.

To limit this problem's potential for causing operational issues, use a
minimal-sized cache for views which do not allow recursion and do not
have "max-cache-size" explicitly set (either in global configuration or
in view configuration).

For configurations which include multiple views allowing recursion,
adjusting "max-cache-size" appropriately is still left to the operator.

(cherry picked from commit 86541b39d3)
2021-06-22 15:32:27 +02:00
Matthijs Mekking ff089d73e8 Merge branch '2783-in-view-dnssec-policy-deadlock-v9_16' into 'v9_16'
Fix in-view /w dnssec-policy deadlock at startup (9.16)

See merge request isc-projects/bind9!5204
2021-06-22 08:13:14 +00:00
Matthijs Mekking b2851b3c5f Add changes and notes for [#2783]
(cherry picked from commit dae42dc9d4)
2021-06-22 09:25:54 +02:00
Matthijs Mekking bb1f0404ab Fix deadlock issue with key-directory and in-view
When locking key files for a zone, we iterate over all the views and
lock a mutex inside the zone structure. However, if we envounter an
in-view zone, we will try to lock the key files twice, one time for
the home view and one time for the in-view view. This will lead to
a deadlock because one thread is trying to get the same lock twice.

(cherry picked from commit 42c601ae14)
2021-06-22 09:25:46 +02:00
Matthijs Mekking e7401506e4 Add test case for in-view with dnssec-policy
Add a test case for a zone that uses 'in-view' and 'dnssec-policy'.
BIND should not deadlock.

(cherry picked from commit acd83881ff)
2021-06-22 09:25:40 +02:00
Michał Kępień 7dc60c5953 Merge branch '2778-unique-key-directories-reported-as-reused-in-9-16-17-regression-vs-9-16-16-v9_16' into 'v9_16'
Checking of key-directory and dnssec-policy was broken

See merge request isc-projects/bind9!5197
2021-06-18 09:50:08 +00:00
Mark Andrews 0df4c40d64 Add release note for [GL #2778]
(cherry picked from commit 85033788d3)
2021-06-18 17:29:41 +10:00
Mark Andrews 01f547b34b Add CHANGES for [GL #2778]
(cherry picked from commit bd1419a9e8)
2021-06-18 17:29:41 +10:00
Mark Andrews efbf4ed5e1 Checking of key-directory and dnssec-policy was broken
the checks failed to account for key-directory being inheritable.

(cherry picked from commit d1e283ede1)
2021-06-18 17:29:41 +10:00
Mark Andrews d3268ea9ad Merge branch '2779-name-in-answer-doesn-t-match-the-name-in-query-v9_16' into 'v9_16'
Add w and W to maptoupper and maptolower tables

See merge request isc-projects/bind9!5196
2021-06-18 07:14:37 +00:00
Mark Andrews 467c795bfe Add release note for [GL #2779]
(cherry picked from commit 7372e9a60d)
2021-06-18 16:36:38 +10:00
Mark Andrews c3fdbcb1c1 Add CHANGES note for [GL #2779]
(cherry picked from commit 8c60debc18)
2021-06-18 16:36:38 +10:00
Mark Andrews ab597b8b91 Check wild card expansions by code point
(cherry picked from commit c65dc2f7dc)
2021-06-18 16:36:37 +10:00
Mark Andrews 52cc9ff372 Add w and W to maptoupper and maptolower tables
(cherry picked from commit 08eeebb6a7)
2021-06-18 16:35:19 +10:00
Michal Nowak ebc6fece77 Merge branch 'mnowak/alpine-3.14-v9_16' into 'v9_16'
[v9_16] Add Alpine Linux 3.14

See merge request isc-projects/bind9!5192
2021-06-17 16:24:54 +00:00
Michal Nowak 387fbbd4df Add Alpine Linux 3.14
(cherry picked from commit 80f828bc37)
2021-06-17 18:19:18 +02:00
Michał Kępień 76cd42fb56 Merge branch '2770-allow-hash-tables-for-cache-rbts-to-be-grown-v9_16' into 'v9_16'
[v9_16] Allow hash tables for cache RBTs to be grown

See merge request isc-projects/bind9!5191
2021-06-17 15:44:38 +00:00
Michał Kępień cc6d89f913 Add CHANGES entry
(cherry picked from commit 0c59f1362c)
2021-06-17 17:17:37 +02:00
Michał Kępień c745b14203 Allow resetting hash table size limits for DNS DBs
When "max-cache-size" is changed to "unlimited" (or "0") for a running
named instance (using "rndc reconfig"), the hash table size limit for
each affected cache DB is not reset to the maximum possible value,
preventing those hash tables from being allowed to grow as a result of
new nodes being added.

Extend dns_rbt_adjusthashsize() to interpret "size" set to 0 as a signal
to remove any previously imposed limits on the hash table size.  Adjust
API documentation for dns_db_adjusthashsize() accordingly.  Move the
call to dns_db_adjusthashsize() from dns_cache_setcachesize() so that it
also happens when "size" is set to 0.

(cherry picked from commit 6b77583f54)
2021-06-17 17:17:37 +02:00
Michał Kępień c2d9c14354 Allow hash tables for cache RBTs to be grown
Upon creation, each dns_rbt_t structure has its "maxhashbits" field
initialized to the value of the RBT_HASH_MAX_BITS preprocessor macro,
i.e. 32.  When the dns_rbt_adjusthashsize() function is called for the
first time for a given RBT (for cache RBTs, this happens when they are
first created, i.e. upon named startup), it lowers the value of the
"maxhashbits" field to the number of bits required to index the
requested number of hash table slots.  When a larger hash table size is
subsequently requested, the value of the "maxhashbits" field should be
increased accordingly, up to RBT_HASH_MAX_BITS.  However, the loop in
the rehash_bits() function currently ensures that the number of bits
necessary to index the resized hash table will not be larger than
rbt->maxhashbits instead of RBT_HASH_MAX_BITS, preventing the hash table
from being grown once the "maxhashbits" field of a given dns_rbt_t
structure is set to any value lower than RBT_HASH_MAX_BITS.

Fix by tweaking the loop guard condition in the rehash_bits() function
so that it compares the new number of bits used for indexing the hash
table against RBT_HASH_MAX_BITS rather than rbt->maxhashbits.

(cherry picked from commit c096f91451)
2021-06-17 17:17:37 +02:00
Michał Kępień b5e164d87a Merge branch '2763-increase-timeout-in-the-rndc-deadlock-test-v9_16' into 'v9_16'
[v9_16] Increase timeout in the rndc deadlock test

See merge request isc-projects/bind9!5190
2021-06-17 10:45:12 +00:00
Michał Kępień b9c9ed6197 Increase timeout in the rndc deadlock test
The timeout originally picked for "rndc status" invocations (2 seconds)
in the test attempting to reproduce a deadlock caused by running
multiple "rndc addzone", "rndc modzone", and "rndc delzone" commands
concurrently causes intermittent failures of the "addzone" system test
in GitLab CI.  Increase the timeout to 10 seconds to make such failures
less probable.  Adjust code comments accordingly.

(cherry picked from commit ac4c58e8ce)
2021-06-17 12:41:01 +02:00
Michał Kępień 65b74626e4 Merge branch 'v9_16_17-release' into 'v9_16'
Merge 9.16.17 release branch

See merge request isc-projects/bind9!5187
2021-06-16 20:38:37 +00:00
Michał Kępień a6b5004a72 Set up release notes for BIND 9.16.18 2021-06-16 22:29:27 +02:00
Tinderbox UserandMichał Kępień 84cc19b692 Merge branch 'prep-release' into v9_16_17-release 2021-06-16 22:29:27 +02:00
Michał Kępień 043f7b5ec1 Merge branch 'michal/prepare-documentation-for-bind-9.16.17' into 'v9_16_17-release'
Prepare documentation for BIND 9.16.17

See merge request isc-private/bind9!300
2021-06-16 22:29:27 +02:00
Tinderbox UserandMichał Kępień 13b9f23cce prep 9.16.17 2021-06-16 22:29:27 +02:00
Michał Kępień b926b343ed Prepare release notes for BIND 9.16.17 2021-06-16 22:29:27 +02:00
Michał Kępień f481179977 Reorder release notes 2021-06-16 22:29:27 +02:00
Michał Kępień a3bbfaf1ff Tweak and reword release notes 2021-06-16 22:29:27 +02:00
Michał Kępień e0ba988ac8 Tweak and reword recent CHANGES entries 2021-06-16 22:29:27 +02:00
Mark Andrews 08c27ce967 Merge branch '2755-bad-tkey-samples-in-genzone-sh-comment-v9_16' into 'v9_16'
make it clear algorithm field is a domain name

See merge request isc-projects/bind9!5181
2021-06-16 06:48:46 +00:00
Mark Andrews 1281b4f281 make it clear algorithm field is a domain name
(cherry picked from commit 47ca495108)
2021-06-16 16:12:44 +10:00
Mark Andrews 19df77ca48 Merge branch '2739-threadsanitizer-data-race-lib-isc-task-c-435-in-task_send-unprotected-access-to-task-threadid-v9_16' into 'v9_16'
Lock access to task->threadid

See merge request isc-projects/bind9!5178
2021-06-15 05:04:28 +00:00
Mark Andrews 2c38ba4670 Lock access to task->threadid
(cherry picked from commit 234ad2d075)
2021-06-15 12:53:13 +10:00
Ondřej Surý a7b3865eac Merge branch 'ondrej/bump-clang-dependency-to-llvm-12-v9_16' into 'v9_16'
Change the LLVM tools version to 12 (v9.16)

See merge request isc-projects/bind9!5175
2021-06-13 09:01:15 +00:00
Ondřej Surý b0e7511001 Update the source code formatting using clang-format-12
clang-format now tries to keep the type-cast on the same line as the
variable.  Update the formatting.
2021-06-13 08:19:44 +02:00
Ondřej Surý 8c20738feb Change the LLVM tools version to 12
LLVM 12 stable was released on 15. April 2021, change the default
version to the current stable.

(cherry picked from commit 9f7855322c)
2021-06-12 08:58:22 +02:00
Michał Kępień cc8624c0f6 Merge branch '2759-fix-no-ds-proofs-for-wildcard-cname-delegations-v9_16' into 'v9_16'
[v9_16] Fix "no DS" proofs for wildcard+CNAME delegations

See merge request isc-projects/bind9!5169
2021-06-10 09:11:16 +00:00
Michał Kępień 5ca495ad4f Add release note
(cherry picked from commit 16708682ad)
2021-06-10 10:26:51 +02:00
Michał Kępień 46001e4de3 Add CHANGES entry
(cherry picked from commit c223d81691)
2021-06-10 10:26:51 +02:00
Michał Kępień f88c90f47f Fix "no DS" proofs for wildcard+CNAME delegations
When answering a query requires wildcard expansion, the AUTHORITY
section of the response needs to include NSEC(3) record(s) proving that
the QNAME does not exist.

When a response to a query is an insecure delegation, the AUTHORITY
section needs to include an NSEC(3) proof that no DS record exists at
the parent side of the zone cut.

These two conditions combined trip up the NSEC part of the logic
contained in query_addds(), which expects the NS RRset to be owned by
the first name found in the AUTHORITY section of a delegation response.
This may not always be true, for example if wildcard expansion causes an
NSEC record proving QNAME nonexistence to be added to the AUTHORITY
section before the delegation is added to the response.  In such a case,
named incorrectly omits the NSEC record proving nonexistence of QNAME
from the AUTHORITY section.

The same block of code is affected by another flaw: if the same NSEC
record proves nonexistence of both the QNAME and the DS record at the
parent side of the zone cut, this NSEC record will be added to the
AUTHORITY section twice.

Fix by looking for the NS RRset in the entire AUTHORITY section and
adding the NSEC record to the delegation using query_addrrset() (which
handles duplicate RRset detection).

(cherry picked from commit 7a87bf468b)
2021-06-10 10:26:51 +02:00
Michał Kępień 82b7e6ccef Add AUTHORITY tests for CNAME-sourced delegations
Add a set of system tests which check the contents of the AUTHORITY
section for signed, insecure delegation responses constructed from CNAME
records and wildcards, both for zones using NSEC and NSEC3.

(cherry picked from commit 26ec4b9a89)
2021-06-10 10:26:51 +02:00
Michał Kępień 5b9c25bef8 Merge branch 'michal/fix-the-variable-checked-by-a-post-load-assertion-v9_16' into 'v9_16'
[v9_16] Fix the variable checked by a post-load assertion

See merge request isc-projects/bind9!5168
2021-06-10 08:06:31 +00:00
Mark AndrewsandMichał Kępień 3593651559 Fix the variable checked by a post-load assertion
Instead of checking the value of the variable modified two lines earlier
(the number of SOA records present at the apex of the old version of the
zone), one of the RUNTIME_CHECK() assertions in zone_postload() checks
the number of SOA records present at the apex of the new version of the
zone, which is already checked before.  Fix the assertion by making it
check the correct variable.

(cherry picked from commit 098639dc59)
2021-06-10 10:04:21 +02:00
Mark Andrews 63e1a742ee Merge branch '2760-db-unit-test-failure-v9_16' into 'v9_16'
Adjust acceptable count values

See merge request isc-projects/bind9!5159
2021-06-09 23:20:54 +00:00
Mark Andrews c7216ae382 Adjust acceptable count values
usleep(100000) can be slightly less than 10ms so allow the count
to reach 11.

(cherry picked from commit 2bc454dc2d)
2021-06-10 08:33:46 +10:00