Commit Graph

35831 Commits

Author SHA1 Message Date
Michał Kępień
0deec48487 Merge tag 'v9_18_2' into v9_18
BIND 9.18.2
2022-04-21 09:44:56 +02:00
Tony Finch
05c88b18da Merge branch '3275-notify-test-fix-v9_18' into 'v9_18'
Avoid timeouts in the notify system test (backport to 9.18)

See merge request isc-projects/bind9!6143
2022-04-20 17:12:36 +00:00
Tony Finch
037223211c Use wait_for_log_re in the autosign system test
Fix another occurrence of the mistake of passing a regex to
wait_for_log by using the new wait_for_log_re instead.

(cherry picked from commit f4c2909353)
2022-04-20 17:51:40 +01:00
Tony Finch
19cf15313c Avoid timeouts in the notify system test
There were two problems in the notify system test when it waited for
log messages to appear: the shellcheck refactoring introduced a call
to `wait_for_log` with a regex, but `wait_for_log` only supports fixed
strings, so it always ran for the full 45 second timeout; and the new
test to ensure that notify messages time out failed to reset the
nextpart pointer, so if the notify messages timed out before the test
ran, it would fail to see them.

This change adds a `wait_for_log_re` helper that matches a regex, and
uses it where appropriate in the notify system test, which stops the
test from waiting longer than necessary; and it resets the nextpart
pointer so that the notify timeout test works reliably.

Closes #3275

(cherry picked from commit 4a30733ae5)
2022-04-20 17:51:40 +01:00
Mark Andrews
e618bdd2df Merge branch '3279-lib-dns-ncache-c-rdataset_settrust-fails-to-set-trust-on-called-rdataset-v9_18' into 'v9_18'
Check that pending negative cache entries for DS can be used successfully

See merge request isc-projects/bind9!6135
2022-04-19 00:05:39 +00:00
Mark Andrews
b66e00f73a Add CHANGES entry for [GL #3279]
(cherry picked from commit 14ca6270d3)
2022-04-19 09:44:09 +10:00
Mark Andrews
40bfb70d6a Update the rdataset->trust field in ncache.c:rdataset_settrust
Both the trust recorded in the slab stucture and the trust on
rdataset need to be updated.

(cherry picked from commit d043a41499)
2022-04-19 09:44:09 +10:00
Mark Andrews
b597ea863e Check that pending negative cache entries for DS can be used successfully
Prime the cache with a negative cache DS entry then make a query for
name beneath that entry. This will cause the DS entry to be retieved
as part of the validation process.  Each RRset in the ncache entry
will be validated and the trust level for each will be updated.

(cherry picked from commit d2d9910da2)
2022-04-19 09:44:09 +10:00
Evan Hunt
230b2b8c56 Merge branch '3235-dig-exitcode-v9_18' into 'v9_18'
ensure dig sets exitcode after local UDP connection failure

See merge request isc-projects/bind9!6134
2022-04-15 18:10:08 +00:00
Evan Hunt
5739f13063 CHANGES for [GL #3235]
(cherry picked from commit d646aca282)
2022-04-15 11:08:46 -07:00
Evan Hunt
50dc4f1587 ensure dig sets exitcode after local UDP connection failure
dig previously set an exit code of 9 when a TCP connection failed
or when a UDP connection timed out, but when the server address is
localhost it's possible for a UDP query to fail with ISC_R_CONNREFUSED.
that code path didn't update the exit code, causing dig to exit with
status 0. we now set the exit code to 9 in this failure case.

(cherry picked from commit 4eee6460ff)
2022-04-15 11:08:46 -07:00
Arаm Sаrgsyаn
94d2d349d2 Merge branch '3223-catz-change-of-ownership-aka-coo-support-v9_18' into 'v9_18'
[v9_18] [3/5] Implement catalog zones change of ownership (coo) support

See merge request isc-projects/bind9!6133
2022-04-14 22:48:48 +00:00
Aram Sargsyan
546732546f Do not use REQUIRE in dns_catz_entry_detach() after other code
The REQUIRE checks should be at the top of the function before
any assignments or code.

Move the REQUIRE check to the top.

(cherry picked from commit 99d1ec6c4b)
2022-04-14 20:53:59 +00:00
Aram Sargsyan
5037aeb5d2 Replace CATZ_OPT_MASTERS with CATZ_OPT_PRIMARIES
Update the enum entry in the continued effort of replacing some
DNS terminology.

(cherry picked from commit 59c486391d)
2022-04-14 20:53:53 +00:00
Aram Sargsyan
c5d523d8e9 Add CHANGES note for [GL #3223]
(cherry picked from commit 1c33dbd27d)
2022-04-14 20:53:46 +00:00
Aram Sargsyan
c37a75df5d Implement catalog zones change of ownership (coo) support
Catalog zones change of ownership is special mechanism to facilitate
controlled migration of a member zone from one catalog to another.

It is implemented using catalog zones property named "coo" and is
documented in DNS catalog zones draft version 5 document.

Implement the feature using a new hash table in the catalog zone
structure, which holds the added "coo" properties for the catalog zone
(containing the target catalog zone's name), and the key for the hash
table being the member zone's name for which the "coo" property is being
created.

Change some log messages to have consistent zone name quoting types.

Update the ARM with change of ownership documentation and usage
examples.

Add tests which check newly the added features.

(cherry picked from commit bb837db4ee)
2022-04-14 20:53:31 +00:00
Arаm Sаrgsyаn
1a9dc2fcad Merge branch '3222-catz-options-new-syntax-based-on-custom-properties-v9_18' into 'v9_18'
[v9_18] [2/5] Implement catalog zones options new syntax based on custom properties

See merge request isc-projects/bind9!6132
2022-04-14 20:27:54 +00:00
Aram Sargsyan
581d7bece0 Do not cancel processing record datasets in catalog zone after an error
When there are multiple record datasets in a database node of a catalog
zone, and BIND encounters a soft error during processing of a dataset,
it breaks from the loop and doesn't process the other datasets in the
node.

There are cases when this is not desired. For example, the catalog zones
draft version 5 states that there must be a TXT RRset named
`version.$CATZ` with exactly one RR, but it doesn't set a limitation
on possible non-TXT RRsets named `version.$CATZ` existing alongside
with the TXT one. In case when one exists, we will get a processing
error and will not continue the loop to process the TXT RRset coming
next.

Remove the "break" statement to continue processing all record datasets.

(cherry picked from commit 0b2d5490cd)
2022-04-14 19:51:45 +00:00
Aram Sargsyan
d8e1f51a04 Process the 'version' record of the catalog zone first
When processing a new or updated catalog zone, the record datasets
from the database are being processed in order. This creates a
problem because we need to know the version of the catalog zone
schema to process some of the records differently, but we do not
know the version until the 'version' record gets processed.

Find the 'version' record and process it first, only then iterate over
the database to process the rest, making sure not to process the
'version' record twice.

(cherry picked from commit 6035980bb1)
2022-04-14 19:51:37 +00:00
Aram Sargsyan
3e07e505b0 Add CHANGES note for [GL #3222]
(cherry picked from commit 321c93c05d)
2022-04-14 19:51:30 +00:00
Aram Sargsyan
f75c39811d Implement catalog zones options new syntax based on custom properties
According to DNS catalog zones draft version 5 document, catalog
zone custom properties must be placed under the "ext" label.

Make necessary changes to support the new custom properties syntax in
catalog zones with version "2" of the schema.

Change the default catalog zones schema version from "1" to "2" in
ARM to prepare for the new features and changes which come starting
from this commit in order to support the latest DNS catalog zones draft
document.

Make some restructuring in ARM and rename the term catalog zone "option"
to "custom property" to better reflect the terms used in the draft.

Change the version of 'catalog1.zone.' catalog zone in the "catz" system
test to "2", and leave the version of 'catalog2.zone.' catalog zone at
version "1" to test both versions.

Add tests to check that the new syntax works only with the new schema
version, and that the old syntax works only with the legacy schema
version catalog zones.

(cherry picked from commit cedfebc64a)
2022-04-14 19:51:22 +00:00
Arаm Sаrgsyаn
55dd09098f Merge branch '3144-dig-+trace-or-+nssearch-with-+tcp-always-crashes-v9_18' into 'v9_18'
[v9_18] Unify dig +nssearch next query starting code for TCP and UDP protocols

See merge request isc-projects/bind9!6130
2022-04-14 11:30:43 +00:00
Aram Sargsyan
c97b23a152 Add CHANGES note for [GL #3144]
(cherry picked from commit 2a9867d512)
2022-04-14 09:40:59 +00:00
Evan Hunt
7c0ef393d8 detach unfinished query when canceling
when a query was canceled while still in the process of connecting,
tcp_connected() and udp_ready() didn't detach the query object.

(cherry picked from commit 6bf8535542)
2022-04-14 09:40:50 +00:00
Aram Sargsyan
7683d6ce69 Unify dig +nssearch next query starting code for TCP and UDP protocols
In `+nssearch` mode `dig` starts the next query of the followup lookup
using `start_udp()` or `start_tcp()` calls without waiting for the
previous query to complete.

In UDP mode that happens in the `send_done()` callback of the previous
query, but in TCP mode that happens in the `start_tcp()` call of the
previous query (recursion) which doesn't work because `start_tcp()`
attaches the `lookup->current_query` to the query it is starting, so a
recursive call will result in an assertion failure.

Make the TCP mode to start the next query in `send_done()`, just like in
the UDP mode. During that time the `lookup->current_query` is already
detached by the `tcp_connected()`/`udp_ready()` callbacks.

(cherry picked from commit b944bf4120)
2022-04-14 09:40:37 +00:00
Matthijs Mekking
da30a638a2 Merge branch '2931-cds-delete-removed-on-signing-v9_18' into 'v9_18'
[v9_18] Don't delete CDS DELETE after zone sign

See merge request isc-projects/bind9!6126
2022-04-13 13:12:04 +00:00
Matthijs Mekking
bff9a568c8 Add CDS/CDNSKEY DELETE documentation
Mention in the DNSSEC guide in the "revert to unsigned" recipe that you
can publish CDS and CDNSKEY DELETE records to remove the corresponding
DS records from the parent zone.

(cherry picked from commit f088657eb1)
2022-04-13 14:44:25 +02:00
Matthijs Mekking
c678065eaa Add CHANGE and release note for #2931
Release note worthy.

(cherry picked from commit ebbcf4c34f)
2022-04-13 14:44:18 +02:00
Matthijs Mekking
c3ab09deb5 Update dns_dnssec_syncdelete() function
Update the function that synchronizes the CDS and CDNSKEY DELETE
records. It now allows for the possibility that the CDS DELETE record
is published and the CDNSKEY DELETE record is not, and vice versa.

Also update the code in zone.c how 'dns_dnssec_syncdelete()' is called.

With KASP, we still maintain the DELETE records our self. Otherwise,
we publish the CDS and CDNSKEY DELETE record only if they are added
to the zone. We do still check if these records can be signed by a KSK.

This change will allow users to add a CDS and/or CDNSKEY DELETE record
manually, without BIND removing them on the next zone sign.

Note that this commit removes the check whether the key is a KSK, this
check is redundant because this check is also made in
'dst_key_is_signing()' when the role is set to DST_BOOL_KSK.

(cherry picked from commit 3d05c99abb)
2022-04-13 14:43:40 +02:00
Matthijs Mekking
d975d07155 Test CDS DELETE persists after zone sign
Add a test case for a dynamically added CDS DELETE record and make
sure it is not removed when signing the zone. This happens because
BIND maintains CDS and CDNSKEY publishing and it will only allow
CDS DELETE records if the zone is transitioning to insecure. This is
a state that can be identified when using KASP through 'dnssec-policy',
but not when using 'auto-dnssec'.

(cherry picked from commit f08277f9fb)
2022-04-13 14:43:34 +02:00
Michał Kępień
4a622db88d Merge branch 'michal/fix-forward-system-test-requirements-v9_18' into 'v9_18'
[v9_18] Fix "forward" system test requirements

See merge request isc-projects/bind9!6123
2022-04-12 13:32:25 +00:00
Michał Kępień
80089f52e5 Fix "forward" system test requirements
Commit 3b3495a631 added a Python-based
name server (bin/tests/system/forward/ans11/ans.py) to the "forward"
system test, but did not update bin/tests/system/Makefile.am to ensure
Python is present in the test environment before the "forward" system
test is run.  Update bin/tests/system/Makefile.am to enforce that
requirement.

(cherry picked from commit 806f457147)
2022-04-12 15:30:31 +02:00
Michał Kępień
41ddf9ce8c Merge branch 'michal/set-up-release-notes-for-bind-9.18.3' into 'v9_18'
Set up release notes for BIND 9.18.3

See merge request isc-projects/bind9!6119
2022-04-12 12:15:07 +00:00
Michał Kępień
55221e61c0 Set up release notes for BIND 9.18.3 2022-04-12 14:13:32 +02:00
Michał Kępień
4360b7532c Merge branch 'michal/update-bind-version-to-9.18.3-dev' into 'v9_18'
Update BIND version to 9.18.3-dev

See merge request isc-projects/bind9!6115
2022-04-12 11:12:20 +00:00
Michał Kępień
09ffa6cdd2 Update BIND version to 9.18.3-dev 2022-04-12 13:11:12 +02:00
Michał Kępień
3babb1557a Update BIND version to 9.18.2 v9.18.2 2022-04-11 16:00:43 +02:00
Michał Kępień
f78abdc474 Add a CHANGES marker 2022-04-11 16:00:43 +02:00
Michał Kępień
1983c3a45a Merge branch 'michal/prepare-documentation-for-bind-9.18.2' into 'v9_18_2-release'
Prepare documentation for BIND 9.18.2

See merge request isc-private/bind9!397
2022-04-11 13:59:32 +00:00
Michał Kępień
4ec20be2ae Prepare release notes for BIND 9.18.2 2022-04-11 15:56:43 +02:00
Michał Kępień
b91083494e Add release note for miscellaneous dig fixes 2022-04-11 15:56:43 +02:00
Michał Kępień
a4cc916c5b Reorder release notes 2022-04-11 15:56:43 +02:00
Michał Kępień
5c0e3a1d8d Tweak and reword release notes 2022-04-11 15:56:43 +02:00
Michał Kępień
d0e094e81e Fix CHANGES marker location for BIND 9.17.22 2022-04-11 15:56:43 +02:00
Michal Nowak
cb17d68ae7 Merge branch '3129-test-check-fetch-shutting-down-in-resume_dslookup-v9_18' into 'v9_18'
[v9_18] [CVE-2022-0667] Add a hung fetch check while chasing DS in the forward system test

See merge request isc-projects/bind9!6110
2022-04-08 10:49:59 +00:00
Aram Sargsyan
db3ab0b46e Add a hung fetch check while chasing DS in the forward system test
Implement TCP support in the `ans11` Python-based DNS server.

Implement a control command channel in `ans11` to support an optional
silent mode of operation, which, when enabled, will ignore incoming
queries.

In the added check, make the `ans11` the NS server of
"a.root-servers.nil." for `ns3`, so it uses `ans11` (in silent mode)
for the regular (non-forwarded) name resolutions.

This will trigger the "hung fetch" scenario, which was causing `named`
to crash.

(cherry picked from commit 848094d6f7)
2022-04-08 12:19:04 +02:00
Petr Špaček
d9da0a55b9 Merge branch '2950-cache-acceptance-rules-test-v9_18' into 'v9_18'
[CVE-2021-25220] Add tests for forwarder cache poisoning scenarios [v9_18]

See merge request isc-projects/bind9!6105
2022-04-07 18:00:03 +00:00
Mark Andrews
3b3495a631 Add tests for forwarder cache poisoning scenarios
- Check that an NS in an authority section returned from a forwarder
  which is above the name in a configured "forward first" or "forward
  only" zone (i.e., net/NS in a response from a forwarder configured for
  local.net) is not cached.
- Test that a DNAME for a parent domain will not be cached when sent
  in a response from a forwarder configured to answer for a child.
- Check that glue is rejected if its name falls below that of zone
  configured locally.
- Check that an extra out-of-bailiwick data in the answer section is
  not cached (this was already working correctly, but was not explicitly
  tested before).

(cherry picked from commit bf3fffff67)
2022-04-07 19:30:43 +02:00
Michal Nowak
4f44fe804d Merge branch '3112-test-lingering-tcp-sockets-in-closewait-v9_18' into 'v9_18'
[v9_18] Add system test lingering CLOSE_WAIT TCP sockets

See merge request isc-projects/bind9!6103
2022-04-07 16:44:16 +00:00
Ondřej Surý
f1d1594e0a Add system test **/named.* modifier files to .reuse/dep5
There's couple of files that modify behaviour of named when started via
bin/tests/system/start.pl.  Add those files as CC-1.0 to .reuse/dep5 as
they are just empty placeholders.

(cherry picked from commit b6eb31a0e3)
2022-04-07 18:07:14 +02:00