2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00
Commit Graph

35952 Commits

Author SHA1 Message Date
Evan Hunt
76bb33fbd5 Merge branch '3235-dig-exitcode' into 'main'
ensure dig sets exitcode after local UDP connection failure

Closes #3235

See merge request isc-projects/bind9!6107
2022-04-15 18:08:10 +00:00
Evan Hunt
d646aca282 CHANGES for [GL #3235] 2022-04-15 10:32:45 -07:00
Evan Hunt
4eee6460ff 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.
2022-04-15 10:32:31 -07:00
Arаm Sаrgsyаn
9fb812763a Merge branch '3223-catz-change-of-ownership-aka-coo-support' into 'main'
[3/5] Implement catalog zones change of ownership (coo) support

Closes #3223

See merge request isc-projects/bind9!6013
2022-04-14 22:48:41 +00:00
Aram Sargsyan
99d1ec6c4b 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.
2022-04-14 20:41:52 +00:00
Aram Sargsyan
59c486391d Replace CATZ_OPT_MASTERS with CATZ_OPT_PRIMARIES
Update the enum entry in the continued effort of replacing some
DNS terminology.
2022-04-14 20:41:52 +00:00
Aram Sargsyan
1c33dbd27d Add CHANGES note for [GL #3223] 2022-04-14 20:41:52 +00:00
Aram Sargsyan
bb837db4ee 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.
2022-04-14 20:41:52 +00:00
Arаm Sаrgsyаn
e8ba18906b Merge branch '3222-catz-options-new-syntax-based-on-custom-properties' into 'main'
[2/5] Implement catalog zones options new syntax based on custom properties

Closes #3222

See merge request isc-projects/bind9!6012
2022-04-14 19:49:00 +00:00
Aram Sargsyan
0b2d5490cd 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.
2022-04-14 10:56:24 +00:00
Aram Sargsyan
6035980bb1 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.
2022-04-14 10:56:24 +00:00
Aram Sargsyan
321c93c05d Add CHANGES note for [GL #3222] 2022-04-14 10:56:23 +00:00
Aram Sargsyan
cedfebc64a 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.
2022-04-14 10:53:52 +00:00
Arаm Sаrgsyаn
99de681480 Merge branch '3144-dig-+trace-or-+nssearch-with-+tcp-always-crashes' into 'main'
Unify dig +nssearch next query starting code for TCP and UDP protocols

Closes #3144

See merge request isc-projects/bind9!6109
2022-04-14 10:46:16 +00:00
Aram Sargsyan
2a9867d512 Add CHANGES note for [GL #3144] 2022-04-14 09:35:59 +00:00
Evan Hunt
6bf8535542 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.
2022-04-14 09:34:40 +00:00
Aram Sargsyan
b944bf4120 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.
2022-04-14 09:34:40 +00:00
Matthijs Mekking
3a9c82f749 Merge branch '2931-cds-delete-removed-on-signing' into 'main'
Don't delete CDS DELETE after zone sign

Closes #2931

See merge request isc-projects/bind9!5706
2022-04-13 12:37:39 +00:00
Matthijs Mekking
f088657eb1 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.
2022-04-13 13:26:59 +02:00
Matthijs Mekking
ebbcf4c34f Add CHANGE and release note for #2931
Release note worthy.
2022-04-13 13:26:59 +02:00
Matthijs Mekking
3d05c99abb 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.
2022-04-13 13:26:59 +02:00
Matthijs Mekking
f08277f9fb 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'.
2022-04-13 13:26:59 +02:00
Michał Kępień
d8473d8152 Merge branch 'michal/fix-forward-system-test-requirements' into 'main'
Fix "forward" system test requirements

See merge request isc-projects/bind9!6117
2022-04-12 13:30:06 +00:00
Michał Kępień
806f457147 Fix "forward" system test requirements
Commit bf3fffff67 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.
2022-04-12 15:29:26 +02:00
Michał Kępień
aa99a554e4 Merge branch 'michal/set-up-release-notes-for-bind-9.19.1' into 'main'
Set up release notes for BIND 9.19.1

See merge request isc-projects/bind9!6118
2022-04-12 12:12:15 +00:00
Michał Kępień
058df60ee1 Set up release notes for BIND 9.19.1 2022-04-12 13:41:18 +02:00
Michał Kępień
6d8495f926 Merge branch 'michal/update-bind-version-to-9.19.1-dev' into 'main'
Update BIND version to 9.19.1-dev

See merge request isc-projects/bind9!6114
2022-04-12 11:10:32 +00:00
Michał Kępień
f7cf5603d0 Update BIND version to 9.19.1-dev 2022-04-12 11:15:13 +02:00
Evan Hunt
7f19cbbc90 Merge branch '3256-adb-crash' into 'main'
ADB entries could be unlinked too soon

Closes #3256

See merge request isc-projects/bind9!6113
2022-04-12 07:15:12 +00:00
Evan Hunt
06bf5f21d2 CHANGES for [GL #3256] 2022-04-11 17:32:55 -07:00
Evan Hunt
73ff8850bf ADB entries could be unlinked too soon
due to a typo in the code, ADB entries were unlinked from their entry
buckets during shutdown if they had a nonzero reference count. they
were only supposed to be unlinked if the reference count was exactly
one (that being the reference held by the bucket itself).
2022-04-11 17:29:03 -07:00
Michał Kępień
cab15392af Update BIND version to 9.19.0 v9.19.0 2022-04-11 10:08:24 +02:00
Michał Kępień
cee8e4bf9b Add a CHANGES marker 2022-04-11 10:08:24 +02:00
Michał Kępień
ddb46ecff5 Merge branch 'michal/prepare-documentation-for-bind-9.19.0' into 'v9_19_0-release'
Prepare documentation for BIND 9.19.0

See merge request isc-private/bind9!396
2022-04-11 08:06:22 +00:00
Michał Kępień
8ce52b94f4 Prepare release notes for BIND 9.19.0 2022-04-11 10:05:50 +02:00
Michał Kępień
d43ab7059a Reorder release notes 2022-04-11 10:05:50 +02:00
Michał Kępień
2a3088e18d Tweak and reword release notes 2022-04-11 10:05:50 +02:00
Michał Kępień
63467cc192 Update BIND 9 versions mentioned in release notes 2022-04-11 10:05:50 +02:00
Michał Kępień
e4f775d1b3 Remove release notes applying to BIND 9.18.x 2022-04-11 10:05:50 +02:00
Michał Kępień
6c0bf20ed8 Remove release notes for BIND 9.17.x 2022-04-11 10:05:50 +02:00
Michał Kępień
7cabfd618b Fix CHANGES marker location for BIND 9.17.22 2022-04-11 10:05:50 +02:00
Michał Kępień
8e0c402115 Update release checklist 2022-04-11 10:05:50 +02:00
Michal Nowak
6cdc4114cb Merge branch '3129-test-check-fetch-shutting-down-in-resume_dslookup' into 'main'
[CVE-2022-0667] Add reproducer

Closes #3129

See merge request isc-projects/bind9!6063
2022-04-08 10:15:26 +00:00
Aram Sargsyan
848094d6f7 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.
2022-04-08 10:27:26 +02:00
Petr Špaček
84914a0610 Merge branch '2950-cache-acceptance-rules-test' into 'main'
[CVE-2021-25220] Add tests for forwarder cache poisoning scenarios

Closes #2950

See merge request isc-projects/bind9!6062
2022-04-07 17:29:34 +00:00
Mark Andrews
bf3fffff67 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).
2022-04-07 18:43:23 +02:00
Ondřej Surý
0cc5d622f8 Merge branch '3226-fix-pools-cleaning-in-dns_zone' into 'main'
Don't destroy mctx and task pools until we are destroying zonemgr

Closes #3226

See merge request isc-projects/bind9!6102
2022-04-07 16:12:26 +00:00
Ondřej Surý
f981b52793 Don't destroy mctx and task pools until we are destroying zonemgr
The mctx, zonetask and loadtask pools were being destroyed in the
shutdown function where in theory a dangling zone could be still
attached to it.

Move the isc_mem_put() on the pools to the destroy() function.
2022-04-07 18:12:03 +02:00
Michal Nowak
e58d8f2acb Merge branch '3112-test-lingering-tcp-sockets-in-closewait' into 'main'
[CVE-2022-0396] Add system test lingering CLOSE_WAIT TCP sockets

Closes #3112

See merge request isc-projects/bind9!6046
2022-04-07 16:06:21 +00:00
Ondřej Surý
b6eb31a0e3 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.
2022-04-07 17:02:49 +02:00