Commit Graph

40425 Commits

Author SHA1 Message Date
Mark Andrews
ecd1f4a2b8 Merge branch '4488-memory-reference-leak-in-lib-dns-zone-c-zone_sign' into 'main'
Resolve "Memory/reference leak in lib/dns/zone.c:zone_sign"

Closes #4488

See merge request isc-projects/bind9!8570
2023-12-20 23:02:50 +00:00
Mark Andrews
4e4200ee2e Add CHANGES note for [GL #4488] 2023-12-21 09:19:22 +11:00
Mark Andrews
a3d0476d17 Don't look for KSK status here and squash memory leak
Just remove the key from  consideration as it is being removed.

The old code could leak a key reference as dst_free_key was not
called every time we continued. This simplification will address
this as well.
2023-12-21 09:18:45 +11:00
Mark Andrews
31560dce1a Merge branch '4310-require-when-changing-primaries-list' into 'main'
Resolve "REQUIRE when changing primaries list."

Closes #4310

See merge request isc-projects/bind9!8546
2023-12-20 21:50:26 +00:00
Mark Andrews
4714c65a90 Add CHANGES note for [GL #4310] 2023-12-21 08:12:43 +11:00
Mark Andrews
6ccb93884d dns_request_cancel needs to be callable from any thread
Check the tid and cancel the request immediately or pass it to the
appropriate loop for processing.  Call request->cb directly from
req_sendevent as it is now always called with the correct tid.
2023-12-21 08:11:59 +11:00
Tom Krizek
62284b4053 Merge branch 'tkrizek/update-sphinx_rtd_theme' into 'main'
Update sphinx_rtd_theme and docutils

See merge request isc-projects/bind9!8603
2023-12-20 17:01:45 +00:00
Tom Krizek
4156fa09d9 Update sphinx_rtd_theme and docutils 2023-12-20 18:00:58 +01:00
Michał Kępień
c04d87f13c Merge branch '4496-do-not-destroy-ixfr-journal-in-xfrin_end' into 'main'
Do not destroy IXFR journal in xfrin_end()

Closes #4496

See merge request isc-projects/bind9!8602
2023-12-20 16:32:04 +00:00
Michał Kępień
80695e9897 Add CHANGES entry for GL #4496 2023-12-20 17:21:14 +01:00
Michał Kępień
efcba4dd23 Do not destroy IXFR journal in xfrin_end()
The xfrin_end() function is run when a zone transfer is finished or
canceled.  One of the actions it takes for incremental transfers (IXFR)
is calling dns_journal_destroy() on the zone journal structure that is
stored in the relevant zone transfer context (xfr->ixfr.journal).  That
immediately invalidates that structure as it is not reference-counted.
However, since the changes present in the IXFR stream are applied to the
journal asynchronously (via isc_work_enqueue()), it is possible that
some zone changes may still be in the process of being written to the
journal by the time xfrin_end() destroys the relevant structure.  Such a
scenario leads to crashes.

Fix by not destroying the zone journal structure until the entire zone
transfer context is destroyed.  xfrin_destroy() already conditionally
calls dns_journal_destroy() and when the former is called, all
asynchronous work for a given zone transfer process is guaranteed to be
complete.
2023-12-20 17:21:14 +01:00
Tom Krizek
1349733fbc Merge tag 'v9.19.19' 2023-12-20 15:59:22 +01:00
Matthijs Mekking
f249418240 Merge branch '4423-revert' into 'main'
Revert "Remove kasp mutex lock"

See merge request isc-projects/bind9!8597
2023-12-20 08:32:00 +00:00
Matthijs Mekking
6722ae9103 Revert "Add release note and CHANGES for #4423"
This reverts commit 7af2ec7e4f.
2023-12-20 08:30:44 +00:00
Matthijs Mekking
16f2c811e3 Revert "Remove kasp mutex lock"
This reverts commit 634c80ea12.
2023-12-20 08:30:44 +00:00
Mark Andrews
3f35475ab6 Merge branch '4498-gl-4495-followup-regression-test-was-too-strict' into 'main'
Resolve "[GL #4494] followup: regression test was too strict"

Closes #4498

See merge request isc-projects/bind9!8590
2023-12-19 22:48:51 +00:00
Mark Andrews
80a4dff986 The NSEC3 -> NSEC private record may be added later
Check each delta for the NSEC3 -> NSEC private record addition
as it may be added in the second delta.
2023-12-19 22:05:59 +00:00
Mark Andrews
e1111c5681 Merge branch '4439-add-async-restart-handle' into 'main'
Resolve "segfault in resolver when serving UDP clients"

Closes #4439

See merge request isc-projects/bind9!8594
2023-12-19 16:34:53 +00:00
Mark Andrews
5c02089bcf Add CHANGES note for [GL #4439] 2023-12-20 02:51:54 +11:00
Mark Andrews
7ab4e1537a Obtain a client->handle reference when calling async_restart
otherwise client may be freed before async_restart is called.
2023-12-20 02:50:48 +11:00
Mark Andrews
6a2ebd4f10 Merge branch '4500-log-the-change-that-generated-not-exact-when-applying-a-diff' into 'main'
Resolve "Log the change that generated "not exact" when applying a diff."

Closes #4500

See merge request isc-projects/bind9!8591
2023-12-19 15:37:45 +00:00
Mark Andrews
71d67b6fdf Add CHANGES entry for [GL #4500] 2023-12-20 01:57:25 +11:00
Mark Andrews
c896e07277 Log what change generated a 'not exact' error 2023-12-20 01:56:38 +11:00
Matthijs Mekking
e05e3a3448 Merge branch '4423-kasp-rwlock' into 'main'
Remove kasp mutex lock

Closes #4423

See merge request isc-projects/bind9!8571
2023-12-19 14:54:21 +00:00
Matthijs Mekking
7af2ec7e4f Add release note and CHANGES for #4423 2023-12-19 14:53:51 +01:00
Matthijs Mekking
634c80ea12 Remove kasp mutex lock
Multiple zones should be able to read the same key and signing policy
at the same time. Since writing the kasp lock only happens during
reconfiguration, and the complete kasp list is being replaced, there
is actually no need for a lock. Reference counting ensures that a kasp
structure is not destroyed when still being attached to one or more
zones.

This significantly improves the load configuration time.
2023-12-19 14:53:51 +01:00
Matthijs Mekking
034990a978 Merge branch '4234-placeholder' into 'main'
Add CHANGES placeholder for [GL #4234]

See merge request isc-projects/bind9!8592
2023-12-19 08:38:00 +00:00
Matthijs Mekking
8788c72bc3 Add CHANGES placeholder for [GL #4234] 2023-12-19 09:34:56 +01:00
Mark Andrews
b1cd22c483 Merge branch '4494-add_sigs-was-using-the-wrong-time-in-kasp-mode' into 'main'
Resolve "add_sigs was using the wrong time in  kasp mode"

Closes #4494

See merge request isc-projects/bind9!8577
2023-12-19 01:02:07 +00:00
Mark Andrews
94b00f44ae Add CHANGES note for [GL #4494] 2023-12-19 11:22:17 +11:00
Mark Andrews
bdb42d3838 Regression check for missing RRSIGs
When transitioning from NSEC3 to NSEC the added records where not
being signed because the wrong time was being used to determine if
a key should be used or not.  Check that these records are actually
signed.
2023-12-19 11:21:46 +11:00
Mark Andrews
6066e41948 Use 'now' rather than 'inception' in 'add_sigs'
When kasp support was added 'inception' was used as a proxy for
'now' and resulted in signatures not being generated or the wrong
signatures being generated.  'inception' is the time to be set
in the signatures being generated and is usually in the past to
allow for clock skew.  'now' determines what keys are to be used
for signing.
2023-12-19 11:21:46 +11:00
Mark Andrews
5e2392aec2 Merge branch '4402-use-our-instance-of-bind-keys' into 'main'
Resolve "Change system tests to not use dnssec-validation auto"

Closes #4402

See merge request isc-projects/bind9!8511
2023-12-19 00:19:07 +00:00
Tom Krizek
66d6394057 Turn off dnssec validation in inline test
DNSSEC validation isn't required by the inline test and would send
queries to root name servers.
2023-12-18 23:46:03 +00:00
Mark Andrews
15a433cb9d Stop sending queries to the internet's root servers
Disable automatic dnssec validation.
2023-12-18 23:46:03 +00:00
Mark Andrews
4e16bbce15 Use custom bindkeys-file in tests
Ensure the test doesn't use the system's bind.keys file by using the
bindkeys-file statement.
2023-12-18 23:46:03 +00:00
Mark Andrews
de812433f5 Merge branch '4138-dig-in-9-19-13-crashes-when-cancelling-with-ctrl-c-a-pending-query-to-to-a-not-reachable-tcp' into 'main'
Resolve "dig in 9.19.13 crashes, when cancelling (with CTRL+C) a pending query to to a not reachable TCP port"

Closes #4138

See merge request isc-projects/bind9!8554
2023-12-18 23:31:00 +00:00
Mark Andrews
06e565944b Add CHANGES not for [GL #4138] 2023-12-19 09:44:05 +11:00
Mark Andrews
ae24792ea2 Handle ISC_R_SHUTTINGDOWN in dighost.c:tcp_connected
dig was making further queries after SIGINT was recieved rather
than shutting down as expected.
2023-12-19 09:43:15 +11:00
Michał Kępień
270c51f328 Merge branch '4497-trust-anchor-telemetry-is-no-longer-experimental' into 'main'
"trust-anchor-telemetry" is no longer experimental

Closes #4497

See merge request isc-projects/bind9!8585
2023-12-18 14:12:22 +00:00
Michał Kępień
693fee4836 Add CHANGES entry for GL #4497 2023-12-18 15:11:39 +01:00
Michał Kępień
b1baf7af3a "trust-anchor-telemetry" is no longer experimental
Remove the CFG_CLAUSEFLAG_EXPERIMENTAL flag from the
"trust-anchor-telemetry" statement as the behavior of the latter has not
been changed since its initial implementation and there are currently no
plans to do so.  This silences a relevant log message that was emitted
even when the feature was explicitly disabled.
2023-12-18 15:11:39 +01:00
Michał Kępień
67a58784b7 Merge branch '4213-fix-reference-counting-in-do_nsfetch' into 'main'
Fix reference counting in do_nsfetch()

Closes #4213

See merge request isc-projects/bind9!8580
2023-12-18 10:35:20 +00:00
Michał Kępień
2a3b6d1406 Fix reference counting in do_nsfetch()
Each function queuing a do_nsfetch() call using isc_async_run() is
expected to increase the given zone's internal reference count
(zone->irefs), which is then correspondingly decreased in either
do_nsfetch() itself (when the dns_resolver_createfetch() fails) or in
nsfetch_done() (when recursion is finished).

However, do_nsfetch() can also return early if either the zone itself or
the relevant view's resolver object is being shut down.  In that case,
do_nsfetch() simply returns without decreasing the internal reference
count for the zone.  This leaves a dangling zone reference around, which
leads to hangs during named shutdown.

Fix by executing the same cleanup code for early returns from
do_nsfetch() as for a failed dns_resolver_createfetch() call in that
function as the reference count will not be decreased in nsfetch_done()
in any of these cases.
2023-12-18 11:33:43 +01:00
Michał Kępień
e0096df669 Merge branch '4060-prevent-an-infinite-loop-in-shutdown_listener' into 'main'
Prevent an infinite loop in shutdown_listener()

Closes #4060

See merge request isc-projects/bind9!8581
2023-12-18 10:07:35 +00:00
Michał Kępień
2d75c96874 Prevent an infinite loop in shutdown_listener()
The loop in shutdown_listener() assumes that the reference count for
every controlconnection_t object on the listener->connections linked
list will drop down to zero after the conn_shutdown() call in the loop's
body.  However, when the timing is just right, some netmgr callbacks for
a given control connection may still be awaiting processing by the same
event loop that executes shutdown_listener() when the latter is run.
Since these netmgr callbacks must be run in order for the reference
count for the relevant controlconnection_t objects to drop to zero, when
the scenario described above happens, shutdown_listener() runs into an
infinite loop due to one of the controlconnection_t objects on the
listener->connections linked list never going away from the head of that
list.

Fix by safely iterating through the listener->connections list and
initiating shutdown for all controlconnection_t objects found.  This
allows any pending netmgr callbacks to be run by the same event loop in
due course, i.e. after shutdown_listener() returns.
2023-12-18 11:07:04 +01:00
Arаm Sаrgsyаn
755b76aa63 Merge branch '4477-tests-statschannel-loadtime-bugfix' into 'main'
Resolve "statschannel test intermittently fails with incorrect zone loadtime"

Closes #4477

See merge request isc-projects/bind9!8569
2023-12-18 09:33:16 +00:00
Aram Sargsyan
4e94ff2541 Fix a statschannel system test zone loadtime issue
The check_loaded() function compares the zone's loadtime value and
an expected loadtime value, which is based on the zone file's mtime
extracted from the filesystem.

For the secondary zones there may be cases, when the zone file isn't
ready yet before the zone transfer is complete and the zone file is
dumped to the disk, so a so zero value mtime is retrieved.

In such cases wait one second and retry until timeout. Also modify
the affected check to allow a possible difference of the same amount
of seconds as the chosen timeout value.
2023-12-18 08:46:31 +00:00
Arаm Sаrgsyаn
ced40c48a4 Merge branch '4493-data-race-in-xfrin_send_request' into 'main'
Resolve "ThreadSanitizer: data race xfrin.c:1555:2 in xfrin_send_request"

Closes #4493

See merge request isc-projects/bind9!8579
2023-12-18 08:44:33 +00:00
Aram Sargsyan
2179224573 Add a CHANGES note for [GL #4493] 2023-12-15 09:56:44 +00:00