Commit Graph

33164 Commits

Author SHA1 Message Date
Mark Andrews
eded531bee Add CHANGES entry for [GL #2528]
(cherry picked from commit 7e54d8d2cb)
2021-05-13 16:01:51 +10:00
Mark Andrews
0ec28efe86 Check that the first and last SOA of an AXFR are consistent
(cherry picked from commit e86508708d)
2021-05-13 16:01:27 +10:00
Matthijs Mekking
43dbce7f0b Merge branch '2603-test-dnssec-policy-none-v9_16' into 'v9_16'
dnssec-policy check for duplicate writable file (9.16)

See merge request isc-projects/bind9!5000
2021-05-05 17:12:50 +00:00
Matthijs Mekking
72deed194d Use isdigit instead of checking character range
When looking for key files, we could use isdigit rather than checking
if the character is within the range [0-9].

Use (unsigned char) cast to ensure the value is representable in the
unsigned char type (as suggested by the isdigit manpage).

Change " & 0xff" occurrences to the recommended (unsigned char) type
cast.

(cherry picked from commit 1998ad6c776a9c17c27788b17765dee90d9e25df)
2021-05-05 18:23:53 +02:00
Matthijs Mekking
353161bd3c Changes and release notes for [#2603]
(cherry picked from commit 7663c17f3b3d2b1600a6864bec90bb045763a96a)
2021-05-05 18:23:51 +02:00
Matthijs Mekking
861b2a14bb Check for filename clashes /w dnssec-policy zones
Just like with dynamic and/or inline-signing zones, check if no two
or more zone configurations set the same filename. In these cases,
the zone files are not read-only and named-checkconf should catch
a configuration where multiple zone statements write to the same file.

Add some bad configuration tests where KASP zones reference the same
zone file.

Update the good-kasp test to allow for two zones configure the same
file name, dnssec-policy none.

(cherry picked from commit 0b5fc0afcfd1a0bb7c1f16b63872b7ee26fb2777)
2021-05-05 18:22:42 +02:00
Matthijs Mekking
f42234fef0 Check zonefile is untouched if dnssec-policy none
Make sure no DNSSEC contents are added to the zonefile if dnssec-policy
is set to "none" (and no .state files exist for the zone).

(cherry picked from commit 5246c16f43e6fda7587193a4dd801951cf87db14)
2021-05-05 18:22:32 +02:00
Mark Andrews
9bb1adb347 Merge branch '2670-always-set-rewrite-when-compacting-a-version-1-journal-v9_16' into 'v9_16'
Allow named-journalprint to compact journals at a given serial

See merge request isc-projects/bind9!4999
2021-05-05 13:52:52 +00:00
Mark Andrews
054c2c6490 Add release note for [GL #2670]
(cherry picked from commit a60b54e1df)
2021-05-05 23:36:06 +10:00
Mark Andrews
84dbaad15a Add CHANGES note for [GL #2670]
(cherry picked from commit 79da175a76)
2021-05-05 23:36:06 +10:00
Mark Andrews
966bcfb89d Check journal compaction
(cherry picked from commit ae1ae07b03)
2021-05-05 23:36:06 +10:00
Mark Andrews
c659fed6ad Always perform a re-write when processing a version 1 journal
version 1 journals may have a mix of type 1 and type 2 transaction
headers so always use the recovery code.

(cherry picked from commit 4a8e33b9f0)
2021-05-05 23:36:06 +10:00
Mark Andrews
f10645f21d Allow named-journalprint to compact journals at a given serial
(cherry picked from commit 71df4fb84c)
2021-05-05 23:36:06 +10:00
Matthijs Mekking
d15e4dbc6e Merge branch '2596-dnssec-policy-keys-inaccessiblev9_16' into 'v9_16'
Don't roll keys when private key is offline (9.16)

See merge request isc-projects/bind9!4998
2021-05-05 12:13:17 +00:00
Matthijs Mekking
68bdca4730 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.

(cherry picked from commit 636ff1e15c)
2021-05-05 12:54:05 +02:00
Matthijs Mekking
1d16443fde Changes and release notes for [#2596]
(cherry picked from commit 366ed047dd)
2021-05-05 12:54:05 +02:00
Matthijs Mekking
bc641fc965 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.

(cherry picked from commit 4a8ad0a77f)
2021-05-05 12:50:07 +02:00
Matthijs Mekking
23b85a4679 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.

(cherry picked from commit 6a60bf637d)
2021-05-05 12:50:00 +02:00
Matthijs Mekking
4e87664fef 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.

(cherry picked from commit 3e6fc49c16)
2021-05-05 12:49:49 +02:00
Matthijs Mekking
ff4930951c 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.

(cherry picked from commit b3a5859a9b)
2021-05-05 12:49:38 +02:00
Matthijs Mekking
ebb793bfd5 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.

(cherry picked from commit 7ed089576f)
2021-05-05 12:49:30 +02:00
Matthijs Mekking
87e90f27a8 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.

(cherry picked from commit fa05c1b8da)
2021-05-05 12:49:22 +02:00
Matthijs Mekking
03e90aa50a Fix a kasp lock issue
The kasp lock would stay locked if 'dns_keymgr_run' failed.

(cherry picked from commit cf17698f87)
2021-05-05 12:49:12 +02:00
Ondřej Surý
4c2c75a806 Merge branch '2671-change-default-for-max-ixfr-ratio-to-unlimited-on-bind-9-16' into 'v9_16'
Change the max-ixfr-ratio default value to unlimited

See merge request isc-projects/bind9!4993
2021-05-05 09:10:34 +00:00
Ondřej Surý
ce5f036cff Add CHANGES and release note for [GL #2671] 2021-05-05 10:24:42 +02:00
Ondřej Surý
8d92112de9 Change the max-ixfr-ratio default value to unlimited
When the feature was backported, we should have leave it disabled by
default, it turns out the default `100%` is producing some unexpected
results (under investigation), so for the time being, we are going to to
disable the max-ixfr-ratio.
2021-05-05 10:24:42 +02:00
Mark Andrews
059358c494 Merge branch '2678-named-checkconf-doesn-t-catch-redefinition-of-dnssec-policy-insecure-v9_16' into 'v9_16'
named-checkconf now detects redefinition of dnssec-policy 'insecure'

See merge request isc-projects/bind9!4995
2021-05-05 07:29:44 +00:00
Mark Andrews
cb77a8efed named-checkconf now detects redefinition of dnssec-policy 'insecure'
(cherry picked from commit dba13d280a)
2021-05-05 17:05:17 +10:00
Michal Nowak
7cc68a9def Merge branch 'mnowak/use-sigabrt-from-start.pl-v9_16' into 'v9_16'
[v9_16] Use SIGABRT instead of SIGKILL to produce cores on failed start

See merge request isc-projects/bind9!4991
2021-05-04 15:54:08 +00:00
Ondřej Surý
82c9e477a1 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.

(cherry picked from commit 861a236937)
2021-05-04 17:18:45 +02:00
Matthijs Mekking
d627c63f2d Merge branch '2624-kasp-test-failure-job-1630205-v9_16' into 'v9_16'
Fix intermittent kasp test failure

See merge request isc-projects/bind9!4986
2021-05-04 08:59:28 +00:00
Matthijs Mekking
cced7fdaf4 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'

(cherry picked from commit 572f421df4)
2021-05-04 10:25:25 +02:00
Mark Andrews
50a4b15835 Merge branch '2621-pull-request-to-fix-rdnc-addzone-doc-v9_16' into 'v9_16'
Remove spurious $ and \ in addzone example

See merge request isc-projects/bind9!4984
2021-05-04 03:02:45 +00:00
Mark Andrews
18f710c438 Remove spurious $ and \ in addzone example
(cherry picked from commit 205d1bb762)
2021-05-04 12:44:22 +10:00
Matthijs Mekking
733fb98cf4 Merge branch 'matthijs-nsupdate-update_test-v9_16' into 'v9_16'
Update nsupdate test (9.16)

See merge request isc-projects/bind9!4978
2021-04-30 14:28:42 +00:00
Matthijs Mekking
fd01889b8a 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.

(cherry picked from commit 5b31811b5f)
2021-04-30 14:28:30 +02:00
Matthijs Mekking
75277fc825 Merge branch '2645-dnssec-polic-insecure-v9_16' into 'v9_16'
Add built-in dnssec-policy "insecure"

See merge request isc-projects/bind9!4976
2021-04-30 12:02:22 +00:00
Matthijs Mekking
8db61e976a 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).

(cherry picked from commit 287428e0aa)
2021-04-30 13:58:22 +02:00
Matthijs Mekking
305fc213a0 Release notes and changes for [#2645]
The feature "going insecure gracefully" has been changed.

(cherry picked from commit 75024736a4)
2021-04-30 13:58:22 +02:00
Matthijs Mekking
3ce9e6424b 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").

(cherry picked from commit fadc57d3d0)
2021-04-30 13:58:22 +02:00
Matthijs Mekking
9f8af9a0e1 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.

(cherry picked from commit 9c6ff463fd)
2021-04-30 13:58:22 +02:00
Matthijs Mekking
e5ae856c6c 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".

(cherry picked from commit 17e3b056c8)
2021-04-30 13:58:22 +02:00
Matthijs Mekking
375112a623 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.

(cherry picked from commit 2710d9a11d)
2021-04-30 13:58:22 +02:00
Petr Špaček
fdf7be247d Merge branch 'pspacek/rtd-sphinx-fix-v9_16' into 'v9_16'
Fix ARM build on readthedocs.org

See merge request isc-projects/bind9!4977
2021-04-30 11:17:25 +00:00
Petr Špaček
28f104f1fd 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 13:02:22 +02:00
Matthijs Mekking
1df2c4a429 Merge branch '2445-nsec3-iterations-resolver-v9_16' into 'v9_16'
Mark DNSSEC responses with NSEC3 records that exceed 150 as insecure (9.16)

See merge request isc-projects/bind9!4962
2021-04-30 10:13:01 +00:00
Mark Andrews
205738f941 Add release note for [GL #2445]
(cherry picked from commit ad236976fc)
2021-04-30 11:17:01 +02:00
Mark Andrews
501008c510 Add CHANGES for [GL #2445]
(cherry picked from commit fd1f7b6480)
2021-04-30 11:17:00 +02:00
Mark Andrews
15111ab0db Check insecure responses returned with too many NSEC3 iterations
(cherry picked from commit e6e0e29fbb)
2021-04-30 11:16:45 +02:00
Mark Andrews
9170275738 Mark DNSSEC responses with NSEC3 records that exceed 150 as insecure
(cherry picked from commit af02bbcdd6)
2021-04-30 11:16:45 +02:00