]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
2 years agoclean up dns_rbt
Evan Hunt [Thu, 5 Oct 2023 01:14:55 +0000 (18:14 -0700)] 
clean up dns_rbt

- create_node() in rbt.c cannot fail
- the dns_rbt_*name() functions, which are wrappers around
  dns_rbt_[add|find|delete]node(), were never used except in tests.

this change isn't really necessary since RBT is likely to go away
eventually anyway. but keeping the API as simple as possible while it
persists is a good thing, and may reduce confusion while QPDB is being
developed from RBTDB code.

2 years agoMerge branch 'each-move-DNS_RBT_NSEC_-to-db.h' into 'main'
Evan Hunt [Wed, 14 Feb 2024 09:27:21 +0000 (09:27 +0000)] 
Merge branch 'each-move-DNS_RBT_NSEC_-to-db.h' into 'main'

move DNS_RBT_NSEC_* to db.h

See merge request isc-projects/bind9!8714

2 years agomove DNS_RBT_NSEC_* to db.h
Evan Hunt [Thu, 5 Oct 2023 00:49:51 +0000 (17:49 -0700)] 
move DNS_RBT_NSEC_* to db.h

these values pertain to whether a node is in the main, nsec, or nsec3
tree of an RBTDB. they need to be moved to a more generic location so
they can also be used by QPDB.

(this is in db.h rather than db_p.h because rbt.c needs access to it.
technically, that's a layer violation, but it's a long-existing one;
refactoring to get rid of it would be a large hassle, and eventually
we expect to remove rbt.c anyway.)

2 years agoMerge branch 'each-separate-generic-DB-helpers' into 'main'
Matthijs Mekking [Wed, 14 Feb 2024 08:46:05 +0000 (08:46 +0000)] 
Merge branch 'each-separate-generic-DB-helpers' into 'main'

separate generic DB helpers into db_p.h

See merge request isc-projects/bind9!8713

2 years agoAdd coccinelle rule to favor DNS_SIGTYPE
Matthijs Mekking [Tue, 13 Feb 2024 15:09:44 +0000 (16:09 +0100)] 
Add coccinelle rule to favor DNS_SIGTYPE

This should error if DNS_TYPEPAIR_VALUE(dns_rdatatype_rrsig, type) is
used.

2 years agoseparate generic DB helpers into db_p.h
Evan Hunt [Sun, 1 Oct 2023 08:06:49 +0000 (01:06 -0700)] 
separate generic DB helpers into db_p.h

when the QPDB is implemented, we will need to have both qpdb_p.h and
rbtdb_p.h. in order to prevent name collisions or code duplication,
this commit adds a generic private header file, db_p.h, containing
structures and macros that will be used by both databases.

some functions and structs have been renamed to more specifically refer
to the RBT database, in order to avoid namespace collision with similar
things that will be needed by the QPDB later.

2 years agoMerge branch 'each-refactor-wildcard-matching' into 'main'
Evan Hunt [Tue, 13 Feb 2024 22:48:39 +0000 (22:48 +0000)] 
Merge branch 'each-refactor-wildcard-matching' into 'main'

Refactor wildcard matching

See merge request isc-projects/bind9!8712

2 years agorefactor wildcard matching
Evan Hunt [Mon, 6 Nov 2023 16:02:49 +0000 (17:02 +0100)] 
refactor wildcard matching

refactor the wildcard matching code to make it a bit easier to
understand, in hopes that it will reduce the difficulty of converting
from RBTDB to QPDB later.

there are also some minor optimizations: previously, after stepping
backward to find the predecessor, we stepped back foward *from* the
predecessor to find the successor.  we now reset the rbtnode chain to
its original starting point before stepping forward; this eliminates
some unnecessary processing. and, if neither predecessor nor successor
is found, we return early rather than carrying on with an unnecessary
effort to match labels.

2 years agoMerge branch '4571-findnsec3proofs-failed-to-disassociate-all-rdatasets-returned...
Mark Andrews [Tue, 13 Feb 2024 13:06:32 +0000 (13:06 +0000)] 
Merge branch '4571-findnsec3proofs-failed-to-disassociate-all-rdatasets-returned-by-dns_ncache_current' into 'main'

Resolve "findnsec3proofs failed to disassociate all rdatasets returned by dns_ncache_current"

Closes #4571

See merge request isc-projects/bind9!8725

2 years agoAdd CHANGES note for [GL #4571]
Mark Andrews [Mon, 12 Feb 2024 07:51:21 +0000 (18:51 +1100)] 
Add CHANGES note for [GL #4571]

2 years agoDissassociate rdatasets returned from dns_ncache_current
Mark Andrews [Mon, 15 Jan 2024 02:39:44 +0000 (13:39 +1100)] 
Dissassociate rdatasets returned from dns_ncache_current

lib/dns/validator.c:findnsec3proofs failed to disassociate the
temporary rdataset returned by dns_ncache_current on all paths.

2 years agoMerge branch '4569-cid-486326-memory-corruptions-overrun' into 'main'
Mark Andrews [Tue, 13 Feb 2024 00:07:42 +0000 (00:07 +0000)] 
Merge branch '4569-cid-486326-memory-corruptions-overrun' into 'main'

Resolve "** CID 486326:  Memory - corruptions  (OVERRUN)"

Closes #4569

See merge request isc-projects/bind9!8723

2 years agoAddress CID 486326: Memory - corruptions (OVERRUN)
Mark Andrews [Mon, 12 Feb 2024 03:54:36 +0000 (14:54 +1100)] 
Address CID 486326: Memory - corruptions (OVERRUN)

Coverity detected that address->type.sa was too small when copying
a struct sockaddr_sin6, use the alterative union element
address->type.sin6 instead.

2 years agoMerge branch '4570-cid-486327-control-flow-issues-unreachable' into 'main'
Mark Andrews [Mon, 12 Feb 2024 21:59:12 +0000 (21:59 +0000)] 
Merge branch '4570-cid-486327-control-flow-issues-unreachable' into 'main'

Resolve "CID 486327:  Control flow issues  (UNREACHABLE)"

Closes #4570

See merge request isc-projects/bind9!8724

2 years agoRemove duplicate unreachable code block
Mark Andrews [Mon, 12 Feb 2024 04:13:55 +0000 (15:13 +1100)] 
Remove duplicate unreachable code block

This was accidentially left in during the developement of !8299.

2 years agoMerge branch '4568-fix-isc_ht-case-insensitive-matching' into 'main'
Ondřej Surý [Sun, 11 Feb 2024 08:55:52 +0000 (08:55 +0000)] 
Merge branch '4568-fix-isc_ht-case-insensitive-matching' into 'main'

Fix case insensitive matching in isc_ht hash table implementation

Closes #4568

See merge request isc-projects/bind9!8718

2 years agoAdd CHANGES note for [GL #4568]
Ondřej Surý [Sat, 10 Feb 2024 23:59:30 +0000 (00:59 +0100)] 
Add CHANGES note for [GL #4568]

2 years agoAdd a system test for mixed-case data for the same owner
Ondřej Surý [Sun, 11 Feb 2024 08:13:43 +0000 (09:13 +0100)] 
Add a system test for mixed-case data for the same owner

We were missing a test where a single owner name would have multiple
types with a different case.  The generated RRSIGs and NSEC records will
then have different case than the signed records and message parser have
to cope with that and treat everything as the same owner.

2 years agoFix case insensitive matching in isc_ht hash table implementation
Ondřej Surý [Sat, 10 Feb 2024 23:49:32 +0000 (00:49 +0100)] 
Fix case insensitive matching in isc_ht hash table implementation

The case insensitive matching in isc_ht was basically completely broken
as only the hashvalue computation was case insensitive, but the key
comparison was always case sensitive.

2 years agoMerge branch 'each-placeholder' into 'main'
Evan Hunt [Sun, 11 Feb 2024 07:21:08 +0000 (07:21 +0000)] 
Merge branch 'each-placeholder' into 'main'

add placeholder to CHANGES [GL #4567]

See merge request isc-projects/bind9!8720

2 years agoadd placeholder to CHANGES [GL #4567]
Evan Hunt [Sun, 11 Feb 2024 07:19:57 +0000 (23:19 -0800)] 
add placeholder to CHANGES [GL #4567]

2 years agoMerge branch '4491-use-rcu-instead-of-rwlock-in-isc_log-unit' into 'main'
Aydın Mercan [Fri, 9 Feb 2024 10:56:22 +0000 (10:56 +0000)] 
Merge branch '4491-use-rcu-instead-of-rwlock-in-isc_log-unit' into 'main'

Convert rwlock in isc_log_t to RCU

Closes #4491

See merge request isc-projects/bind9!8593

2 years agoConvert rwlock in isc_log_t to RCU
Aydın Mercan [Tue, 19 Dec 2023 07:41:15 +0000 (10:41 +0300)] 
Convert rwlock in isc_log_t to RCU

The isc_log_t contains a isc_logconfig_t that is swapped, dereferenced
or accessed its fields through a mutex. Instead of protecting it with a
rwlock, use RCU.

2 years agoMerge branch 'ondrej/add-placeholder' into 'main'
Ondřej Surý [Fri, 9 Feb 2024 09:02:01 +0000 (09:02 +0000)] 
Merge branch 'ondrej/add-placeholder' into 'main'

Add placeholder to CHANGES

See merge request isc-projects/bind9!8717

2 years agoAdd placeholder to CHANGES
Ondřej Surý [Fri, 9 Feb 2024 09:01:33 +0000 (10:01 +0100)] 
Add placeholder to CHANGES

2 years agoMerge branch '4549-heap-use-after-free-lib-isccc-ccmsg-c-160-in-ccmsg_senddone' into...
Ondřej Surý [Thu, 8 Feb 2024 17:34:46 +0000 (17:34 +0000)] 
Merge branch '4549-heap-use-after-free-lib-isccc-ccmsg-c-160-in-ccmsg_senddone' into 'main'

Resolve "heap-use-after-free lib/isccc/ccmsg.c:160 in ccmsg_senddone"

Closes #4549

See merge request isc-projects/bind9!8692

2 years agoAdd CHANGES note for [GL #4549]
Mark Andrews [Mon, 5 Feb 2024 07:15:59 +0000 (18:15 +1100)] 
Add CHANGES note for [GL #4549]

2 years agoFix UAF in ccmsg.c when reading stopped before sending
Ondřej Surý [Thu, 8 Feb 2024 11:31:09 +0000 (12:31 +0100)] 
Fix UAF in ccmsg.c when reading stopped before sending

When shutting down the whole server, the reading could stop and detach
from controlconnection before sending is done.  If send callback then
detaches from the last controlconnection handle, the ccmsg would be
invalidated after the send callback and thus we must not access ccmsg
after calling the send_cb().

2 years agoAdd isc_nm_read_stop() and remove .reading member from ccmsg
Ondřej Surý [Thu, 8 Feb 2024 11:31:09 +0000 (12:31 +0100)] 
Add isc_nm_read_stop() and remove .reading member from ccmsg

We need to stop reading when calling isc_ccmsg_disconnect() as the
reading handle doesn't have to be last because sending might be in
progress.  After that, we can safely remove .reading member because the
reading would not be called after the disconnect has been called.

The ccmsg_senddone() should also not call the recv callback if the
sending failed, that's the job of the caller's send callback - in fact
it already does that, so the code in ccmsg_senddone() was superfluous.

2 years agoRefactor the normal vs error path in control_senddone()
Ondřej Surý [Thu, 8 Feb 2024 11:31:09 +0000 (12:31 +0100)] 
Refactor the normal vs error path in control_senddone()

The code flow in control_senddone() was modified to be simpler to follow
and superfluous INSIST() was zapped from control_recvmessage().

2 years agoMerge branch 'ondrej/reduce-netmgr-memory-usage' into 'main'
Ondřej Surý [Thu, 8 Feb 2024 14:45:25 +0000 (14:45 +0000)] 
Merge branch 'ondrej/reduce-netmgr-memory-usage' into 'main'

Reduce memory sizes of common structures

See merge request isc-projects/bind9!8299

2 years agoAdd memory pools for isc_nmsocket_t structures
Ondřej Surý [Tue, 12 Sep 2023 17:13:45 +0000 (19:13 +0200)] 
Add memory pools for isc_nmsocket_t structures

To reduce memory pressure, we can add light per-loop (netmgr worker)
memory pools for isc_nmsocket_t structures.  This will help in
situations where there's a lot of churn creating and destroying the
nmsockets.

2 years agoReduce the isc_nmsocket_t size from 1840 to 1208 bytes
Ondřej Surý [Tue, 12 Sep 2023 07:32:30 +0000 (09:32 +0200)] 
Reduce the isc_nmsocket_t size from 1840 to 1208 bytes

Embedding isc_nmsocket_h2_t directly inside isc_nmsocket_t had increased
the size of isc_nmsocket_t to 1840 bytes.  Making the isc_nmsocket_h2_t
to be a pointer to the structure and allocated on demand allows us to
reduce the size to 1208 bytes.  While there are still some possible
reductions in the isc_nmsocket_t (embedded tlsstream, streamdns
structures), this was the far biggest drop in the memory usage.

2 years agoReduce struct isc__nm_uvreq size from 1560 to 560 bytes
Ondřej Surý [Tue, 12 Sep 2023 07:10:41 +0000 (09:10 +0200)] 
Reduce struct isc__nm_uvreq size from 1560 to 560 bytes

The uv_req union member of struct isc__nm_uvreq contained libuv request
types that we don't use.  Turns out that uv_getnameinfo_t is 1000 bytes
big and unnecessarily enlarged the whole structure.  Remove all the
unused members from the uv_req union.

2 years agoReduce sizeof isc_sockaddr from 152 to 48 bytes
Ondřej Surý [Tue, 12 Sep 2023 07:21:53 +0000 (09:21 +0200)] 
Reduce sizeof isc_sockaddr from 152 to 48 bytes

After removing sockaddr_unix from isc_sockaddr, we can also remove
sockaddr_storage and reduce the isc_sockaddr size from 152 bytes to just
48 bytes needed to hold IPv6 addresses.

2 years agoMerge branch '4560-pytest-junit-xml-compat' into 'main'
Tom Krizek [Thu, 8 Feb 2024 13:57:07 +0000 (13:57 +0000)] 
Merge branch '4560-pytest-junit-xml-compat' into 'main'

Support older junit XML format in test result processing

Closes #4560

See merge request isc-projects/bind9!8696

2 years agoAdd CHANGES note for [GL #4560]
Tom Krizek [Tue, 6 Feb 2024 09:34:41 +0000 (10:34 +0100)] 
Add CHANGES note for [GL #4560]

2 years agoSupport older junit XML format in test result processing
Tom Krizek [Tue, 6 Feb 2024 09:21:45 +0000 (10:21 +0100)] 
Support older junit XML format in test result processing

When running `make check` on a platform which has older (but still
supported) pytest, e.g. 3.4.2 on EL8, the junit to trs conversion would
fail because the junit format has different structure. Make the junit
XML processing more lenient to support both the older and newer junit
XML formats.

2 years agoMerge branch '4562-use-source-port-for-ditch-pl' into 'main'
Tom Krizek [Thu, 8 Feb 2024 12:42:23 +0000 (12:42 +0000)] 
Merge branch '4562-use-source-port-for-ditch-pl' into 'main'

Use a single local port for ditch.pl

Closes #4562

See merge request isc-projects/bind9!8698

2 years agoUse a single local port for ditch.pl
Tom Krizek [Tue, 6 Feb 2024 14:35:49 +0000 (15:35 +0100)] 
Use a single local port for ditch.pl

The ditch.pl script is used to generate burst traffic without waiting
for the responses. When running other tests in parallel, this can result
in a ephemeral port clash, since the ditch.pl process closes the socket
immediately. In rare occasions when the message ID also clashes with
other tests' queries, it might result in an UnexpectedSource error from
dnspython.

Use a dedicated port EXTRAPORT8 which is reserved for each test as a
source port for the burst traffic.

2 years agoMerge branch '4187-auto-vectorize-compiler-optimization-causing-exception-crash'...
Ondřej Surý [Thu, 8 Feb 2024 11:17:58 +0000 (11:17 +0000)] 
Merge branch '4187-auto-vectorize-compiler-optimization-causing-exception-crash' into 'main'

Use proper padding instead of using alignas()

Closes #4187

See merge request isc-projects/bind9!8530

2 years agoAdd CHANGES note for [GL #4187]
Ondřej Surý [Mon, 4 Dec 2023 11:28:35 +0000 (12:28 +0100)] 
Add CHANGES note for [GL #4187]

2 years agoUse proper padding instead of using alignas()
Ondřej Surý [Mon, 4 Dec 2023 11:21:33 +0000 (12:21 +0100)] 
Use proper padding instead of using alignas()

As it was pointed out, the alignas() can't be used on objects larger
than `max_align_t` otherwise the compiler might miscompile the code to
use auto-vectorization on unaligned memory.

As we were only using alignas() as a way to prevent false memory
sharing, we can use manual padding in the affected structures.

2 years agoMerge branch 'ondrej/various-rbtdb-fixes' into 'main'
Ondřej Surý [Thu, 8 Feb 2024 07:34:07 +0000 (07:34 +0000)] 
Merge branch 'ondrej/various-rbtdb-fixes' into 'main'

Various rbtdb fixes and optimizations

See merge request isc-projects/bind9!8675

2 years agoUse DNS_QPGC_MAYBE instead of DNS_QPGC_ALL for more realistic load
Ondřej Surý [Thu, 8 Feb 2024 07:30:38 +0000 (08:30 +0100)] 
Use DNS_QPGC_MAYBE instead of DNS_QPGC_ALL for more realistic load

In the benchmarks, DNS_QPGC_ALL was trying to hard to cleanup QP
and this was slowing down QP too much.  Use DNS_QPGC_MAYBE instead
that we are going to use anyway for more realistic load - this also
shows the memory usage matching the real loads.

2 years agoAdd CHANGES note for [GL !8675]
Ondřej Surý [Tue, 6 Feb 2024 17:05:41 +0000 (18:05 +0100)] 
Add CHANGES note for [GL !8675]

2 years agoOptimize cname_and_other_data to stop as earliest as possible
Ondřej Surý [Mon, 29 Jan 2024 15:36:30 +0000 (16:36 +0100)] 
Optimize cname_and_other_data to stop as earliest as possible

Stop the cname_and_other_data processing if we already know that the
result is true.  Also, we know that CNAME will be placed in the priority
headers, so we can stop looking for CNAME if we haven't found CNAME and
we are past the priority headers.

2 years agoOptimize the slabheader placement for certain RRTypes
Ondřej Surý [Mon, 29 Jan 2024 15:36:30 +0000 (16:36 +0100)] 
Optimize the slabheader placement for certain RRTypes

Mark the infrastructure RRTypes as "priority" types and place them at
the beginning of the rdataslab header data graph.  The non-priority
types either go right after the priority types (if any).

2 years agoFix missing RRSIG for CNAME with different slabheader order
Ondřej Surý [Tue, 6 Feb 2024 13:05:08 +0000 (14:05 +0100)] 
Fix missing RRSIG for CNAME with different slabheader order

The cachedb was missing piece of code (already found in zonedb) that
would make lookups in the slabheaders to miss the RRSIGs for CNAME if
the order of CNAME and RRSIG(CNAME) was reversed in the node->data.

2 years agoMerge branch 'ondrej/isc-mem-rcu-barrier-improvements' into 'main'
Ondřej Surý [Thu, 8 Feb 2024 07:02:21 +0000 (07:02 +0000)] 
Merge branch 'ondrej/isc-mem-rcu-barrier-improvements' into 'main'

Use _exit() in the fatal() function

See merge request isc-projects/bind9!8703

2 years agoRemove isc__tls_setfatalmode() function and the calls
Ondřej Surý [Wed, 7 Feb 2024 14:25:13 +0000 (15:25 +0100)] 
Remove isc__tls_setfatalmode() function and the calls

With _exit() instead of exit() in place, we don't need
isc__tls_setfatalmode() mechanism as the atexit() calls will not be
executed including OpenSSL atexit hooks.

2 years agoUse EXIT_SUCCESS and EXIT_FAILURE
Ondřej Surý [Wed, 7 Feb 2024 13:50:38 +0000 (14:50 +0100)] 
Use EXIT_SUCCESS and EXIT_FAILURE

Instead of randomly using -1 or 1 as a failure status, properly utilize
the EXIT_FAILURE define that's platform specific (as it should be).

2 years agoImprove the rcu_barrier() call when destroying the mem context
Ondřej Surý [Wed, 7 Feb 2024 08:23:50 +0000 (09:23 +0100)] 
Improve the rcu_barrier() call when destroying the mem context

Instead of crude 5x rcu_barrier() call in the isc__mem_destroy(), change
the mechanism to call rcu_barrier() until the memory use and references
stops decreasing.  This should deal with any number of nested call_rcu()
levels.

Additionally, don't destroy the contextslock if the list of the contexts
isn't empty.  Destroying the lock could make the late threads crash.

2 years agoUse _exit() in the fatal() function
Ondřej Surý [Wed, 7 Feb 2024 13:44:39 +0000 (14:44 +0100)] 
Use _exit() in the fatal() function

Since the fatal() isn't a correct but rather abrupt termination of the
program, we want to skip the various atexit() calls because not all
memory might be freed during fatal() call, etc.  Using _exit() instead
of exit() has this effect - the program will end, but no destructors or
atexit routines will be called.

2 years agoMerge branch 'ondrej/use-error-checking-mutex-on-linux' into 'main'
Ondřej Surý [Wed, 7 Feb 2024 21:55:31 +0000 (21:55 +0000)] 
Merge branch 'ondrej/use-error-checking-mutex-on-linux' into 'main'

Always use adaptive mutexes on Linux and use error checking mutexes in developer mode

See merge request isc-projects/bind9!8693

2 years agoUse error checking mutex in developer mode on Linux
Ondřej Surý [Mon, 5 Feb 2024 08:03:41 +0000 (09:03 +0100)] 
Use error checking mutex in developer mode on Linux

When developer mode is enabled, use error checking mutex type, so we can
discover wrong use of mutexes faster.

2 years agoAlways use adaptive mutexes on Linux
Ondřej Surý [Mon, 5 Feb 2024 07:57:23 +0000 (08:57 +0100)] 
Always use adaptive mutexes on Linux

When adaptive mutexes are available (with glibc), always use them.
Remove the autoconf switch and also fix the static initializer.

2 years agoRemove unused mutex from netmgr
Ondřej Surý [Mon, 5 Feb 2024 07:52:35 +0000 (08:52 +0100)] 
Remove unused mutex from netmgr

The netmgr->lock was dead code, remove it.

2 years agoMerge branch '4519-check-return-value-of-snprintf-in-lib-isccfg-check-c' into 'main'
Mark Andrews [Wed, 7 Feb 2024 13:49:19 +0000 (13:49 +0000)] 
Merge branch '4519-check-return-value-of-snprintf-in-lib-isccfg-check-c' into 'main'

Resolve "Check return value of snprintf in lib/isccfg/check.c"

Closes #4519

See merge request isc-projects/bind9!8624

2 years agocleanup isc_symtab_define with isc_symexists_replace
Mark Andrews [Wed, 7 Feb 2024 02:52:10 +0000 (13:52 +1100)] 
cleanup isc_symtab_define with isc_symexists_replace

2 years agoAdd RUNTIME_CHECK
Mark Andrews [Wed, 7 Feb 2024 02:34:39 +0000 (13:34 +1100)] 
Add RUNTIME_CHECK

2 years agoEnsure keyname buffer is big enough
Mark Andrews [Fri, 5 Jan 2024 06:36:00 +0000 (17:36 +1100)] 
Ensure keyname buffer is big enough

Use a temporary string rather than a fixed buffer to construct
the keyname.

2 years agocleanup isc_symtab_undefine callers
Mark Andrews [Wed, 7 Feb 2024 01:56:39 +0000 (12:56 +1100)] 
cleanup isc_symtab_undefine callers

isc_symtab_undefine now only return ISC_R_SUCCESS and ISC_R_EXISTS.
Cleanup callers looking for other values.

2 years agoMerge branch '4561-shutdown-test-doesn-t-log-everything-to-named-run' into 'main'
Mark Andrews [Wed, 7 Feb 2024 01:03:05 +0000 (01:03 +0000)] 
Merge branch '4561-shutdown-test-doesn-t-log-everything-to-named-run' into 'main'

Resolve "Shutdown test doesn't log everything to named.run"

Closes #4561

See merge request isc-projects/bind9!8695

2 years agoRe-enable rndc shutdown test
Tom Krizek [Tue, 6 Feb 2024 15:52:44 +0000 (16:52 +0100)] 
Re-enable rndc shutdown test

The issue preventing a proper rndc shutdown was recently fixed and
the test now passes.

2 years agoCapture the resolver's startup and shutdown logging
Mark Andrews [Tue, 6 Feb 2024 04:45:01 +0000 (15:45 +1100)] 
Capture the resolver's startup and shutdown logging

Also set the debugging to 99.

2 years agoMerge branch '4529-abort-in-nsupdate-2' into 'main'
Mark Andrews [Tue, 6 Feb 2024 23:27:05 +0000 (23:27 +0000)] 
Merge branch '4529-abort-in-nsupdate-2' into 'main'

Resolve "Abort in nsupdate"

Closes #4529

See merge request isc-projects/bind9!8658

2 years agoAdd CHANGES entry for [GL #4529]
Mark Andrews [Thu, 1 Feb 2024 01:38:51 +0000 (12:38 +1100)] 
Add CHANGES entry for [GL #4529]

2 years agoRestore dns_requestmgr_shutdown re-entrancy
Mark Andrews [Thu, 18 Jan 2024 02:43:30 +0000 (13:43 +1100)] 
Restore dns_requestmgr_shutdown re-entrancy

In the conversion to rcu the ability to call dns_requestmgr_shutdown
multiple times was lost.  nsupdate depended on this.  Restore support
for that.

2 years agoMerge branch '4241-expose-zone-first-time-refreshes' into 'main'
Arаm Sаrgsyаn [Tue, 6 Feb 2024 11:26:28 +0000 (11:26 +0000)] 
Merge branch '4241-expose-zone-first-time-refreshes' into 'main'

Resolve "Expose data about 'first time' zone maintenance in-progress"

Closes #4241

See merge request isc-projects/bind9!8481

2 years agoAdd a release note for [GL #4241]
Aram Sargsyan [Fri, 10 Nov 2023 11:45:05 +0000 (11:45 +0000)] 
Add a release note for [GL #4241]

2 years agoAdd a CHANGES note for [GL #4241]
Aram Sargsyan [Fri, 10 Nov 2023 11:44:51 +0000 (11:44 +0000)] 
Add a CHANGES note for [GL #4241]

2 years agoAdd a check for the 'first refresh' data in rndc status
Aram Sargsyan [Fri, 10 Nov 2023 11:33:40 +0000 (11:33 +0000)] 
Add a check for the 'first refresh' data in rndc status

Check that 'rndc status' correctly indicates the expected number
of the secondary zones which have the 'first refresh' flag set.

2 years agoAdd a check for the 'first refresh' data in the stats channel
Aram Sargsyan [Fri, 10 Nov 2023 11:14:58 +0000 (11:14 +0000)] 
Add a check for the 'first refresh' data in the stats channel

Currently we test the incoming zone transfers data in the statistics
channel by retransfering the zones in slow mode and capturing the XML
and JSON outputs in the meantime to check their validity. Add a new
transfer to the test, and check that the XML and JSON files correctly
indicate that we have 3 retransfers and 1 new (first time) transfer.

2 years agoExpose the 'first refresh' zone flag in rndc status
Aram Sargsyan [Fri, 10 Nov 2023 11:10:32 +0000 (11:10 +0000)] 
Expose the 'first refresh' zone flag in rndc status

Expose the newly added 'first refresh' flag in the information
provided by the 'rndc staus' command, by showing the number of
zones, which are not yet fully ready, and their first refresh
is pending or is in-progress.

2 years agoExpose 'first refresh' zone flag in stats channel
Aram Sargsyan [Fri, 10 Nov 2023 11:06:08 +0000 (11:06 +0000)] 
Expose 'first refresh' zone flag in stats channel

Add a new zone flag to indicate that a secondary type zone is
not yet fully ready, and a first time refresh is pending or is
in progress.

Expose this new flag in the statistics channel's "Incoming Zone
Transfers" section.

2 years agoMerge branch '4373-dnssec-validation-yes-should-fail-without-trust-anchors' into...
Arаm Sаrgsyаn [Fri, 2 Feb 2024 19:55:00 +0000 (19:55 +0000)] 
Merge branch '4373-dnssec-validation-yes-should-fail-without-trust-anchors' into 'main'

'dnssec-validation yes' should fail when no trust anchors are configured

Closes #4373

See merge request isc-projects/bind9!8575

2 years agoDocument a specific 'dnssec-validation yes' usage incompatibility
Aram Sargsyan [Wed, 24 Jan 2024 14:45:29 +0000 (14:45 +0000)] 
Document a specific 'dnssec-validation yes' usage incompatibility

Static trust anchor for the root zone can not be used with
'dnssec-validation auto'.

2 years agoUse trust anchors with 'dnssec-validation yes' in system tests
Aram Sargsyan [Thu, 14 Dec 2023 13:14:44 +0000 (13:14 +0000)] 
Use trust anchors with 'dnssec-validation yes' in system tests

Explicitly use an empty 'trust-anchors' statement in the system
tests where it was used implicitly before.

In resolver/ns5/named.conf.in use the trust anchor in 'trusted.conf',
which was supposed to be used there.

2 years agoAdd CHANGES and release notes for [GL #4373]
Aram Sargsyan [Thu, 14 Dec 2023 11:10:50 +0000 (11:10 +0000)] 
Add CHANGES and release notes for [GL #4373]

2 years agoTest trusted anchors configurations for 'dnssec-validation yes'
Aram Sargsyan [Thu, 14 Dec 2023 10:44:21 +0000 (10:44 +0000)] 
Test trusted anchors configurations for 'dnssec-validation yes'

Add checks into the  'checkconf' system test to make sure that the
'dnssec-validation yes' option fails without configured trusted
anchors, and succeeds with configured non-empty, as well as empty
trusted anchors.

2 years agoDocument new requirements for 'dnssec-validation yes'
Aram Sargsyan [Thu, 14 Dec 2023 10:42:56 +0000 (10:42 +0000)] 
Document new requirements for 'dnssec-validation yes'

Using the 'dnssec-validation yes' option now requires an explicitly
confgiured 'trust-anchors' statement (or 'managed-keys' or
'trusted-keys', both deprecated).

2 years agoRequire trust anchors for 'dnnsec-validation yes'
Aram Sargsyan [Thu, 14 Dec 2023 10:40:05 +0000 (10:40 +0000)] 
Require trust anchors for 'dnnsec-validation yes'

Using the 'dnssec-validation yes' option now requires an explicitly
confgiured 'trust-anchors' statement (or 'managed-keys' or
'trusted-keys', both deprecated).

2 years agoMerge branch '4531-improve-parental-agents-definition-arm' into 'main'
Matthijs Mekking [Fri, 2 Feb 2024 16:19:05 +0000 (16:19 +0000)] 
Merge branch '4531-improve-parental-agents-definition-arm' into 'main'

Improve parental-agents definition in ARM

Closes #4531

See merge request isc-projects/bind9!8650

2 years agoAdd CHANGES for #4531
Matthijs Mekking [Mon, 15 Jan 2024 08:19:28 +0000 (09:19 +0100)] 
Add CHANGES for #4531

Improve ARM parental-agents definition.

2 years agoImprove parental-agents definition in ARM
Matthijs Mekking [Mon, 15 Jan 2024 08:17:01 +0000 (09:17 +0100)] 
Improve parental-agents definition in ARM

"A parental agent is the entity that is allowed to change a zone's
delegation information" is untrue, because it is possible to use some
hidden server or a validating resolver.

Also the new text makes it more clear that named sends DS queries to
these servers.

2 years agoMerge branch 'aram/dns-getdb-flags-fix' into 'main'
Arаm Sаrgsyаn [Fri, 2 Feb 2024 15:05:58 +0000 (15:05 +0000)] 
Merge branch 'aram/dns-getdb-flags-fix' into 'main'

Fix the DNS_GETDB_STALEFIRST flag

See merge request isc-projects/bind9!8683

2 years agoAdd a CHANGES note for [GL !8683]
Aram Sargsyan [Wed, 31 Jan 2024 13:16:21 +0000 (13:16 +0000)] 
Add a CHANGES note for [GL !8683]

2 years agoImprove the definition of the DNS_GETDB_* flags
Aram Sargsyan [Wed, 31 Jan 2024 13:12:27 +0000 (13:12 +0000)] 
Improve the definition of the DNS_GETDB_* flags

Use the (1 << N) form for defining the flags, in order to avoid
errors like the one fixed in the previous commit.

Also convert the definitions to an enum, as done in some of our
recent refactoring work.

2 years agoFix the DNS_GETDB_STALEFIRST flag
Aram Sargsyan [Wed, 31 Jan 2024 13:01:13 +0000 (13:01 +0000)] 
Fix the DNS_GETDB_STALEFIRST flag

The DNS_GETDB_STALEFIRST flag is defined as 0x0C, which is the
combination of the DNS_GETDB_PARTIAL (0x04) and the
DNS_GETDB_IGNOREACL (0x08) flags (0x04 | 0x08 == 0x0C) , which is
an obvious error.

All the flags should be power of two, so they don't interfere with
each other. Fix the DNS_GETDB_STALEFIRST flag by setting it to 0x10.

2 years agoUpdate BIND version for release v9.19.21
Michal Nowak [Fri, 2 Feb 2024 09:56:43 +0000 (10:56 +0100)] 
Update BIND version for release

2 years agoAdd a CHANGES marker
Michal Nowak [Fri, 2 Feb 2024 09:55:35 +0000 (10:55 +0100)] 
Add a CHANGES marker

2 years agoMerge branch 'michal/prepare-documentation-for-bind-9.19.21' into 'v9.19.21-release'
Michal Nowak [Fri, 2 Feb 2024 09:54:26 +0000 (09:54 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.19.21' into 'v9.19.21-release'

Prepare documentation for BIND 9.19.21

See merge request isc-private/bind9!643

2 years agoPrepare release notes for BIND 9.19.21
Michał Kępień [Fri, 2 Feb 2024 08:21:49 +0000 (09:21 +0100)] 
Prepare release notes for BIND 9.19.21

2 years agoMerge branch 'ondrej/dns-validator-async' into 'v9.19.21-release'
Michał Kępień [Thu, 1 Feb 2024 20:47:06 +0000 (20:47 +0000)] 
Merge branch 'ondrej/dns-validator-async' into 'v9.19.21-release'

[CVE-2023-50387] Fix KeyTrap

See merge request isc-private/bind9!606

2 years agoAdd CHANGES and release note for [GL #4424]
Ondřej Surý [Tue, 16 Jan 2024 10:46:29 +0000 (11:46 +0100)] 
Add CHANGES and release note for [GL #4424]

2 years agoMake the dns_validator validations asynchronous and limit it
Ondřej Surý [Mon, 11 Dec 2023 15:50:12 +0000 (16:50 +0100)] 
Make the dns_validator validations asynchronous and limit it

Instead of running all the cryptographic validation in a tight loop,
spread it out into multiple event loop "ticks", but moving every single
validation into own isc_async_run() asynchronous event.  Move the
cryptographic operations - both verification and DNSKEY selection - to
the offloaded threads (isc_work_enqueue), this further limits the time
we spend doing expensive operations on the event loops that should be
fast.

Limit the impact of invalid or malicious RRSets that contain crafted
records causing the dns_validator to do many validations per single
fetch by adding a cap on the maximum number of validations and maximum
number of validation failures that can happen before the resolving
fails.

2 years agoMerge branch '4234-confidential-parser-regression-main' into 'v9.19.21-release'
Michał Kępień [Thu, 1 Feb 2024 20:22:37 +0000 (20:22 +0000)] 
Merge branch '4234-confidential-parser-regression-main' into 'v9.19.21-release'

fix a message parsing regression

See merge request isc-private/bind9!632

2 years agoMerge branch '4553-return-value-for-checkds-shadows' into 'main'
Matthijs Mekking [Thu, 1 Feb 2024 11:40:59 +0000 (11:40 +0000)] 
Merge branch '4553-return-value-for-checkds-shadows' into 'main'

Don't also skip keymgr run if checkds is skipped

Closes #4553

See merge request isc-projects/bind9!8681

2 years agoDon't also skip keymgr run if checkds is skipped
Matthijs Mekking [Wed, 31 Jan 2024 10:44:07 +0000 (11:44 +0100)] 
Don't also skip keymgr run if checkds is skipped

Checking the DS at the parent only happens if dns_zone_getdnsseckeys()
returns success. However, if this function somehow fails, it can also
prevent the keymgr from running.

Before adding the check DS functionality, the keymgr should only run
if 'dns_dnssec_findmatchingkeys()' did not return an error (either
ISC_R_SUCCESS or ISC_R_NOTFOUND). After this change the correct
result code is used again.