]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
5 years agoSet up release notes for BIND 9.17.16
Michał Kępień [Wed, 23 Jun 2021 10:56:35 +0000 (12:56 +0200)] 
Set up release notes for BIND 9.17.16

5 years agoUpdate BIND version to 9.17.15
Michał Kępień [Fri, 18 Jun 2021 09:44:00 +0000 (11:44 +0200)] 
Update BIND version to 9.17.15

5 years agoAdd CHANGES annotations
Michał Kępień [Fri, 18 Jun 2021 09:44:00 +0000 (11:44 +0200)] 
Add CHANGES annotations

5 years agoMerge branch 'michal/prepare-documentation-for-bind-9.17.15' into 'v9_17_15-release'
Michał Kępień [Fri, 18 Jun 2021 09:42:51 +0000 (09:42 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.17.15' into 'v9_17_15-release'

Prepare documentation for BIND 9.17.15

See merge request isc-private/bind9!304

5 years agoPrepare release notes for BIND 9.17.15
Michał Kępień [Fri, 18 Jun 2021 09:09:45 +0000 (11:09 +0200)] 
Prepare release notes for BIND 9.17.15

5 years agoTweak and reword release notes
Michał Kępień [Fri, 18 Jun 2021 09:09:45 +0000 (11:09 +0200)] 
Tweak and reword release notes

5 years agoTweak and reword recent CHANGES entries
Michał Kępień [Fri, 18 Jun 2021 09:09:45 +0000 (11:09 +0200)] 
Tweak and reword recent CHANGES entries

5 years agoMerge branch '2788-use-tolower-toupper-isupper-from-ctype-h' into 'main'
Ondřej Surý [Wed, 23 Jun 2021 09:45:28 +0000 (09:45 +0000)] 
Merge branch '2788-use-tolower-toupper-isupper-from-ctype-h' into 'main'

Use tolower(), toupper() and isupper() from ctype.h

Closes #2788

See merge request isc-projects/bind9!5209

5 years agoUse POSIX tolower(), toupper() and isupper() functions
Ondřej Surý [Tue, 22 Jun 2021 11:08:17 +0000 (13:08 +0200)] 
Use POSIX tolower(), toupper() and isupper() functions

In the code that rdataset_setownercase() and rdataset_getownercase() we
now use tolower()/toupper()/isupper() functions appropriately instead of
rolling our own code.

5 years agoDon't set locale globally, just use it when needed
Ondřej Surý [Tue, 22 Jun 2021 11:05:15 +0000 (13:05 +0200)] 
Don't set locale globally, just use it when needed

Previously, we would set the locale on a global level and that could
possibly lead to different behaviour in underlying functions.  In this
commit, we change to code to use the system locale only when calling the
libidn2 functions and reset the locale back to "POSIX" when exiting the
libidn2 code.

5 years agoMerge branch '1802-improve-description-of-mirror-zone-validation' into 'main'
Michał Kępień [Tue, 22 Jun 2021 20:53:48 +0000 (20:53 +0000)] 
Merge branch '1802-improve-description-of-mirror-zone-validation' into 'main'

Improve description of mirror zone validation

Closes #1802

See merge request isc-projects/bind9!5207

5 years agoImprove description of mirror zone validation
Michał Kępień [Tue, 22 Jun 2021 20:45:39 +0000 (22:45 +0200)] 
Improve description of mirror zone validation

Expand the description of mirror zones in the ARM by adding a brief
discussion of how the validation process works for AXFR and IXFR.  Move
the paragraph mentioning the "file" option higher up.  Apply minor
stylistic and whitespace-related tweaks to the relevant section of the
ARM.

5 years agoMerge branch '2784-improve-descriptions-of-buffering-related-options' into 'main'
Michał Kępień [Tue, 22 Jun 2021 20:31:59 +0000 (20:31 +0000)] 
Merge branch '2784-improve-descriptions-of-buffering-related-options' into 'main'

Improve descriptions of buffering-related options

Closes #2784

See merge request isc-projects/bind9!5215

5 years agoTweak descriptions of buffering-related options
Michał Kępień [Tue, 22 Jun 2021 20:26:46 +0000 (22:26 +0200)] 
Tweak descriptions of buffering-related options

Apply minor stylistical and whitespace-related tweaks to the
descriptions of the "tcp-receive-buffer", "udp-receive-buffer",
"tcp-send-buffer", and "udp-send-buffer" options in the ARM.

5 years agoFix typos in buffering-related option names
Michał Kępień [Tue, 22 Jun 2021 20:26:46 +0000 (22:26 +0200)] 
Fix typos in buffering-related option names

The ARM contains typos in the names of the following two options:

  - "tcp-receive-buffer"
  - "udp-receive-buffer"

Fix the ARM so that it contains proper option names.

5 years agoMerge branch '2279-expand-description-of-the-max-cache-size-option' into 'main'
Michał Kępień [Tue, 22 Jun 2021 19:37:59 +0000 (19:37 +0000)] 
Merge branch '2279-expand-description-of-the-max-cache-size-option' into 'main'

Expand description of the "max-cache-size" option

Closes #2279

See merge request isc-projects/bind9!5173

5 years agoRework description of the "max-cache-size" option
Petr Špaček [Tue, 15 Jun 2021 08:01:59 +0000 (10:01 +0200)] 
Rework description of the "max-cache-size" option

Improve the description of the "max-cache-size" option in the ARM by
focusing on its meaning for multiple views and default values.
Add mention of a hash table preallocation.

5 years agoMerge branch '2787-assertion-failure-handling-non-zero-opcodes-in-dot-and-doh' into...
Artem Boldariev [Tue, 22 Jun 2021 14:45:23 +0000 (14:45 +0000)] 
Merge branch '2787-assertion-failure-handling-non-zero-opcodes-in-dot-and-doh' into 'main'

Replace netmgr per-protocol sequential function with a common one

Closes #2787

See merge request isc-projects/bind9!5208

5 years agoAdd CHANGES and release notes for [GL #2787]
Ondřej Surý [Tue, 22 Jun 2021 10:33:50 +0000 (12:33 +0200)] 
Add CHANGES and release notes for [GL #2787]

5 years agoSystem tests to check named behaviour for unexpected opcodes
Artem Boldariev [Tue, 22 Jun 2021 10:32:24 +0000 (13:32 +0300)] 
System tests to check named behaviour for unexpected opcodes

This commit adds a set of tests to verify that BIND will not crash
when some opcodes are sent over DoT or DoH, leading to marking network
handle in question as sequential.

5 years agoReplace netmgr per-protocol sequential function with a common one
Ondřej Surý [Tue, 22 Jun 2021 10:24:44 +0000 (12:24 +0200)] 
Replace netmgr per-protocol sequential function with a common one

Previously, each protocol (TCPDNS, TLSDNS) has specified own function to
disable pipelining on the connection.  An oversight would lead to
assertion failure when opcode is not query over non-TCPDNS protocol
because the isc_nm_tcpdns_sequential() function would be called over
non-TCPDNS socket.  This commit removes the per-protocol functions and
refactors the code to have and use common isc_nm_sequential() function
that would either disable the pipelining on the socket or would handle
the request in per specific manner.  Currently it ignores the call for
HTTP sockets and causes assertion failure for protocols where it doesn't
make sense to call the function at all.

5 years agoMerge branch '2777-use-minimal-sized-caches-for-non-recursive-views' into 'main'
Michał Kępień [Tue, 22 Jun 2021 13:31:03 +0000 (13:31 +0000)] 
Merge branch '2777-use-minimal-sized-caches-for-non-recursive-views' into 'main'

Use minimal-sized caches for non-recursive views

Closes #2777

See merge request isc-projects/bind9!5189

5 years agoAdd CHANGES entry
Michał Kępień [Tue, 22 Jun 2021 13:28:31 +0000 (15:28 +0200)] 
Add CHANGES entry

5 years agoHardcode "max-cache-size" for the "_bind" view
Michał Kępień [Tue, 22 Jun 2021 13:28:31 +0000 (15:28 +0200)] 
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.

5 years agoUse minimal-sized caches for non-recursive views
Michał Kępień [Tue, 22 Jun 2021 13:28:31 +0000 (15:28 +0200)] 
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.

5 years agoMerge branch '2783-in-view-dnssec-policy-deadlock' into 'main'
Matthijs Mekking [Tue, 22 Jun 2021 07:23:59 +0000 (07:23 +0000)] 
Merge branch '2783-in-view-dnssec-policy-deadlock' into 'main'

Fix in-view /w dnssec-policy deadlock at startup

Closes #2783

See merge request isc-projects/bind9!5202

5 years agoAdd changes and notes for [#2783]
Matthijs Mekking [Mon, 21 Jun 2021 11:50:00 +0000 (13:50 +0200)] 
Add changes and notes for [#2783]

5 years agoFix deadlock issue with key-directory and in-view
Matthijs Mekking [Mon, 21 Jun 2021 09:36:50 +0000 (11:36 +0200)] 
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.

5 years agoAdd test case for in-view with dnssec-policy
Matthijs Mekking [Mon, 21 Jun 2021 10:00:01 +0000 (12:00 +0200)] 
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.

5 years agoMerge branch '2778-unique-key-directories-reported-as-reused-in-9-16-17-regression...
Mark Andrews [Fri, 18 Jun 2021 07:21:27 +0000 (07:21 +0000)] 
Merge branch '2778-unique-key-directories-reported-as-reused-in-9-16-17-regression-vs-9-16-16' into 'main'

Resolve "Unique key directories reported as reused in 9.16.17, regression vs 9.16.16"

Closes #2778

See merge request isc-projects/bind9!5195

5 years agoAdd release note for [GL #2778]
Mark Andrews [Fri, 18 Jun 2021 05:41:34 +0000 (15:41 +1000)] 
Add release note for [GL #2778]

5 years agoAdd CHANGES for [GL #2778]
Mark Andrews [Fri, 18 Jun 2021 05:39:46 +0000 (15:39 +1000)] 
Add CHANGES for [GL #2778]

5 years agoChecking of key-directory and dnssec-policy was broken
Mark Andrews [Fri, 18 Jun 2021 05:35:01 +0000 (15:35 +1000)] 
Checking of key-directory and dnssec-policy was broken

the checks failed to account for key-directory being inheritable.

5 years agoMerge branch '2779-name-in-answer-doesn-t-match-the-name-in-query' into 'main'
Mark Andrews [Fri, 18 Jun 2021 06:27:22 +0000 (06:27 +0000)] 
Merge branch '2779-name-in-answer-doesn-t-match-the-name-in-query' into 'main'

Resolve "name in answer doesn't match the name in query"

Closes #2779

See merge request isc-projects/bind9!5194

5 years agoAdd release note for [GL #2779]
Mark Andrews [Fri, 18 Jun 2021 03:28:45 +0000 (13:28 +1000)] 
Add release note for [GL #2779]

5 years agoAdd CHANGES note for [GL #2779]
Mark Andrews [Fri, 18 Jun 2021 01:34:36 +0000 (11:34 +1000)] 
Add CHANGES note for [GL #2779]

5 years agoCheck wild card expansions by code point
Mark Andrews [Fri, 18 Jun 2021 03:02:46 +0000 (13:02 +1000)] 
Check wild card expansions by code point

5 years agoAdd w and W to maptoupper and maptolower tables
Mark Andrews [Fri, 18 Jun 2021 01:29:45 +0000 (11:29 +1000)] 
Add w and W to maptoupper and maptolower tables

5 years agoMerge branch 'mnowak/alpine-3.14' into 'main'
Michal Nowak [Thu, 17 Jun 2021 16:17:06 +0000 (16:17 +0000)] 
Merge branch 'mnowak/alpine-3.14' into 'main'

Add Alpine Linux 3.14

See merge request isc-projects/bind9!5183

5 years agoAdd Alpine Linux 3.14
Michal Nowak [Wed, 16 Jun 2021 15:39:44 +0000 (17:39 +0200)] 
Add Alpine Linux 3.14

5 years agoMerge branch '2770-allow-hash-tables-for-cache-rbts-to-be-grown' into 'main'
Michał Kępień [Thu, 17 Jun 2021 15:16:38 +0000 (15:16 +0000)] 
Merge branch '2770-allow-hash-tables-for-cache-rbts-to-be-grown' into 'main'

Allow hash tables for cache RBTs to be grown

Closes #2770

See merge request isc-projects/bind9!5172

5 years agoAdd CHANGES entry
Michał Kępień [Thu, 17 Jun 2021 15:09:37 +0000 (17:09 +0200)] 
Add CHANGES entry

5 years agoAllow resetting hash table size limits for DNS DBs
Michał Kępień [Thu, 17 Jun 2021 15:09:37 +0000 (17:09 +0200)] 
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.

5 years agoAllow hash tables for cache RBTs to be grown
Michał Kępień [Thu, 17 Jun 2021 15:09:37 +0000 (17:09 +0200)] 
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.

5 years agoMerge branch '2763-increase-timeout-in-the-rndc-deadlock-test' into 'main'
Michał Kępień [Thu, 17 Jun 2021 10:40:31 +0000 (10:40 +0000)] 
Merge branch '2763-increase-timeout-in-the-rndc-deadlock-test' into 'main'

Increase timeout in the rndc deadlock test

Closes #2763

See merge request isc-projects/bind9!5163

5 years agoIncrease timeout in the rndc deadlock test
Michał Kępień [Thu, 17 Jun 2021 10:39:32 +0000 (12:39 +0200)] 
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.

5 years agoMerge branch 'ondrej/fix-some-spelling' into 'main'
Ondřej Surý [Thu, 17 Jun 2021 09:39:15 +0000 (09:39 +0000)] 
Merge branch 'ondrej/fix-some-spelling' into 'main'

Fix various typos in the documentation

See merge request isc-projects/bind9!4498

5 years agoFix various typos in the documentation
Ondřej Surý [Wed, 16 Dec 2020 09:24:01 +0000 (10:24 +0100)] 
Fix various typos in the documentation

Generally, the issues fixed here are missing articles, wrong articles
and double articles.  We especially like "the the".

5 years agoMerge branch '2606-remove-support-for-builtin-atomics-on-legacy-clang-compilers'...
Ondřej Surý [Thu, 17 Jun 2021 08:52:10 +0000 (08:52 +0000)] 
Merge branch '2606-remove-support-for-builtin-atomics-on-legacy-clang-compilers' into 'main'

Resolve "Remove support for builtin atomics on legacy clang compilers"

Closes #2606

See merge request isc-projects/bind9!4854

5 years agoAdd CHANGES note for [GL #2606]
Diego Fronza [Wed, 31 Mar 2021 20:13:26 +0000 (17:13 -0300)] 
Add CHANGES note for [GL #2606]

5 years agoDrop support for clang atomic and gcc __sync builtins
Ondřej Surý [Thu, 3 Jun 2021 06:00:22 +0000 (08:00 +0200)] 
Drop support for clang atomic and gcc __sync builtins

The requirements for BIND 9.17+ now requires C11 support from the
compiler, so we can safely drop most of the stdatomic.h shims from
lib/isc/unix/include/stdatomic.h.

This commit removes support for clang atomic builtins (clang >= 3.6.0
includes stdatomic.h header) and for Gcc __sync builtins.

The only compatibility shim that remains is support for __atomic
builtins for Gcc >= 4.7.0 since CentOS 7 still includes only Gcc 4.8.1
and the proper stdatomic.h header was only introduced in Gcc >= 4.9.

5 years agoRemove atomics emulated by a mutex-locked variable
Ondřej Surý [Thu, 3 Jun 2021 06:03:00 +0000 (08:03 +0200)] 
Remove atomics emulated by a mutex-locked variable

Mutex atomics were intended to be used as a debugging tool only
and it has already served its purpose and it's not needed anymore.

5 years agoMerge branch 'v9_17_14-release' into 'main'
Michał Kępień [Wed, 16 Jun 2021 20:24:43 +0000 (20:24 +0000)] 
Merge branch 'v9_17_14-release' into 'main'

Merge 9.17.14 release branch

See merge request isc-projects/bind9!5186

5 years agoSet up release notes for BIND 9.17.15
Michał Kępień [Wed, 16 Jun 2021 20:18:12 +0000 (22:18 +0200)] 
Set up release notes for BIND 9.17.15

5 years agoUpdate BIND version to 9.17.14
Michał Kępień [Tue, 8 Jun 2021 07:00:49 +0000 (09:00 +0200)] 
Update BIND version to 9.17.14

5 years agoAdd a CHANGES marker
Michał Kępień [Tue, 8 Jun 2021 07:00:49 +0000 (09:00 +0200)] 
Add a CHANGES marker

5 years agoMerge branch 'michal/prepare-documentation-for-bind-9.17.14' into 'v9_17_14-release'
Michał Kępień [Tue, 8 Jun 2021 06:59:38 +0000 (06:59 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.17.14' into 'v9_17_14-release'

Prepare documentation for BIND 9.17.14

See merge request isc-private/bind9!298

5 years agoPrepare release notes for BIND 9.17.14
Michał Kępień [Tue, 8 Jun 2021 06:41:36 +0000 (08:41 +0200)] 
Prepare release notes for BIND 9.17.14

5 years agoReorder release notes
Michał Kępień [Tue, 8 Jun 2021 06:41:36 +0000 (08:41 +0200)] 
Reorder release notes

5 years agoTweak and reword release notes
Michał Kępień [Tue, 8 Jun 2021 06:41:36 +0000 (08:41 +0200)] 
Tweak and reword release notes

5 years agoTweak and reword recent CHANGES entries
Michał Kępień [Tue, 8 Jun 2021 06:41:36 +0000 (08:41 +0200)] 
Tweak and reword recent CHANGES entries

5 years agoRemove leftover release note for GL #2603
Michał Kępień [Tue, 8 Jun 2021 06:41:36 +0000 (08:41 +0200)] 
Remove leftover release note for GL #2603

5 years agoMerge branch 'artem/doh-memmove-null-asan-fix' into 'main'
Artem Boldariev [Wed, 16 Jun 2021 15:51:02 +0000 (15:51 +0000)] 
Merge branch 'artem/doh-memmove-null-asan-fix' into 'main'

Fix undefined behaviour in DoH (passing NULL to memmove())

See merge request isc-projects/bind9!5182

5 years agoFix ASAN error in DoH (passing NULL to memmove())
Artem Boldariev [Mon, 14 Jun 2021 20:25:03 +0000 (23:25 +0300)] 
Fix ASAN error in DoH (passing NULL to memmove())

The warning was produced by an ASAN build:

runtime error: null pointer passed as argument 2, which is declared to
never be null

This commit fixes it by checking if nghttp2_session_mem_send() has
actually returned anything.

5 years agoMerge branch '2755-bad-tkey-samples-in-genzone-sh-comment' into 'main'
Mark Andrews [Wed, 16 Jun 2021 05:54:30 +0000 (05:54 +0000)] 
Merge branch '2755-bad-tkey-samples-in-genzone-sh-comment' into 'main'

Resolve "Bad TKEY samples in genzone.sh comment"

Closes #2755

See merge request isc-projects/bind9!5152

5 years agomake it clear algorithm field is a domain name
Mark Andrews [Mon, 7 Jun 2021 02:53:57 +0000 (12:53 +1000)] 
make it clear algorithm field is a domain name

5 years agoMerge branch '2739-threadsanitizer-data-race-lib-isc-task-c-435-in-task_send-unprotec...
Mark Andrews [Tue, 15 Jun 2021 00:39:03 +0000 (00:39 +0000)] 
Merge branch '2739-threadsanitizer-data-race-lib-isc-task-c-435-in-task_send-unprotected-access-to-task-threadid' into 'main'

Resolve "ThreadSanitizer: data race lib/isc/task.c:435 in task_send (unprotected access to `task->threadid`)"

Closes #2739

See merge request isc-projects/bind9!5149

5 years agoLock access to task->threadid
Mark Andrews [Fri, 4 Jun 2021 04:56:14 +0000 (14:56 +1000)] 
Lock access to task->threadid

5 years agoMerge branch 'artem/dig-large-doh-responses-support' into 'main'
Artem Boldariev [Mon, 14 Jun 2021 09:22:40 +0000 (09:22 +0000)] 
Merge branch 'artem/dig-large-doh-responses-support' into 'main'

Fix BIND and dig to support large DNS messages over DoH, disable XFRs over DoH

See merge request isc-projects/bind9!5148

5 years agoCHANGES
Evan Hunt [Tue, 8 Jun 2021 20:25:01 +0000 (13:25 -0700)] 
CHANGES

Mention that XFRs over DoH are explicitly disabled for now.

5 years agoSet sock->iface and sock->peer properly for layered connection types
Artem Boldariev [Mon, 7 Jun 2021 14:46:08 +0000 (17:46 +0300)] 
Set sock->iface and sock->peer properly for layered connection types

This change sets the mentioned fields properly and gets rid of klusges
added in the times when we were keeping pointers to isc_sockaddr_t
instead of copies. Among other things it helps to avoid a situation
when garbage instead of an address appears in dig output.

5 years agoMake BIND refuse to serve XFRs over DoH
Artem Boldariev [Mon, 7 Jun 2021 13:38:39 +0000 (16:38 +0300)] 
Make BIND refuse to serve XFRs over DoH

We cannot use DoH for zone transfers.  According to RFC8484 a DoH
request contains exactly one DNS message (see Section 6: Definition of
the "application/dns-message" Media Type,
https://datatracker.ietf.org/doc/html/rfc8484#section-6).  This makes
DoH unsuitable for zone transfers as often (and usually!) these need
more than one DNS message, especially for larger zones.

As zone transfers over DoH are not (yet) standardised, nor discussed
in RFC8484, the best thing we can do is to return "not implemented."

Technically DoH can be used to transfer small zones which fit in one
message, but that is not enough for the generic case.

Also, this commit makes the server-side DoH code ensure that no
multiple responses could be attempted to be sent over one HTTP/2
stream. In HTTP/2 one stream is mapped to one request/response
transaction. Now the write callback will be called with failure error
code in such a case.

5 years agoPass an HTTP handle to the read callback when finishing a stream
Artem Boldariev [Fri, 4 Jun 2021 15:30:35 +0000 (18:30 +0300)] 
Pass an HTTP handle to the read callback when finishing a stream

This commit fixes a leftover from an earlier version of the client-side
DoH code when the underlying transport handle was used directly.

5 years agoFix a crash in the client-side DoH code (header processing callback)
Artem Boldariev [Fri, 4 Jun 2021 14:39:58 +0000 (17:39 +0300)] 
Fix a crash in the client-side DoH code (header processing callback)

Support a situation in header processing callback when client side
code could receive a belated response or part of it. That could
happen when the HTTP/2 session was already closed, but there were some
response data from server in flight. Other client-side nghttp2
callbacks code already handled this case.

The bug became apparent after HTTP/2 write buffering was supported,
leading to rare unit test failures.

5 years agoNullify connect.cstream in time and keep track of all client streams
Artem Boldariev [Thu, 3 Jun 2021 13:12:01 +0000 (16:12 +0300)] 
Nullify connect.cstream in time and keep track of all client streams

This commit ensures that sock->h2.connect.cstream gets nullified when
the object in question is deleted. This fixes a nasty crash in dig
exposed when receiving large responses leading to double free()ing.

Also, it refactors how the client-side code keeps track of client
streams (hopefully) preventing from similar errors appearing in the
future.

5 years agoFix BIND to serve large HTTP responses
Artem Boldariev [Tue, 1 Jun 2021 12:16:19 +0000 (15:16 +0300)] 
Fix BIND to serve large HTTP responses

This commit makes NM code to report HTTP as a stream protocol. This
makes it possible to handle large responses properly. Like:

dig +https @127.0.0.1 A cmts1-dhcp.longlines.com

5 years agoMerge branch 'ondrej/bump-clang-dependency-to-llvm-12' into 'main'
Ondřej Surý [Sun, 13 Jun 2021 08:51:12 +0000 (08:51 +0000)] 
Merge branch 'ondrej/bump-clang-dependency-to-llvm-12' into 'main'

Change the LLVM tools version to 12

See merge request isc-projects/bind9!5174

5 years agoUpdate the source code formatting using clang-format-12
Ondřej Surý [Sat, 12 Jun 2021 07:14:40 +0000 (09:14 +0200)] 
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.

5 years agoChange the LLVM tools version to 12
Ondřej Surý [Sat, 12 Jun 2021 06:56:37 +0000 (08:56 +0200)] 
Change the LLVM tools version to 12

LLVM 12 stable was released on 15. April 2021, change the default
version to the current stable.

5 years agoMerge branch '2759-fix-no-ds-proofs-for-wildcard-cname-delegations' into 'main'
Michał Kępień [Thu, 10 Jun 2021 08:37:37 +0000 (08:37 +0000)] 
Merge branch '2759-fix-no-ds-proofs-for-wildcard-cname-delegations' into 'main'

Fix "no DS" proofs for wildcard+CNAME delegations

Closes #2759

See merge request isc-projects/bind9!5155

5 years agoAdd release note
Michał Kępień [Thu, 10 Jun 2021 08:13:23 +0000 (10:13 +0200)] 
Add release note

5 years agoAdd CHANGES entry
Michał Kępień [Thu, 10 Jun 2021 08:13:23 +0000 (10:13 +0200)] 
Add CHANGES entry

5 years agoFix "no DS" proofs for wildcard+CNAME delegations
Michał Kępień [Thu, 10 Jun 2021 08:13:23 +0000 (10:13 +0200)] 
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).

5 years agoAdd AUTHORITY tests for CNAME-sourced delegations
Michał Kępień [Thu, 10 Jun 2021 08:13:23 +0000 (10:13 +0200)] 
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.

5 years agoMerge branch 'michal/fix-the-variable-checked-by-a-post-load-assertion' into 'main'
Michał Kępień [Thu, 10 Jun 2021 08:03:50 +0000 (08:03 +0000)] 
Merge branch 'michal/fix-the-variable-checked-by-a-post-load-assertion' into 'main'

Fix the variable checked by a post-load assertion

See merge request isc-projects/bind9!5164

5 years agoFix the variable checked by a post-load assertion
Mark Andrews [Thu, 25 Feb 2021 03:44:44 +0000 (14:44 +1100)] 
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.

5 years agoMerge branch 'michal/update-release-checklist' into 'main'
Michał Kępień [Thu, 10 Jun 2021 06:58:54 +0000 (06:58 +0000)] 
Merge branch 'michal/update-release-checklist' into 'main'

Update release checklist

See merge request isc-projects/bind9!5165

5 years agoUpdate release checklist
Michał Kępień [Thu, 10 Jun 2021 06:48:29 +0000 (08:48 +0200)] 
Update release checklist

Add two items to the release checklist to ensure that the start and the
end of the code freeze for each release cycle is announced on
Mattermost.

5 years agoMerge branch '2760-db-unit-test-failure' into 'main'
Mark Andrews [Wed, 9 Jun 2021 22:29:46 +0000 (22:29 +0000)] 
Merge branch '2760-db-unit-test-failure' into 'main'

Resolve "db unit test failure"

Closes #2760

See merge request isc-projects/bind9!5156

5 years agoAdjust acceptable count values
Mark Andrews [Wed, 9 Jun 2021 13:54:14 +0000 (23:54 +1000)] 
Adjust acceptable count values

usleep(100000) can be slightly less than 10ms so allow the count
to reach 11.

5 years agoMerge branch '2720-threadsanitizer-data-race-lib-isc-unix-time-c-110-in-isc_time_isep...
Mark Andrews [Wed, 9 Jun 2021 13:51:10 +0000 (13:51 +0000)] 
Merge branch '2720-threadsanitizer-data-race-lib-isc-unix-time-c-110-in-isc_time_isepoch' into 'main'

Resolve "ThreadSanitizer: data race lib/isc/unix/time.c:110 in isc_time_isepoch"

Closes #2720

See merge request isc-projects/bind9!5124

5 years agoAddress race between zone_settimer and set_key_expiry_warning by
Mark Andrews [Wed, 2 Jun 2021 07:19:42 +0000 (17:19 +1000)] 
Address race between zone_settimer and set_key_expiry_warning by

adding missing lock.

    WARNING: ThreadSanitizer: data race
    Read of size 4 at 0x000000000001 by thread T1 (mutexes: read M1, write M2):
    #0 isc_time_isepoch lib/isc/unix/time.c:110
    #1 zone_settimer lib/dns/zone.c:14649
    #2 dns_zone_maintenance lib/dns/zone.c:6281
    #3 dns_zonemgr_forcemaint lib/dns/zone.c:18190
    #4 view_loaded server.c:9654
    #5 call_loaddone lib/dns/zt.c:301
    #6 doneloading lib/dns/zt.c:575
    #7 zone_asyncload lib/dns/zone.c:2259
    #8 task_run lib/isc/task.c:845
    #9 isc_task_run lib/isc/task.c:938
    #10 isc__nm_async_task lib/isc/netmgr/netmgr.c:855
    #11 process_netievent lib/isc/netmgr/netmgr.c:934
    #12 process_queue lib/isc/netmgr/netmgr.c:1003
    #13 process_all_queues lib/isc/netmgr/netmgr.c:775
    #14 async_cb lib/isc/netmgr/netmgr.c:804
    #15 <null> <null>
    #16 isc__trampoline_run lib/isc/trampoline.c:191
    #17 <null> <null>

    Previous write of size 4 at 0x000000000001 by thread T2:
    #0 isc_time_set lib/isc/unix/time.c:93
    #1 set_key_expiry_warning lib/dns/zone.c:6430
    #2 del_sigs lib/dns/zone.c:6711
    #3 zone_resigninc lib/dns/zone.c:7113
    #4 zone_maintenance lib/dns/zone.c:11111
    #5 zone_timer lib/dns/zone.c:14588
    #6 task_run lib/isc/task.c:845
    #7 isc_task_run lib/isc/task.c:938
    #8 isc__nm_async_task lib/isc/netmgr/netmgr.c:855
    #9 process_netievent lib/isc/netmgr/netmgr.c:934
    #10 process_queue lib/isc/netmgr/netmgr.c:1003
    #11 process_all_queues lib/isc/netmgr/netmgr.c:775
    #12 async_cb lib/isc/netmgr/netmgr.c:804
    #13 <null> <null>
    #14 isc__trampoline_run lib/isc/trampoline.c:191
    #15 <null> <null>

    SUMMARY: ThreadSanitizer: data race lib/isc/unix/time.c:110 in isc_time_isepoch

5 years agoMerge branch '2690-remove-windows-support-for-bind-9-17-9-18' into 'main'
Ondřej Surý [Wed, 9 Jun 2021 12:59:33 +0000 (12:59 +0000)] 
Merge branch '2690-remove-windows-support-for-bind-9-17-9-18' into 'main'

Completely remove BIND 9 Windows support

Closes #2690

See merge request isc-projects/bind9!5073

5 years agoAdd CHANGES and release note for GL #2690
Ondřej Surý [Thu, 20 May 2021 14:05:11 +0000 (16:05 +0200)] 
Add CHANGES and release note for GL #2690

5 years agoCompletely remove BIND 9 Windows support
Ondřej Surý [Thu, 20 May 2021 13:53:50 +0000 (15:53 +0200)] 
Completely remove BIND 9 Windows support

The Windows support has been completely removed from the source tree
and BIND 9 now no longer supports native compilation on Windows.

We might consider reviewing mingw-w64 port if contributed by external
party, but no development efforts will be put into making BIND 9 compile
and run on Windows again.

5 years agoMerge branch '2725-nsec3param-changes-on-restart' into 'main'
Matthijs Mekking [Wed, 9 Jun 2021 08:29:51 +0000 (08:29 +0000)] 
Merge branch '2725-nsec3param-changes-on-restart' into 'main'

Fix NSEC3 resalt on restart

Closes #2725

See merge request isc-projects/bind9!5126

5 years agoAdd release note and change entry for [#2725]
Matthijs Mekking [Wed, 2 Jun 2021 09:16:10 +0000 (11:16 +0200)] 
Add release note and change entry for [#2725]

5 years agoFix NSEC3 resalting upon restart
Matthijs Mekking [Wed, 2 Jun 2021 08:47:57 +0000 (10:47 +0200)] 
Fix NSEC3 resalting upon restart

When named restarts, it will examine signed zones and checks if the
current denial of existence strategy matches the dnssec-policy. If not,
it will schedule to create a new NSEC(3) chain.

However, on startup the zone database may not be read yet, fooling
BIND that the denial of existence chain needs to be created. This
results in a replacement of the previous NSEC(3) chain.

Change the code such that if the NSEC3PARAM lookup failed (the result
did not return in ISC_R_SUCCESS or ISC_R_NOTFOUND), we will try
again later. The nsec3param structure has additional variables to
signal if the lookup is postponed. We also need to save the signal
if an explicit resalt was requested.

In addition to the two added boolean variables, we add a variable to
store the NSEC3PARAM rdata. This may have a yet to be determined salt
value. We can't create the private data yet because there may be a
mismatch in salt length and the NULL salt value.

5 years agoAdd test for NSEC3PARAM not changed after restart
Matthijs Mekking [Wed, 2 Jun 2021 08:16:50 +0000 (10:16 +0200)] 
Add test for NSEC3PARAM not changed after restart

Add a test case where 'named' is restarted and ensure that an already
signed zone does not change its NSEC3 parameters.

The test case first tests the current zone and saves the used salt
value. Then after restart it checks if the salt (and other parameters)
are the same as before the restart.

This test case changes 'set_nsec3param'. This will now reset the salt
value, and when checking for NSEC3PARAM we will store the salt and
use it when testing the NXDOMAIN response. This does mean that for
every test case we now have to call 'set_nsec3param' explicitly (and
can not omit it because it is the same as the previous zone).

Finally, slightly changed some echo output to make debugging friendlier.

5 years agoMerge branch '2732-pause-the-dbiterator-in-dumptostream' into 'main'
Ondřej Surý [Fri, 4 Jun 2021 09:05:52 +0000 (09:05 +0000)] 
Merge branch '2732-pause-the-dbiterator-in-dumptostream' into 'main'

Pause the dbiterator when dumping the zone to the disk

Closes #2732

See merge request isc-projects/bind9!5150