2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 04:58:04 +00:00

33814 Commits

Author SHA1 Message Date
Matthijs Mekking
636ff1e15c No longer need to strcmp for "none"
When we introduced "dnssec-policy insecure" we could have removed the
'strcmp' check for "none", because if it was set to "none", the 'kasp'
variable would have been set to NULL.
2021-05-05 11:23:53 +02:00
Matthijs Mekking
366ed047dd Changes and release notes for [#2596] 2021-05-05 11:14:35 +02:00
Matthijs Mekking
4a8ad0a77f Add kasp tests for offline keys
Add a test for default.kasp that if we remove the private key file,
no successor key is created for it. We need to update the kasp script
to deal with a missing private key. If this is the case, skip checks
for private key files.

Add a test with a zone for which the private key of the ZSK is missing.

Add a test with a zone for which the private key of the KSK is missing.
2021-05-05 11:14:02 +02:00
Matthijs Mekking
6a60bf637d Update smart signing when key is offline
BIND 9 is smart about when to sign with what key. If a key is offline,
BIND will delete the old signature anyway if there is another key to
sign the RRset with.

With KASP we don't want to fallback to the KSK if the ZSK is missing,
only for the SOA RRset. If the KSK is missing, but we do have a ZSK,
deleting the signature is fine. Otherwise it depends on if we use KASP
or not. Update the 'delsig_ok' function to reflect that.
2021-05-05 11:13:19 +02:00
Matthijs Mekking
3e6fc49c16 Don't roll offline keys
When checking the current DNSSEC state against the policy, consider
offline keys. If we didn't found an active key, check if the key is
offline by checking the public key list. If there is a match in the
public key list (the key data is retrieved from the .key and the
.state files), treat the key as offline and don't create a successor
key for it.
2021-05-05 11:13:19 +02:00
Matthijs Mekking
b3a5859a9b rndc dnssec -status should include offline keys
The rndc command 'dnssec -status' only considered keys from
'dns_dnssec_findmatchingkeys' which only includes keys with accessible
private keys. Change it so that offline keys are also listed in the
status.
2021-05-05 11:13:19 +02:00
Matthijs Mekking
7ed089576f Try to read state when reading keylist from rdata
The function 'dns_dnssec_keylistfromrdataset()' creates a keylist from
the DNSKEY RRset. If we attempt to read the private key, we also store
the key state. However, if the private key is offline, the key state
will not be stored. To fix this, first attempt to read the public key
file. If then reading the private key file fails, and we do have a
public key, add that to the keylist, with appropriate state. If we
also failed to read the public key file, add the DNSKEY to the keylist,
as we did before.
2021-05-05 11:13:19 +02:00
Matthijs Mekking
fa05c1b8da When reading public key from file, also read state
The 'dst_key_fromnamedfile()' function did not read and store the
key state from the .state file when reading a public key file.
2021-05-05 11:13:19 +02:00
Matthijs Mekking
cf17698f87 Fix a kasp lock issue
The kasp lock would stay locked if 'dns_keymgr_run' failed.
2021-05-05 11:13:19 +02:00
Mark Andrews
2be319b759 Merge branch '2678-named-checkconf-doesn-t-catch-redefinition-of-dnssec-policy-insecure' into 'main'
Resolve "named-checkconf doesn't catch redefinition of dnssec-policy insecure"

Closes #2678

See merge request isc-projects/bind9!4994
2021-05-05 07:03:12 +00:00
Mark Andrews
dba13d280a named-checkconf now detects redefinition of dnssec-policy 'insecure' 2021-05-05 16:23:19 +10:00
Mark Andrews
0f53872542 Merge branch '2536-inline-signing-documentation-doesn-t-match-reality' into 'main'
Resolve "inline-signing documentation doesn't match reality"

Closes #2536

See merge request isc-projects/bind9!4751
2021-05-05 00:17:40 +00:00
Matthijs Mekking
a548a450b3 checkconf tests for inline-signing at options/view 2021-05-04 23:35:59 +00:00
Mark Andrews
03978a7881 Add Release note for [GL #2536] 2021-05-04 23:35:59 +00:00
Mark Andrews
475a553e37 Add CHANGES note for [GL #2536] 2021-05-04 23:35:59 +00:00
Mark Andrews
b3301da262 inline-signing should have been in zone_only_clauses 2021-05-04 23:35:59 +00:00
Ondřej Surý
74d9a917eb Merge branch '2675-wrong-rfc-reference-in-name-c' into 'main'
Fix RFC292 -> RFC952 typo

Closes #2675

See merge request isc-projects/bind9!4990
2021-05-04 15:22:49 +00:00
Ondřej Surý
d2dba352cb Fix RFC292 -> RFC952 typo 2021-05-04 17:21:52 +02:00
Matthijs Mekking
38a422ed81 Merge branch '2624-kasp-test-failure-job-1630205' into 'main'
Fix intermittent kasp test failure

Closes #2624

See merge request isc-projects/bind9!4884
2021-05-04 08:24:43 +00:00
Matthijs Mekking
572f421df4 Fix intermittent kasp test failure
The kasp system test performs for each zone a couple of checks to make
sure the zone is signed correctly. To avoid test failures caused by
timing issues, there is first a check to ensure the zone is done
signing, 'wait_for_done_signing'. This function waits with the DNSSEC
checks until a "zone_rekey done" log message is seen for a specific
key.

Unfortunately this is not sufficient to avoid test failures due to
timing issues, because there is a small amount of time in between this
log message and the newly signed zone actually being served.

Therefore, in 'check_apex', retry for three seconds the DNSKEY query
check. After that, additional checks should pass without retries,
because at that point we know for sure the zone has been resigned with
the expected keys.

Also reduce the number of redundant 'check_signatures'
2021-05-04 04:50:01 +00:00
Mark Andrews
33fd1a8437 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
2021-05-04 02:37:51 +00:00
Mark Andrews
205d1bb762 Remove spurious $ and \ in addzone example 2021-05-04 02:18:34 +00:00
Ondřej Surý
44c6a69c9c Merge branch 'ondrej/add-backtrace-support-for-Windows' into 'main'
Add support for generating backtraces on Windows

See merge request isc-projects/bind9!4982
2021-05-03 18:40:30 +00:00
Ondřej Surý
dfd56b84f5 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
2021-05-03 20:31:52 +02:00
Ondřej Surý
c3ee539463 Merge branch 'ondrej/add-nanosleep-and-usleep-windows-shims' into 'main'
Add nanosleep and usleep Windows shims

See merge request isc-projects/bind9!4981
2021-05-03 18:25:55 +00:00
Ondřej Surý
c58dc55c82 Merge branch 'ondrej/replace-CreateThreads-with-isc_thread_create' into 'main'
Add trampoline around iocompletionport_createthreads()

See merge request isc-projects/bind9!4980
2021-05-03 18:24:06 +00:00
Ondřej Surý
37c0d196e3 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.
2021-05-03 20:22:54 +02:00
Ondřej Surý
c37ff5d188 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.
2021-05-03 20:22:54 +02:00
Ondřej Surý
cd54bbbd9a 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.
2021-05-03 20:21:15 +02:00
Diego dos Santos Fronza
9dedfcdda6 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
2021-05-03 17:03:44 +00:00
Diego Fronza
7729844150 Address comparison of integers with different signedess 2021-05-03 06:54:30 +00:00
Matthijs Mekking
7a3b6a7fb0 Merge branch 'matthijs-nsupdate-update_test' into 'main'
Update nsupdate test

See merge request isc-projects/bind9!4975
2021-04-30 12:26:12 +00:00
Matthijs Mekking
5b31811b5f 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.
2021-04-30 12:25:25 +00:00
Petr Špaček
9d04a731ba Merge branch 'pspacek/rtd-sphinx-fix' into 'main'
Fix ARM build on readthedocs.org

See merge request isc-projects/bind9!4968
2021-04-30 10:57:30 +00:00
Petr Špaček
7df913aa3a
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.
2021-04-30 12:56:56 +02:00
Matthijs Mekking
968b9b5697 Merge branch '2645-dnssec-polic-insecure' into 'main'
Add built-in dnssec-policy "insecure"

Closes #2645

See merge request isc-projects/bind9!4929
2021-04-30 10:10:32 +00:00
Matthijs Mekking
287428e0aa 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).
2021-04-30 11:20:41 +02:00
Matthijs Mekking
75024736a4 Release notes and changes for [#2645]
The feature "going insecure gracefully" has been changed.
2021-04-30 11:20:40 +02:00
Matthijs Mekking
fadc57d3d0 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").
2021-04-30 11:18:38 +02:00
Matthijs Mekking
9c6ff463fd 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.
2021-04-30 11:18:38 +02:00
Matthijs Mekking
17e3b056c8 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".
2021-04-30 11:18:38 +02:00
Matthijs Mekking
2710d9a11d 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.
2021-04-30 11:18:38 +02:00
Mark Andrews
1f4234ec89 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
2021-04-30 06:25:39 +00:00
Mark Andrews
044933756a NSEC3PARAM support was added to Net::DNS in 1.00_06
Require 1.01 or later to when adding a NSEC3PARAM records.
2021-04-30 15:59:30 +10:00
Mark Andrews
7b62af4e0e 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
2021-04-30 01:08:46 +00:00
Mark Andrews
8510ccaa54 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).
2021-04-30 10:43:37 +10:00
Michal Nowak
c922608333 Merge branch 'mnowak/configure-with-enable-dnstap-by-default' into 'main'
Configure with --enable-dnstap by default

See merge request isc-projects/bind9!4618
2021-04-29 13:58:33 +00:00
Michal Nowak
c97c6fbfea
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.
2021-04-29 15:57:07 +02:00
Michal Nowak
deff0ae317
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.
2021-04-29 15:57:07 +02:00
Michal Nowak
f11f7d0086 Merge branch 'mnowak/disable-pytest-cacheprovider-plugin' into 'main'
Disable pytest cacheprovider plugin in CI

See merge request isc-projects/bind9!4961
2021-04-29 13:43:10 +00:00