]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
5 years agoMerge branch '2621-pull-request-to-fix-rdnc-addzone-doc' into 'main'
Mark Andrews [Tue, 4 May 2021 02:37:51 +0000 (02:37 +0000)] 
Merge branch '2621-pull-request-to-fix-rdnc-addzone-doc' into 'main'

Resolve "Pull request to fix rdnc-addzone doc"

Closes #2621

See merge request isc-projects/bind9!4882

5 years agoRemove spurious $ and \ in addzone example
Mark Andrews [Mon, 12 Apr 2021 03:57:56 +0000 (03:57 +0000)] 
Remove spurious $ and \ in addzone example

5 years agoMerge branch 'ondrej/add-backtrace-support-for-Windows' into 'main'
Ondřej Surý [Mon, 3 May 2021 18:40:30 +0000 (18:40 +0000)] 
Merge branch 'ondrej/add-backtrace-support-for-Windows' into 'main'

Add support for generating backtraces on Windows

See merge request isc-projects/bind9!4982

5 years agoAdd support for generating backtraces on Windows
Ondřej Surý [Tue, 27 Apr 2021 14:20:03 +0000 (16:20 +0200)] 
Add support for generating backtraces on Windows

This commit adds support for generating backtraces on Windows and
refactors the isc_backtrace API to match the Linux/BSD API (without
the isc_ prefix)

 * isc_backtrace_gettrace() was renamed to isc_backtrace(), the third
   argument was removed and the return type was changed to int
 * isc_backtrace_symbols() was added
 * isc_backtrace_symbols_fd() was added and used as appropriate

5 years agoMerge branch 'ondrej/add-nanosleep-and-usleep-windows-shims' into 'main'
Ondřej Surý [Mon, 3 May 2021 18:25:55 +0000 (18:25 +0000)] 
Merge branch 'ondrej/add-nanosleep-and-usleep-windows-shims' into 'main'

Add nanosleep and usleep Windows shims

See merge request isc-projects/bind9!4981

5 years agoMerge branch 'ondrej/replace-CreateThreads-with-isc_thread_create' into 'main'
Ondřej Surý [Mon, 3 May 2021 18:24:06 +0000 (18:24 +0000)] 
Merge branch 'ondrej/replace-CreateThreads-with-isc_thread_create' into 'main'

Add trampoline around iocompletionport_createthreads()

See merge request isc-projects/bind9!4980

5 years agoUse uv_sleep in the netmgr code
Ondřej Surý [Mon, 3 May 2021 10:10:03 +0000 (12:10 +0200)] 
Use uv_sleep in the netmgr code

libuv added uv_sleep(unsigned int msec) to the API since 1.34.0.  Use that in
the netmgr code and define usleep based shim for libuv << 1.34.0.

5 years agoAdd nanosleep and usleep Windows shims
Ondřej Surý [Tue, 27 Apr 2021 08:16:01 +0000 (10:16 +0200)] 
Add nanosleep and usleep Windows shims

This commit adds POSIX nanosleep() and usleep() shim implementation for
Windows to help implementors use less #ifdef _WIN32 in the code.

5 years agoAdd trampoline around iocompletionport_createthreads()
Ondřej Surý [Thu, 29 Apr 2021 12:43:45 +0000 (14:43 +0200)] 
Add trampoline around iocompletionport_createthreads()

On Windows, the iocompletionport_createthreads() didn't use
isc_thread_create() to create new threads for processing IO, but just a
simple CreateThread() function that completely circumvent the
isc_trampoline mechanism to initialize global isc_tid_v.  This lead to
segmentation fault in isc_hp API because '-1' isn't valid index to the
hazard pointer array.

This commit changes the iocompletionport_createthreads() to use
isc_thread_create() instead of CreateThread() to properly initialize
isc_tid_v.

5 years agoMerge branch '2627-tlsstream-c-warning-comparison-of-integer-expressions-of-different...
Diego dos Santos Fronza [Mon, 3 May 2021 17:03:44 +0000 (17:03 +0000)] 
Merge branch '2627-tlsstream-c-warning-comparison-of-integer-expressions-of-different-signedness' into 'main'

Resolve "tlsstream.c: warning: comparison of integer expressions of different signedness"

Closes #2627

See merge request isc-projects/bind9!4906

5 years agoAddress comparison of integers with different signedess
Diego Fronza [Fri, 16 Apr 2021 21:33:40 +0000 (18:33 -0300)] 
Address comparison of integers with different signedess

5 years agoMerge branch 'matthijs-nsupdate-update_test' into 'main'
Matthijs Mekking [Fri, 30 Apr 2021 12:26:12 +0000 (12:26 +0000)] 
Merge branch 'matthijs-nsupdate-update_test' into 'main'

Update nsupdate test

See merge request isc-projects/bind9!4975

5 years agoUpdate nsupdate test
Matthijs Mekking [Fri, 30 Apr 2021 09:03:46 +0000 (11:03 +0200)] 
Update nsupdate test

The nsupdate system test did not record failures from the
'update_test.pl' Perl script. This was because the 'ret' value was
not being saved outside the '{ $PERL ... || ret=1 } cat_i' scope.

Change this piece to store the output in a separate file and then
cat its contents. Now the 'ret' value is being saved.

Also record failures in 'update_test.pl' if sending the update
failed.

Add missing 'n' incrementals to 'nsupdate/test.sh' to keep track of
test numbers.

5 years agoMerge branch 'pspacek/rtd-sphinx-fix' into 'main'
Petr Špaček [Fri, 30 Apr 2021 10:57:30 +0000 (10:57 +0000)] 
Merge branch 'pspacek/rtd-sphinx-fix' into 'main'

Fix ARM build on readthedocs.org

See merge request isc-projects/bind9!4968

5 years agoFix ARM build on readthedocs.org
Petr Špaček [Thu, 29 Apr 2021 15:13:02 +0000 (17:13 +0200)] 
Fix ARM build on readthedocs.org

By default readthedocs.org uses Sphinx 1.8.5, but MR !4563 has
introduced depedency on ReferenceRole class which is available only in
Sphinx 2.0.0.

Path to doc/arm/requirements.txt needs to be configured in
readthedocs.org.

5 years agoMerge branch '2645-dnssec-polic-insecure' into 'main'
Matthijs Mekking [Fri, 30 Apr 2021 10:10:32 +0000 (10:10 +0000)] 
Merge branch '2645-dnssec-polic-insecure' into 'main'

Add built-in dnssec-policy "insecure"

Closes #2645

See merge request isc-projects/bind9!4929

5 years agoAdd kasp test policy goes straight to "none"
Matthijs Mekking [Mon, 26 Apr 2021 12:24:59 +0000 (14:24 +0200)] 
Add kasp test policy goes straight to "none"

Add a test case when a dnssec-policy is reconfigured to "none",
without setting it to "insecure" first. This is unsupported behavior,
but we want to make sure the behavior is somewhat expected. The
zone should remain signed (but will go bogus once the signatures
expire).

5 years agoRelease notes and changes for [#2645]
Matthijs Mekking [Wed, 21 Apr 2021 14:48:24 +0000 (16:48 +0200)] 
Release notes and changes for [#2645]

The feature "going insecure gracefully" has been changed.

5 years agoUpdate documentation with "insecure" policy
Matthijs Mekking [Wed, 21 Apr 2021 14:39:28 +0000 (16:39 +0200)] 
Update documentation with "insecure" policy

Update the ARM to mention the new built-in "insecure" policy.  Update
the DNSSEC guide recipe "Revert to unsigned" to add the additional
step of reconfiguring the zone to "insecure" (instead of immediately
set it to "none").

5 years agoAdd test for "insecure" policy
Matthijs Mekking [Wed, 21 Apr 2021 14:37:17 +0000 (16:37 +0200)] 
Add test for "insecure" policy

While it is meant to be used for transitioning a zone to insecure,
add a test case where a zone uses the "insecure" policy immediately.

The zone will go through DNSSEC maintenance, but the outcome should
be the same as 'dnssec-policy none;', that is the zone should be
unsigned.

5 years agoUpdate kasp tests to "insecure" policy
Matthijs Mekking [Wed, 21 Apr 2021 14:33:04 +0000 (16:33 +0200)] 
Update kasp tests to "insecure" policy

The tests for going insecure should be changed to use the built-in
"insecure" policy.

The function that checks dnssec status output should again check
for the special case "none".

5 years agoAdd built-in dnssec-policy "insecure"
Matthijs Mekking [Wed, 21 Apr 2021 14:09:06 +0000 (16:09 +0200)] 
Add built-in dnssec-policy "insecure"

Add a new built-in policy "insecure", to be used to gracefully unsign
a zone. Previously you could just remove the 'dnssec-policy'
configuration from your zone statement, or remove it.

The built-in policy "none" (or not configured) now actually means
no DNSSEC maintenance for the corresponding zone. So if you
immediately reconfigure your zone from whatever policy to "none",
your zone will temporarily be seen as bogus by validating resolvers.

This means we can remove the functions 'dns_zone_use_kasp()' and
'dns_zone_secure_to_insecure()' again. We also no longer have to
check for the existence of key state files to figure out if a zone
is transitioning to insecure.

5 years agoMerge branch '2668-handle-net-dns-versions-that-don-t-support-nsec3param' into 'main'
Mark Andrews [Fri, 30 Apr 2021 06:25:39 +0000 (06:25 +0000)] 
Merge branch '2668-handle-net-dns-versions-that-don-t-support-nsec3param' into 'main'

Resolve "Handle Net::DNS versions that don't support NSEC3PARAM"

Closes #2668

See merge request isc-projects/bind9!4971

5 years agoNSEC3PARAM support was added to Net::DNS in 1.00_06
Mark Andrews [Fri, 30 Apr 2021 02:48:37 +0000 (12:48 +1000)] 
NSEC3PARAM support was added to Net::DNS in 1.00_06

Require 1.01 or later to when adding a NSEC3PARAM records.

5 years agoMerge branch '2658-update-zonemd-now-that-rfc-8976-has-been-issued' into 'main'
Mark Andrews [Fri, 30 Apr 2021 01:08:46 +0000 (01:08 +0000)] 
Merge branch '2658-update-zonemd-now-that-rfc-8976-has-been-issued' into 'main'

Resolve "Update ZONEMD now that RFC 8976 has been issued."

Closes #2658

See merge request isc-projects/bind9!4946

5 years agoUpdate ZONEMD to match RFC 8976
Mark Andrews [Wed, 28 Apr 2021 02:05:02 +0000 (12:05 +1000)] 
Update ZONEMD to match RFC 8976

* The location of the digest type field has changed to where the
  reserved field was.
* The reserved field is now called scheme and is where the digest
  type field was.
* Digest type 2 has been defined (SHA256).

5 years agoMerge branch 'mnowak/configure-with-enable-dnstap-by-default' into 'main'
Michal Nowak [Thu, 29 Apr 2021 13:58:33 +0000 (13:58 +0000)] 
Merge branch 'mnowak/configure-with-enable-dnstap-by-default' into 'main'

Configure with --enable-dnstap by default

See merge request isc-projects/bind9!4618

5 years agoSuppress TSAN errors from libfstrm.so
Michal Nowak [Wed, 10 Feb 2021 13:21:08 +0000 (14:21 +0100)] 
Suppress TSAN errors from libfstrm.so

dnstap_test produces TSAN errors which originate in libfstrm.so. Unless
libfstrm is TSAN clean or a workaround is placed in libfstrm sources,
suppressing TSAN coming from libfstrm is necessary to test DNSTAP under
TSAN.

5 years agoConfigure with --enable-dnstap by default
Michal Nowak [Tue, 26 Jan 2021 16:57:34 +0000 (17:57 +0100)] 
Configure with --enable-dnstap by default

All platforms but OpenBSD have dnstap dependencies readily in their
respective repositories, and dnstap thus can be tested there. Given that
majority of images have dnstap dependencies available, it seems fitting
to make dnstap enabled by default.

5 years agoMerge branch 'mnowak/disable-pytest-cacheprovider-plugin' into 'main'
Michal Nowak [Thu, 29 Apr 2021 13:43:10 +0000 (13:43 +0000)] 
Merge branch 'mnowak/disable-pytest-cacheprovider-plugin' into 'main'

Disable pytest cacheprovider plugin in CI

See merge request isc-projects/bind9!4961

5 years agoDisable pytest cacheprovider plugin in CI
Michal Nowak [Thu, 29 Apr 2021 09:19:13 +0000 (11:19 +0200)] 
Disable pytest cacheprovider plugin in CI

The pytest "cacheprovider" plugin produces a .cache/v/cache/lastfailed
file, which holds a Python dictionary structure with failed tests.
However, on Ubuntu 16.04 (Xenial) the file is created even though the
test passed and the file contains just an empty dictionary ("{}").

Given that we are not interested in this feature, disabling the
"cacheprovider" plugin globally and removing per-test removals of the
.cache directory seems like the best course of action.

5 years agoMerge branch '2445-nsec3-iterations-resolver' into 'main'
Matthijs Mekking [Thu, 29 Apr 2021 13:09:30 +0000 (13:09 +0000)] 
Merge branch '2445-nsec3-iterations-resolver' into 'main'

Resolve "NSEC3 iterations"

Closes #2445

See merge request isc-projects/bind9!4957

5 years agoAdd release note for [GL #2445]
Mark Andrews [Wed, 21 Apr 2021 03:28:16 +0000 (13:28 +1000)] 
Add release note for [GL #2445]

5 years agoAdd CHANGES for [GL #2445]
Mark Andrews [Wed, 21 Apr 2021 03:27:23 +0000 (13:27 +1000)] 
Add CHANGES for [GL #2445]

5 years agoCheck insecure responses returned with too many NSEC3 iterations
Mark Andrews [Wed, 17 Feb 2021 05:33:49 +0000 (16:33 +1100)] 
Check insecure responses returned with too many NSEC3 iterations

5 years agoMark DNSSEC responses with NSEC3 records that exceed 150 as insecure
Mark Andrews [Wed, 17 Feb 2021 05:33:49 +0000 (16:33 +1100)] 
Mark DNSSEC responses with NSEC3 records that exceed 150 as insecure

5 years agoMerge branch '2372-add-hyperlink-to-gl-xxxx-labels-in-documentation' into 'main'
Michał Kępień [Thu, 29 Apr 2021 11:35:33 +0000 (11:35 +0000)] 
Merge branch '2372-add-hyperlink-to-gl-xxxx-labels-in-documentation' into 'main'

Resolve "Add hyperlink to [GL XXXX] labels in documentation"

Closes #2372

See merge request isc-projects/bind9!4563

5 years agoUpdate Danger check for GitLab references
Michal Nowak [Thu, 29 Apr 2021 11:24:21 +0000 (13:24 +0200)] 
Update Danger check for GitLab references

Release notes now employ a custom :gl: Sphinx role for linking to GitLab
issues/MRs.  Tweak the relevant Danger checks to account for that.

5 years agoAdd a Sphinx role for linking GitLab issues/MRs
Michał Kępień [Thu, 29 Apr 2021 11:24:21 +0000 (13:24 +0200)] 
Add a Sphinx role for linking GitLab issues/MRs

Define a :gl: Sphinx role that takes a GitLab issue/MR number as an
argument and creates a hyperlink to the relevant ISC GitLab URL.  This
makes it easy to reach ISC GitLab pages directly from the release notes.

Make all GitLab references in the release notes use the new Sphinx role.

5 years agoMake use of the :rfc: role in the ARM consistent
Michal Nowak [Thu, 29 Apr 2021 11:24:21 +0000 (13:24 +0200)] 
Make use of the :rfc: role in the ARM consistent

Make sure all RFC references in the ARM use the stock :rfc: Sphinx role.

5 years agoMerge branch 'ondrej/use-sigabrt-from-start.pl' into 'main'
Ondřej Surý [Thu, 29 Apr 2021 10:44:26 +0000 (10:44 +0000)] 
Merge branch 'ondrej/use-sigabrt-from-start.pl' into 'main'

Use SIGABRT instead of SIGKILL to produce cores on failed start

See merge request isc-projects/bind9!4928

5 years agoUse SIGABRT instead of SIGKILL to produce cores on failed start
Ondřej Surý [Wed, 21 Apr 2021 13:39:14 +0000 (15:39 +0200)] 
Use SIGABRT instead of SIGKILL to produce cores on failed start

When the `named` would hang on startup it would be killed with SIGKILL
leaving us with no information about the state the process was in.
This commit changes the start.pl script to send SIGABRT instead, so we
can properly collect and process the coredump from the hung named
process.

5 years agoMerge branch 'matthijs-follow-up-2642-nsec3-iter-kasp' into 'main'
Matthijs Mekking [Thu, 29 Apr 2021 09:32:20 +0000 (09:32 +0000)] 
Merge branch 'matthijs-follow-up-2642-nsec3-iter-kasp' into 'main'

dnssec-policy: reduce NSEC3 iterations to 150

See merge request isc-projects/bind9!4952

5 years agodnssec-policy: reduce NSEC3 iterations to 150
Matthijs Mekking [Thu, 29 Apr 2021 07:54:51 +0000 (09:54 +0200)] 
dnssec-policy: reduce NSEC3 iterations to 150

When reducing the number of NSEC3 iterations to 150, commit
aa26cde2aea459d682f6f609a7c902ef9a7a35eb added tests for dnssec-policy
to check that a too high iteration count is a configuration failure.

The test is not sufficient because 151 was always too high for
ECDSAP256SHA256. The test should check for a different algorithm.

There was an existing test case that checks for NSEC3 iterations.
Update the test with the new maximum values.

Update the code in 'kaspconf.c' to allow at most 150 iterations.

5 years agoMerge branch 'v9_17_12-release' into 'main'
Michał Kępień [Thu, 29 Apr 2021 08:37:11 +0000 (08:37 +0000)] 
Merge branch 'v9_17_12-release' into 'main'

Merge 9.17.12 release branch

See merge request isc-projects/bind9!4953

5 years agoSet up release notes for BIND 9.17.13
Michał Kępień [Thu, 29 Apr 2021 08:30:00 +0000 (10:30 +0200)] 
Set up release notes for BIND 9.17.13

5 years agoUpdate BIND version to 9.17.12
Michał Kępień [Mon, 12 Apr 2021 10:31:49 +0000 (12:31 +0200)] 
Update BIND version to 9.17.12

5 years agoAdd a CHANGES marker
Michał Kępień [Mon, 12 Apr 2021 10:31:49 +0000 (12:31 +0200)] 
Add a CHANGES marker

5 years agoMerge branch 'michal/prepare-documentation-for-bind-9.17.12' into 'security-main'
Michał Kępień [Mon, 12 Apr 2021 10:29:15 +0000 (10:29 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.17.12' into 'security-main'

Prepare documentation for BIND 9.17.12

See merge request isc-private/bind9!280

5 years agoMerge branch '2540-confidential-issue-existing-dname' into 'security-main'
Michał Kępień [Mon, 12 Apr 2021 10:13:39 +0000 (10:13 +0000)] 
Merge branch '2540-confidential-issue-existing-dname' into 'security-main'

[CVE-2021-25215] Properly answer queries for DNAME records that require the DNAME to be processed to resolve itself

See merge request isc-private/bind9!253

5 years agoPrepare release notes for BIND 9.17.12
Michał Kępień [Mon, 12 Apr 2021 10:15:45 +0000 (12:15 +0200)] 
Prepare release notes for BIND 9.17.12

5 years agoMerge branch '2467-confidential-issue-ixfr-checks' into 'security-main'
Michał Kępień [Mon, 12 Apr 2021 10:08:35 +0000 (10:08 +0000)] 
Merge branch '2467-confidential-issue-ixfr-checks' into 'security-main'

[CVE-2021-25214] Prevent malformed incoming zone transfers from producing a zone without an SOA record

See merge request isc-private/bind9!239

5 years agoAdd Release Notes entry for [GL #2540]
Mark Andrews [Mon, 1 Mar 2021 05:08:21 +0000 (16:08 +1100)] 
Add Release Notes entry for [GL #2540]

5 years agoAdd release note for GL #2490
Michał Kępień [Mon, 12 Apr 2021 10:15:45 +0000 (12:15 +0200)] 
Add release note for GL #2490

5 years agoAdd release note for [GL #2467]
Mark Andrews [Wed, 3 Feb 2021 00:21:16 +0000 (11:21 +1100)] 
Add release note for [GL #2467]

5 years agoAdd CHANGES entry for [GL #2540]
Mark Andrews [Mon, 1 Mar 2021 05:09:39 +0000 (16:09 +1100)] 
Add CHANGES entry for [GL #2540]

5 years agoReorder release notes
Michał Kępień [Mon, 12 Apr 2021 10:15:45 +0000 (12:15 +0200)] 
Reorder release notes

5 years agoAdd CHANGES entry for [GL #2467]
Mark Andrews [Wed, 3 Feb 2021 00:19:43 +0000 (11:19 +1100)] 
Add CHANGES entry for [GL #2467]

5 years agoHandle DNAME lookup via itself
Mark Andrews [Mon, 1 Mar 2021 05:46:07 +0000 (16:46 +1100)] 
Handle DNAME lookup via itself

When answering a query, named should never attempt to add the same RRset
to the ANSWER section more than once.  However, such a situation may
arise when chasing DNAME records: one of the DNAME records placed in the
ANSWER section may turn out to be the final answer to a client query,
but there is no way to know that in advance.  Tweak the relevant INSIST
assertion in query_respond() so that it handles this case properly.
qctx->rdataset is freed later anyway, so there is no need to clean it up
in query_respond().

5 years agoTweak and reword release notes
Michał Kępień [Mon, 12 Apr 2021 10:15:45 +0000 (12:15 +0200)] 
Tweak and reword release notes

5 years agoUnload a zone if a transfer breaks its SOA record
Mark Andrews [Thu, 25 Feb 2021 03:11:05 +0000 (14:11 +1100)] 
Unload a zone if a transfer breaks its SOA record

If a zone transfer results in a zone not having any NS records, named
stops serving it because such a zone is broken.  Do the same if an
incoming zone transfer results in a zone lacking an SOA record at the
apex or containing more than one SOA record.

5 years agoTweak and reword recent CHANGES entries
Michał Kępień [Mon, 12 Apr 2021 10:15:45 +0000 (12:15 +0200)] 
Tweak and reword recent CHANGES entries

5 years agoAddress inconsistencies in checking added RRsets
Mark Andrews [Fri, 12 Feb 2021 03:51:28 +0000 (14:51 +1100)] 
Address inconsistencies in checking added RRsets

loading_addrdataset() rejects SOA RRsets which are not at top of zone.
addrdataset() should similarly reject such RRsets.

5 years agoCheck SOA owner names in zone transfers
Mark Andrews [Wed, 3 Feb 2021 00:10:20 +0000 (11:10 +1100)] 
Check SOA owner names in zone transfers

An IXFR containing SOA records with owner names different than the
transferred zone's origin can result in named serving a version of that
zone without an SOA record at the apex.  This causes a RUNTIME_CHECK
assertion failure the next time such a zone is refreshed.  Fix by
immediately rejecting a zone transfer (either an incremental or
non-incremental one) upon detecting an SOA record not placed at the apex
of the transferred zone.

5 years agoMerge branch '2642-reduce-the-maximum-nsec3-iterations-that-can-be-configured' into...
Mark Andrews [Thu, 29 Apr 2021 07:39:10 +0000 (07:39 +0000)] 
Merge branch '2642-reduce-the-maximum-nsec3-iterations-that-can-be-configured' into 'main'

Resolve "Reduce the maximum NSEC3 iterations that can be configured"

Closes #2642

See merge request isc-projects/bind9!4925

5 years agoAdd Release Note for [GL #2642]
Mark Andrews [Wed, 21 Apr 2021 01:45:56 +0000 (11:45 +1000)] 
Add Release Note for [GL #2642]

5 years agoAdd CHANGES for [GL #2642]
Mark Andrews [Wed, 21 Apr 2021 01:43:47 +0000 (11:43 +1000)] 
Add CHANGES for [GL #2642]

5625.   [func]          Reduce the supported maximum number of iterations
                        that can be configured in an NSEC3 zones to 150.
                        [GL #2642]

5 years agoCheck that excessive iterations in logged by named when
Mark Andrews [Wed, 17 Feb 2021 05:33:49 +0000 (16:33 +1100)] 
Check that excessive iterations in logged by named when

loading an existing zone or transfering from the primary.

5 years agoCheck NSEC3 iterations with dnssec-signzone
Mark Andrews [Fri, 23 Apr 2021 01:46:31 +0000 (11:46 +1000)] 
Check NSEC3 iterations with dnssec-signzone

5 years agoCheck that named rejects excessive iterations via UPDATE
Mark Andrews [Fri, 23 Apr 2021 00:28:06 +0000 (10:28 +1000)] 
Check that named rejects excessive iterations via UPDATE

5 years agonsupdate: reject attempts to add NSEC3PARAM with excessive iterations
Mark Andrews [Fri, 23 Apr 2021 00:03:53 +0000 (10:03 +1000)] 
nsupdate: reject attempts to add NSEC3PARAM with excessive iterations

5 years agoWarn if there is excessive NSEC3 iterations
Mark Andrews [Fri, 23 Apr 2021 04:23:00 +0000 (14:23 +1000)] 
Warn if there is excessive NSEC3 iterations

5 years agoCheck dnssec-policy nsec3param iterations limit
Mark Andrews [Wed, 21 Apr 2021 01:57:46 +0000 (11:57 +1000)] 
Check dnssec-policy nsec3param iterations limit

5 years agoReduce nsec3 max iterations to 150
Mark Andrews [Mon, 19 Apr 2021 06:32:54 +0000 (16:32 +1000)] 
Reduce nsec3 max iterations to 150

5 years agoMerge branch 'matthijs-nit-serve-stale-fixes' into 'main'
Matthijs Mekking [Wed, 28 Apr 2021 10:43:49 +0000 (10:43 +0000)] 
Merge branch 'matthijs-nit-serve-stale-fixes' into 'main'

Serve-stale nit fixes

See merge request isc-projects/bind9!4940

5 years agoServe-stale nit fixes
Matthijs Mekking [Mon, 26 Apr 2021 07:19:25 +0000 (09:19 +0200)] 
Serve-stale nit fixes

While working on the serve-stale backports, I noticed the following
oddities:

1. In the serve-stale system test, in one case we keep track of the
   time how long it took for dig to complete. In commit
   aaed7f9d8c2465790d769221dfe8378c7147f5eb, the code removed the
   exception to check for result == ISC_R_SUCCESS on stale found
   answers, and adjusted the test accordingly. This failed to update
   the time tracking accordingly. Move the t1/t2 time track variables
   back around the two dig commands to ensure the lookups resolved
   faster than the resolver-query-timeout.

2. We can remove the setting of NS_QUERYATTR_STALEOK and
   DNS_RDATASETATTR_STALE_ADDED on the "else if (stale_timeout)"
   code path, because they are added later when we know we have
   actually found a stale answer on a stale timeout lookup.

3. We should clear the NS_QUERYATTR_STALEOK flag from the client
   query attributes instead of DNS_RDATASETATTR_STALE_ADDED (that
   flag is set on the rdataset attributes).

4. In 'bin/named/config.c' we should set the configuration options
   in alpabetical order.

5. In the ARM, in the backports we have added "(stale)" between
   "cached" and "RRset" to make more clear a stale RRset may be
   returned in this scenario.

5 years agoMerge branch 'michal/limit-logging-for-verbose-system-tests' into 'main'
Michał Kępień [Wed, 28 Apr 2021 06:58:34 +0000 (06:58 +0000)] 
Merge branch 'michal/limit-logging-for-verbose-system-tests' into 'main'

Limit logging for verbose system tests

See merge request isc-projects/bind9!4812

5 years agoWarn when log files grow too big in system tests
Michał Kępień [Wed, 28 Apr 2021 05:56:47 +0000 (07:56 +0200)] 
Warn when log files grow too big in system tests

Exerting excessive I/O load on the host running system tests should be
avoided in order to limit the number of false positives reported by the
system test suite.  In some cases, running named with "-d 99" (which is
the default for system tests) results in a massive amount of logs being
generated, most of which are useless.  Implement a log file size check
to draw developers' attention to overly verbose named instances used in
system tests.  The warning threshold of 200,000 lines was chosen
arbitrarily.

5 years agoPrevent useless logging in the "tcp" system test
Michał Kępień [Wed, 28 Apr 2021 05:56:47 +0000 (07:56 +0200)] 
Prevent useless logging in the "tcp" system test

The regression test for CVE-2020-8620 causes a lot of useless messages
to be logged.  However, globally decreasing the log level for the
affected named instance would be a step too far as debugging information
may be useful for troubleshooting other checks in the "tcp" system test.
Starting a separate named instance for a single check should be avoided
when possible and thus is also not a good solution.  As a compromise,
run "rndc trace 1" for the affected named instance before starting the
regression test for CVE-2020-8620.

5 years agoLimit logging for verbose system tests
Michał Kępień [Wed, 28 Apr 2021 05:56:47 +0000 (07:56 +0200)] 
Limit logging for verbose system tests

The system test framework starts all named instances with the "-d 99"
command line option (unless it is overridden by a named.args file in a
given instance's working directory).  This causes a lot of log messages
to be written to named.run files - currently over 5 million lines for a
single test suite run.  While debugging information preserved in the log
files is essential for troubleshooting intermittent test failures, some
system tests involve sending hundreds or even thousands of queries,
which causes the relevant log files to explode in size.  When multiple
tests (or even multiple test suites) are run in parallel, excessive
logging contributes considerably to the I/O load on the test host,
increasing the odds of intermittent test failures getting triggered.

Decrease the debug level for the seven most verbose named instances:

  - use "-d 3" for ns2 in the "cacheclean" system test (it is the lowest
    logging level at which the test still passes without the need to
    apply any changes to tests.sh),

  - use "-d 1" for the other six named instances.

This roughly halves the number of lines logged by each test suite run
while still leaving enough information in the logs to allow at least
basic troubleshooting in case of test failures.

This approach was chosen as it results in a greater decrease in the
number of lines logged than running all named instances with "-d 3",
without causing any test failures.

5 years agoMerge branch '2529-add-__attribute__-malloc-for-isc_mempool_get' into 'main'
Diego dos Santos Fronza [Mon, 26 Apr 2021 14:50:15 +0000 (14:50 +0000)] 
Merge branch '2529-add-__attribute__-malloc-for-isc_mempool_get' into 'main'

Resolve "Add __attribute__((malloc)) for isc_mempool_get"

Closes #2529

See merge request isc-projects/bind9!4858

5 years agoAdd malloc attribute to memory allocation functions
Diego Fronza [Thu, 1 Apr 2021 20:03:59 +0000 (17:03 -0300)] 
Add malloc attribute to memory allocation functions

The malloc attribute allows compiler to do some optmizations on
functions that behave like malloc/calloc, like assuming that the
returned pointer do not alias other pointers.

5 years agoRemoved unnecessary check (mpctx->items == NULL)
Diego Fronza [Thu, 1 Apr 2021 19:48:16 +0000 (16:48 -0300)] 
Removed unnecessary check (mpctx->items == NULL)

There is no possibility for mpctx->items to be NULL at the point where
the code was removed, since we enforce that fillcount > 0, if
mpctx->items == NULL when isc_mempool_get is called, then we will
allocate fillcount more items and add to the mpctx->items list.

5 years agoMerge branch '2564-nslookup-segfaults-for-servfail' into 'main'
Diego dos Santos Fronza [Mon, 26 Apr 2021 14:30:46 +0000 (14:30 +0000)] 
Merge branch '2564-nslookup-segfaults-for-servfail' into 'main'

Add workaround for "nslookup segfaults for SERVFAIL"

See merge request isc-projects/bind9!4796

5 years agoAdd CHANGES note for [GL #2564]
Mark Andrews [Thu, 11 Mar 2021 03:37:19 +0000 (14:37 +1100)] 
Add CHANGES note for [GL #2564]

5 years agoFix following up lookup failure if more resolvers are available
Diego Fronza [Mon, 29 Mar 2021 17:04:12 +0000 (14:04 -0300)] 
Fix following up lookup failure if more resolvers are available

_query_detach function was incorrectly unliking the query object from
the lookup->q query list, this made it impossible to follow a query
lookup failure with the next one in the list (possibly using a separate
resolver), as the link to the next query in the list was dissolved.

Fix by unliking the node only when the query object is about to be
destroyed, i.e. there is no more references to the object.

5 years agoMerge branch '2650-handle-soa-rrsigs-not-at-zone-apex' into 'main'
Michał Kępień [Mon, 26 Apr 2021 11:06:00 +0000 (11:06 +0000)] 
Merge branch '2650-handle-soa-rrsigs-not-at-zone-apex' into 'main'

Handle RRSIG(SOA) RRsets not at zone apex

Closes #2650

See merge request isc-projects/bind9!4936

5 years agoMerge branch '2628-kasp-create-multiple-key-keyid-conflict' into 'main'
Matthijs Mekking [Mon, 26 Apr 2021 09:29:19 +0000 (09:29 +0000)] 
Merge branch '2628-kasp-create-multiple-key-keyid-conflict' into 'main'

Check for keyid conflicts between new keys

Closes #2628

See merge request isc-projects/bind9!4886

5 years agoChanges and release notes for [#2628]
Matthijs Mekking [Mon, 12 Apr 2021 14:25:49 +0000 (16:25 +0200)] 
Changes and release notes for [#2628]

5 years agoCheck for keyid conflicts between new keys
Matthijs Mekking [Mon, 12 Apr 2021 14:22:00 +0000 (16:22 +0200)] 
Check for keyid conflicts between new keys

When the keymgr needs to create new keys, it is possible it needs to
create multiple keys. The keymgr checks for keyid conflicts with
already existing keys, but it should also check against that it just
created.

5 years agoMerge branch '2634-test-tkey-gssapi-credential-conditionally' into 'main'
Michał Kępień [Mon, 26 Apr 2021 07:17:12 +0000 (07:17 +0000)] 
Merge branch '2634-test-tkey-gssapi-credential-conditionally' into 'main'

Test "tkey-gssapi-credential" conditionally

Closes #2634

See merge request isc-projects/bind9!4938

5 years agoTest "--without-gssapi" in GitLab CI
Michał Kępień [Mon, 26 Apr 2021 05:16:38 +0000 (07:16 +0200)] 
Test "--without-gssapi" in GitLab CI

GitLab CI pipelines do not currently include a Linux job that would have
GSSAPI support disabled.  Add the "--without-gssapi" option to the
./configure invocation on Debian 9 to address that deficiency and also
to continuously test that build-time switch.

5 years agoTest "tkey-gssapi-credential" conditionally
Michał Kępień [Mon, 26 Apr 2021 05:16:38 +0000 (07:16 +0200)] 
Test "tkey-gssapi-credential" conditionally

If "tkey-gssapi-credential" is set in the configuration and GSSAPI
support is not available, named will refuse to start.  As the test
system framework does not support starting named instances
conditionally, ensure that "tkey-gssapi-credential" is only present in
named.conf if GSSAPI support is available.

5 years agoMerge branch 'marka-shutdown-sync' into 'main'
Mark Andrews [Sat, 24 Apr 2021 04:36:45 +0000 (04:36 +0000)] 
Merge branch 'marka-shutdown-sync' into 'main'

shutdown: wait for named to start

See merge request isc-projects/bind9!4921

5 years agoWait for named to start
Mark Andrews [Tue, 20 Apr 2021 04:56:07 +0000 (14:56 +1000)] 
Wait for named to start

If we don't wait for named to finish starting, 'rndc stop' may
fail due to the listen limit being reached in named leading
to a false negative test

5 years agoMerge branch 'each-timeout-recovery' into 'main'
Evan Hunt [Fri, 23 Apr 2021 17:26:05 +0000 (17:26 +0000)] 
Merge branch 'each-timeout-recovery' into 'main'

ensure read timeouts are recoverable

See merge request isc-projects/bind9!4930

5 years agoUse a constant for timeouts in soft-timeout tests
Artem Boldariev [Thu, 22 Apr 2021 10:29:34 +0000 (13:29 +0300)] 
Use a constant for timeouts in soft-timeout tests

It makes it easier to change the value should the need arise.

5 years agouse the correct handle when calling the read callback
Evan Hunt [Thu, 22 Apr 2021 00:35:07 +0000 (17:35 -0700)] 
use the correct handle when calling the read callback

when calling isc_nm_read() on an HTTP socket, the read callback
was being run with the incorrect handle. this has been corrected.

5 years agofix DOH timeout recovery
Evan Hunt [Wed, 21 Apr 2021 19:03:10 +0000 (12:03 -0700)] 
fix DOH timeout recovery

as with TLS, the destruction of a client stream on failed read
needs to be conditional: if we reached failed_read_cb() as a
result of a timeout on a timer which has subsequently been
reset, the stream must not be closed.

5 years agoAdd CHANGES entry
Michał Kępień [Fri, 23 Apr 2021 12:26:48 +0000 (14:26 +0200)] 
Add CHANGES entry