Commit Graph

35940 Commits

Author SHA1 Message Date
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
Matthijs Mekking
b9ebde705b Add system test lingering CLOSE_WAIT TCP sockets
Add a test case to check for lingering TCP sockets stuck in the
CLOSE_WAIT state. This can happen if a client sends some garbage after
its first query.

The system test runs the reproducer script and then sends another TCP
query to the resolver. The resolver is configured to allow one TCP
client only. If BIND has its TCP socket stuck in CLOSE_WAIT, it does
not have the resources available to answer the second query.

Note: A better test would be to check if the named daemon does not
have a TCP socket stuck in CLOSE_WAIT for example with netstat. When
running this test locally you can examine named with netstat manually.
But since netstat is platform specific it is not a good candidate to do
this as a system test.

If you, if you could return, don't let it burn.
Do you have to let it linger?
- Cranberries
2022-04-07 17:02:48 +02:00
Michał Kępień
180f77dd9c Merge branch '3208-add-CHANGES-entry' into 'main'
Add CHANGES entry for GL #3208

Closes #3208

See merge request isc-projects/bind9!6099
2022-04-07 13:05:37 +00:00
Michał Kępień
059a602551 Add CHANGES entry for GL #3208 2022-04-07 15:01:16 +02:00
Petr Špaček
aa3a4a72f2 Merge branch 'pspacek/junit-report' into 'main'
Generate JUnit reports for unit & system tests

See merge request isc-projects/bind9!6088
2022-04-06 19:15:19 +00:00
Petr Špaček
d26d4f289f Generate JUnit reports for unit & system tests
This allows Gitlab to show nice summary for individual tests/test
directories and to expose the results in Gitlab API for consumption
elsewhere.

A catch: As of Gitlab 14.7.7, the detailed results are stored
only in artifacts and thus expire. All consumers (including API) need
to be "fast enough" to get the data before they disappear.
This also forces us to always store the artifacts intead of storing them
only on failure.
2022-04-06 21:14:38 +02:00
Tony Finch
f25e38b67e Merge branch '3242-notify-notimeout' into 'main'
Ensure that zone maintenance queries have a retry limit

Closes #3242

See merge request isc-projects/bind9!6051
2022-04-06 17:15:45 +00:00
Tony Finch
71ce8b0a51 Ensure that dns_request_createvia() has a retry limit
There are a couple of problems with dns_request_createvia(): a UDP
retry count of zero means unlimited retries (it should mean no
retries), and the overall request timeout is not enforced. The
combination of these bugs means that requests can be retried forever.

This change alters calls to dns_request_createvia() to avoid the
infinite retry bug by providing an explicit retry count. Previously,
the calls specified infinite retries and relied on the limit implied
by the overall request timeout and the UDP timeout (which did not work
because the overall timeout is not enforced). The `udpretries`
argument is also changed to be the number of retries; previously, zero
was interpreted as infinity because of an underflow to UINT_MAX, which
appeared to be a mistake. And `mdig` is updated to match the change in
retry accounting.

The bug could be triggered by zone maintenance queries, including
NOTIFY messages, DS parental checks, refresh SOA queries and stub zone
nameserver lookups. It could also occur with `nsupdate -r 0`.
(But `mdig` had its own code to avoid the bug.)
2022-04-06 17:12:48 +01:00
Tony Finch
5867c1b727 Make notify test shellcheck clean
Use POSIX shell syntax, and use functions to reduce repetition.
2022-04-06 17:12:08 +01:00
Artem Boldariev
a671fb34f6 Merge branch 'artem-tls-ctx-refcount' into 'main'
Implement reference counting for TLS contexts, Resolve #3122 DoT stops working after "rndc reconfigure" when running named as non-root

Closes #3122

See merge request isc-projects/bind9!6087
2022-04-06 16:09:04 +00:00
Artem Boldariev
8bec4a6bf6 Extend the doth system test
This commit adds simple checks that the TLS contexts in question are
indeed being updated on DoT and DoH listeners.
2022-04-06 18:45:57 +03:00
Artem Boldariev
a100c1ff7c Update CHANGES [GL #3122]
Add an entry that reloading TLS certificates without destroying
underlying TCP listening sockets.
2022-04-06 18:45:57 +03:00
Artem Boldariev
77b2db8246 Replace listener TLS contexts on reconfiguration
This commit makes use of isc_nmsocket_set_tlsctx(). Now, instead of
recreating TLS-enabled listeners (including the underlying TCP
listener sockets), only the TLS context in use is replaced.
2022-04-06 18:45:57 +03:00