]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
2 years agoUpdate BIND version to 9.19.18-dev
Michal Nowak [Tue, 12 Sep 2023 06:11:52 +0000 (08:11 +0200)] 
Update BIND version to 9.19.18-dev

2 years agoMerge branch '4242-placeholder' into 'main'
Michal Nowak [Thu, 7 Sep 2023 08:21:45 +0000 (08:21 +0000)] 
Merge branch '4242-placeholder' into 'main'

Add CHANGES placeholder for [GL #4242]

Closes #4242

See merge request isc-projects/bind9!8284

2 years agoAdd CHANGES placeholder for [GL #4242]
Michal Nowak [Wed, 6 Sep 2023 14:07:42 +0000 (16:07 +0200)] 
Add CHANGES placeholder for [GL #4242]

2 years agoMerge branch '4152-placeholder' into 'main'
Michal Nowak [Thu, 7 Sep 2023 08:18:01 +0000 (08:18 +0000)] 
Merge branch '4152-placeholder' into 'main'

Add CHANGES placeholder for [GL #4152]

See merge request isc-projects/bind9!8283

2 years agoAdd CHANGES placeholder for [GL #4152]
Michal Nowak [Wed, 6 Sep 2023 14:03:42 +0000 (16:03 +0200)] 
Add CHANGES placeholder for [GL #4152]

2 years agoMerge branch '4290-raise-log-level-to-isc_log_error-on-formerr-in-xfrin-c' into ...
Mark Andrews [Wed, 6 Sep 2023 09:13:23 +0000 (09:13 +0000)] 
Merge branch '4290-raise-log-level-to-isc_log_error-on-formerr-in-xfrin-c' into 'main'

Resolve "raise log level to ISC_LOG_NOTICE on FORMERR in xfrin.c"

Closes #4290

See merge request isc-projects/bind9!8262

2 years agoAdd a CHANGES note for [GL #4290]
Mark Andrews [Fri, 1 Sep 2023 00:26:45 +0000 (10:26 +1000)] 
Add a CHANGES note for [GL #4290]

2 years agoAdjust level of log messages when transferring in a zone
Mark Andrews [Fri, 1 Sep 2023 00:17:00 +0000 (10:17 +1000)] 
Adjust level of log messages when transferring in a zone

This raises the log level of messages treated as FORMERR to NOTICE
when transfering in a zone.  This also adds a missing log message
for TYPE0 and meta types received during a zone transfer.

2 years agoMerge branch '4291-check-dig-exit-status' into 'main'
Mark Andrews [Wed, 6 Sep 2023 01:32:21 +0000 (01:32 +0000)] 
Merge branch '4291-check-dig-exit-status' into 'main'

Resolve "RNDC system test failed to run to completion"

Closes #4291

See merge request isc-projects/bind9!8264

2 years agoCheck dig's exist status
Mark Andrews [Mon, 4 Sep 2023 05:16:42 +0000 (15:16 +1000)] 
Check dig's exist status

2 years agoMerge branch '4292-uncleared-libcrypto-error-crypto-evp-evp_fetch-c-373-inner_evp_gen...
Mark Andrews [Wed, 6 Sep 2023 01:02:52 +0000 (01:02 +0000)] 
Merge branch '4292-uncleared-libcrypto-error-crypto-evp-evp_fetch-c-373-inner_evp_generic_fetch' into 'main'

Resolve "Uncleared libcrypto error: crypto/evp/evp_fetch.c:373 inner_evp_generic_fetch"

Closes #4292

See merge request isc-projects/bind9!8274

2 years agoCall ERR_clear_error on EVP_MD_fetch or EVP_##alg error
Mark Andrews [Tue, 5 Sep 2023 07:53:04 +0000 (17:53 +1000)] 
Call ERR_clear_error on EVP_MD_fetch or EVP_##alg error

2 years agoMerge branch '4214-uaf-in-validator-logging' into 'main'
Mark Andrews [Tue, 5 Sep 2023 23:51:25 +0000 (23:51 +0000)] 
Merge branch '4214-uaf-in-validator-logging' into 'main'

Resolve "UAF in validator logging"

Closes #4214

See merge request isc-projects/bind9!8269

2 years agoAdd CHANGES for [GL #4214]
Mark Andrews [Mon, 4 Sep 2023 23:50:16 +0000 (09:50 +1000)] 
Add CHANGES for [GL #4214]

2 years agoRestore dns_validator_destroy and fetchctx_detach call order
Mark Andrews [Mon, 4 Sep 2023 23:46:05 +0000 (09:46 +1000)] 
Restore dns_validator_destroy and fetchctx_detach call order

7a78a85b moved the destruction of the validator from near the start
validated to the end.  This reversed the order of dns_validator_destroy
and fetchctx_detach.  Restore the order so that val->name remains
valid for the lifetime of the validator.

2 years agoMerge branch 'mnowak/statschannel-system-test-is-too-verbose' into 'main'
Ondřej Surý [Tue, 5 Sep 2023 17:05:29 +0000 (17:05 +0000)] 
Merge branch 'mnowak/statschannel-system-test-is-too-verbose' into 'main'

Disable command tracing in statschannel system test

See merge request isc-projects/bind9!8277

2 years agoDisable command tracing in statschannel system test
Michal Nowak [Tue, 5 Sep 2023 16:52:15 +0000 (18:52 +0200)] 
Disable command tracing in statschannel system test

Command tracing was added recently via
26e10e8fb51d5f101cfdc319794f2650084153c3 and makes the system test too
verbose.

2 years agoMerge branch '4296-ignore-jemalloc-versions-before-4.0.0' into 'main'
Ondřej Surý [Tue, 5 Sep 2023 16:54:55 +0000 (16:54 +0000)] 
Merge branch '4296-ignore-jemalloc-versions-before-4.0.0' into 'main'

Ignore jemalloc versions before 4.0.0

Closes #4296

See merge request isc-projects/bind9!8273

2 years agoAdd CHANGES and release note for [GL #4296]
Ondřej Surý [Tue, 5 Sep 2023 12:38:55 +0000 (14:38 +0200)] 
Add CHANGES and release note for [GL #4296]

2 years agoSynchronize used library versions reporting functions
Aram Sargsyan [Tue, 5 Sep 2023 15:41:42 +0000 (15:41 +0000)] 
Synchronize used library versions reporting functions

There are libraries which are reported in printversion(), but not
reported in setup(). Synchronize the functions, so that the log
file could have the same information as reported by the 'named -V'
command execution.

2 years agoPrint the used jemalloc version in autoconf and named -V output
Ondřej Surý [Tue, 5 Sep 2023 12:58:15 +0000 (14:58 +0200)] 
Print the used jemalloc version in autoconf and named -V output

The autoconf and named -V now prints used version of jemalloc.  This
doesn't work with system supplied jemalloc, so in it prints `system`
instead in the autoconf and nothing in named -V output.

2 years agoIgnore jemalloc versions before 4.0.0
Ondřej Surý [Tue, 5 Sep 2023 12:32:26 +0000 (14:32 +0200)] 
Ignore jemalloc versions before 4.0.0

We now depend on explicitly creating memory arenas and disabling tcache
on those, and these features are not available with jemalloc < 4.
Instead of working around these issues, make the jemalloc >= 4.0.0 hard
requirement by looking for sdallocx() symbol that's only available from
that version.

The jemalloc < 4 was only used by RHEL 7 which is not supported since
BIND 9.19+.

2 years agoMerge branch '4255-placeholder' into 'main'
Michal Nowak [Tue, 5 Sep 2023 16:08:07 +0000 (16:08 +0000)] 
Merge branch '4255-placeholder' into 'main'

Add CHANGES placeholder for [GL #4255]

See merge request isc-projects/bind9!8275

2 years agoAdd CHANGES placeholder for [GL #4255]
Michal Nowak [Tue, 5 Sep 2023 15:57:18 +0000 (17:57 +0200)] 
Add CHANGES placeholder for [GL #4255]

2 years agoMerge branch '4038-specialised-arena-per-worker' into 'main'
Ondřej Surý [Tue, 5 Sep 2023 08:23:42 +0000 (08:23 +0000)] 
Merge branch '4038-specialised-arena-per-worker' into 'main'

Make it possible to create memory contexts backed by jemalloc arenas

Closes #4038

See merge request isc-projects/bind9!8270

2 years agoAdd CHANGES and release note for [GL #4038]
Artem Boldariev [Mon, 14 Aug 2023 13:17:54 +0000 (16:17 +0300)] 
Add CHANGES and release note for [GL #4038]

Mention that send buffer allocations/deallocations are now routed
through dedicated memory arenas.

2 years agoAllocate DNS send buffers using dedicated per-worker memory arenas
Artem Boldariev [Thu, 10 Aug 2023 20:08:25 +0000 (23:08 +0300)] 
Allocate DNS send buffers using dedicated per-worker memory arenas

This commit ensures that memory allocations related to DNS send
buffers are routed through dedicated per-worker memory arenas in order
to decrease memory usage on high load caused by TCP-based DNS
transports.

We do that by following jemalloc developers suggestions:

https://github.com/jemalloc/jemalloc/issues/2483#issuecomment-1639019699
https://github.com/jemalloc/jemalloc/issues/2483#issuecomment-1698173849

2 years agoAdd ability to set per jemalloc arena dirty and muzzy decay values
Artem Boldariev [Fri, 11 Aug 2023 11:25:40 +0000 (14:25 +0300)] 
Add ability to set per jemalloc arena dirty and muzzy decay values

This commit adds couple of functions to change "dirty_decay_ms" and
"muzzy_decay_ms" settings on arenas associated with memory contexts.

2 years agoMake it possible to create memory contexts backed by jemalloc arenas
Artem Boldariev [Thu, 10 Aug 2023 14:02:43 +0000 (17:02 +0300)] 
Make it possible to create memory contexts backed by jemalloc arenas

This commit extends the internal memory management middleware code in
BIND so that memory contexts backed by dedicated jemalloc arenas can
be created. A new function (isc_mem_create_arena()) is added for that.

Moreover, it extends the existing code so that specialised memory
contexts can be created easily, should we need that functionality for
other future purposes. We have achieved that by passing the flags to
the underlying jemalloc-related calls. See the above
isc_mem_create_arena(), which can serve as an example of this.

Having this opens up possibilities for creating memory contexts tuned
for specific needs.

2 years agoMerge branch '4263-deprecate-dnssec-must-be-secure-feature' into 'main'
Ondřej Surý [Mon, 4 Sep 2023 13:14:48 +0000 (13:14 +0000)] 
Merge branch '4263-deprecate-dnssec-must-be-secure-feature' into 'main'

Deprecate 'dnssec-must-be-secure' option

See merge request isc-projects/bind9!8267

2 years agoAdd CHANGES and release note for [GL #4263]
Ondřej Surý [Mon, 4 Sep 2023 11:11:49 +0000 (13:11 +0200)] 
Add CHANGES and release note for [GL #4263]

2 years agoDeprecate 'dnssec-must-be-secure' option
Ondřej Surý [Mon, 4 Sep 2023 11:08:48 +0000 (13:08 +0200)] 
Deprecate 'dnssec-must-be-secure' option

The dnssec-must-be-secure feature was added in the early days of BIND 9
and DNSSEC and it makes sense only as a debugging feature.

Remove the feature to simplify the code.

2 years agoMerge branch 'michal/reorganize-vulnerability-docs' into 'main'
Michał Kępień [Mon, 4 Sep 2023 09:56:54 +0000 (09:56 +0000)] 
Merge branch 'michal/reorganize-vulnerability-docs' into 'main'

Move security-related information to SECURITY.md

See merge request isc-projects/bind9!8257

2 years agoMove security-related information to SECURITY.md
Michał Kępień [Mon, 4 Sep 2023 09:54:57 +0000 (11:54 +0200)] 
Move security-related information to SECURITY.md

To follow current best practices, create a short SECURITY.md file in the
root of the repository that contains information about the project's
security policy and guidelines for reporting potential security issues.
Replace the relevant bits of text in other files with references to the
new SECURITY.md file, so that the relevant information only needs to be
maintained in one place.

Replace all occurrences of the generic security-officer@isc.org email
with a dedicated address for reporting BIND 9 security issues,
bind-security@isc.org.

2 years agoMerge branch 'each-cleanup-rbt' into 'main'
Ondřej Surý [Mon, 4 Sep 2023 09:07:32 +0000 (09:07 +0000)] 
Merge branch 'each-cleanup-rbt' into 'main'

replace RBT usage throughout named

See merge request isc-projects/bind9!8213

2 years agoCHANGES for [GL !8213]
Evan Hunt [Thu, 17 Aug 2023 16:37:23 +0000 (09:37 -0700)] 
CHANGES for [GL !8213]

2 years agounconditionally create view and resolver nametrees
Evan Hunt [Thu, 24 Aug 2023 20:47:19 +0000 (13:47 -0700)] 
unconditionally create view and resolver nametrees

instead of allowing a NULL nametree in dns_nametree_covered(),
require nametree to exist, and ensure that the nametrees defined
for view and resolver objects are always created.

2 years agouse a count nametree for synthfromdnssec
Evan Hunt [Thu, 17 Aug 2023 07:45:38 +0000 (00:45 -0700)] 
use a count nametree for synthfromdnssec

use the count semantics for dns_nametree to support view->sfd.

2 years agoadd a 'foundname' argument to dns_nametree_covered()
Evan Hunt [Thu, 17 Aug 2023 06:51:56 +0000 (23:51 -0700)] 
add a 'foundname' argument to dns_nametree_covered()

when checking whether a name is covered, the ancestor name that
was found can be set into a name object passed in.

2 years agoadd semantics to name trees to support counters
Evan Hunt [Thu, 17 Aug 2023 06:26:50 +0000 (23:26 -0700)] 
add semantics to name trees to support counters

name trees can now also hold trees of counters. each time a name
dns_nametree_add() is called with a given name, the counter for that
name is incremented; the name is not deleted until dns_nametree_delete()
is called the same number of times.

this is meant to be used for synth-from-dnssec, which is incremented for
each key defined at a name, and decremented when a key is removed, the
name must continue to exist until the number of keys has reached zero.

2 years agouse bitfield name trees for disable-algorithms and disable-ds-digests
Evan Hunt [Thu, 17 Aug 2023 05:08:46 +0000 (22:08 -0700)] 
use bitfield name trees for disable-algorithms and disable-ds-digests

switch disable-algorithms and disable-ds-digests to use
bitfield-type name trees, replacing the RBT-based bftree.

2 years agoadd semantics to dns_nametree to support bitfields
Evan Hunt [Thu, 17 Aug 2023 02:59:50 +0000 (19:59 -0700)] 
add semantics to dns_nametree to support bitfields

name trees can now hold either boolean values or bit fields. the
type is selected when the name tree is created.

the behavior of dns_nametree_add() differs slightly beteween the types:
in a boolean tree adding an existing name will return ISC_R_EXISTS,
but in a bitfield tree it simply sets the specified bit in the bitfield
and returns ISC_R_SUCCESS.

2 years agorefactor disable_algorithm and disable_ds_digest to use one data structure
Evan Hunt [Tue, 15 Aug 2023 22:30:12 +0000 (15:30 -0700)] 
refactor disable_algorithm and disable_ds_digest to use one data structure

the functions for disabling DNSSEC signing algorithms and DS digest
algorithms in resolver.c had a lot of duplicated code.

this commit adds functions to implement a "bitfield tree", which is
(currently) an RBT in which the node data contains arbitrary-sized
bitfields to indicate whether a value has been added at the given
node or not. (it can be changed to a QP trie later.)

it also replaces the functions dns_resolver_disable_algorithm(),
dns_resolver_algorithm_supported(), dns_resolver_disable_ds_digest()
and dns_resolver_ds_digest_supported() with simple wrappers that call
the new functions.

2 years agouse dns_nametree in place of RBTs
Evan Hunt [Wed, 16 Aug 2023 20:28:36 +0000 (13:28 -0700)] 
use dns_nametree in place of RBTs

replace the use of RBTs for deny-answer-aliases, the exclude
lists for deny-answer-aliases and deny-answer-addresses, and
dnssec-must-be-secure, with name trees.

2 years agoadd dns_nametree structure for policy match lookups
Evan Hunt [Wed, 16 Aug 2023 19:08:53 +0000 (12:08 -0700)] 
add dns_nametree structure for policy match lookups

this is a QP trie of boolean values to indicate whether a name is
included in or excluded from some policy. this can be used for
synth-from-dnssec, deny-answer-aliases, etc.

2 years agoreplace RBTs with hashmaps in dns_transport
Evan Hunt [Wed, 16 Aug 2023 04:04:54 +0000 (21:04 -0700)] 
replace RBTs with hashmaps in dns_transport

as dns_transport_find() is only concerned with finding an exact
match on the specified name it doesn't need to use a tree data
structure internally, we can replace the RBTs with hash tables.

2 years agoMerge branch '4159-openssl-error-queue-not-cleaned' into 'main'
Mark Andrews [Fri, 1 Sep 2023 03:08:20 +0000 (03:08 +0000)] 
Merge branch '4159-openssl-error-queue-not-cleaned' into 'main'

Resolve "OpenSSL error queue not cleaned"

Closes #4159

See merge request isc-projects/bind9!8233

2 years agoAdd release note for [GL #4159]
Mark Andrews [Wed, 28 Jun 2023 02:01:58 +0000 (12:01 +1000)] 
Add release note for [GL #4159]

2 years agoAdd CHANGES note for [GL #4159]
Mark Andrews [Wed, 28 Jun 2023 01:58:22 +0000 (11:58 +1000)] 
Add CHANGES note for [GL #4159]

2 years agoDetect uncleared libcrypto errors in rdata processing
Mark Andrews [Wed, 28 Jun 2023 06:28:57 +0000 (16:28 +1000)] 
Detect uncleared libcrypto errors in rdata processing

If libcrypto errors are not cleared slow memory leaks occur which
are not detected at shutdown.

2 years agoStyle fix
Mark Andrews [Thu, 20 Jul 2023 03:31:16 +0000 (13:31 +1000)] 
Style fix

2 years agoCheck that buf is large enough
Mark Andrews [Tue, 11 Jul 2023 07:57:25 +0000 (17:57 +1000)] 
Check that buf is large enough

2 years agoTake ownership of pointer before freeing
Mark Andrews [Thu, 20 Jul 2023 03:10:29 +0000 (13:10 +1000)] 
Take ownership of pointer before freeing

2 years agoAddress potential memory leak in dst__openssl_fromlabel
Mark Andrews [Tue, 11 Jul 2023 08:40:10 +0000 (18:40 +1000)] 
Address potential memory leak in dst__openssl_fromlabel

2 years agoAdd missing "Design by Contract" REQUIREs
Mark Andrews [Wed, 30 Aug 2023 05:31:34 +0000 (15:31 +1000)] 
Add missing "Design by Contract" REQUIREs

2 years agoFree evp_md_ctx and pkey at exit
Mark Andrews [Wed, 30 Aug 2023 02:01:32 +0000 (12:01 +1000)] 
Free evp_md_ctx and pkey at exit

2 years agoClear OpenSSL error stack when exiting
Mark Andrews [Thu, 31 Aug 2023 01:03:38 +0000 (11:03 +1000)] 
Clear OpenSSL error stack when exiting

2 years agoClear OpenSSL errors on TSL error paths
Mark Andrews [Thu, 20 Jul 2023 03:32:50 +0000 (13:32 +1000)] 
Clear OpenSSL errors on TSL error paths

2 years agoClear OpenSSL errors on context creation failures
Mark Andrews [Wed, 19 Jul 2023 07:24:34 +0000 (17:24 +1000)] 
Clear OpenSSL errors on context creation failures

2 years agoClear OpenSSL errors on SHA failures
Mark Andrews [Thu, 13 Jul 2023 04:41:00 +0000 (14:41 +1000)] 
Clear OpenSSL errors on SHA failures

2 years agoClear OpenSSL errors on OSSL_PROVIDER_load failures
Mark Andrews [Thu, 13 Jul 2023 03:24:10 +0000 (13:24 +1000)] 
Clear OpenSSL errors on OSSL_PROVIDER_load failures

2 years agoClear OpenSSL errors on engine errors
Mark Andrews [Tue, 11 Jul 2023 07:59:13 +0000 (17:59 +1000)] 
Clear OpenSSL errors on engine errors

2 years agoClear OpenSSL errors on EVP failures
Mark Andrews [Tue, 11 Jul 2023 04:10:49 +0000 (14:10 +1000)] 
Clear OpenSSL errors on EVP failures

2 years agoClear OpenSSL errors on EVP_PKEY_new failures
Mark Andrews [Tue, 11 Jul 2023 03:25:47 +0000 (13:25 +1000)] 
Clear OpenSSL errors on EVP_PKEY_new failures

2 years agoClear OpenSSL errors on EC_KEY_get0_private_key failures
Mark Andrews [Thu, 31 Aug 2023 00:57:43 +0000 (10:57 +1000)] 
Clear OpenSSL errors on EC_KEY_get0_private_key failures

2 years agoClear OpenSSL errors on EVP_PKEY_get0_EC_KEY failures
Mark Andrews [Tue, 11 Jul 2023 03:44:55 +0000 (13:44 +1000)] 
Clear OpenSSL errors on EVP_PKEY_get0_EC_KEY failures

2 years agoClear OpenSSL errors on EVP_PKEY_get_bn_param failures
Mark Andrews [Wed, 19 Jul 2023 07:25:17 +0000 (17:25 +1000)] 
Clear OpenSSL errors on EVP_PKEY_get_bn_param failures

2 years agoClear OpenSSL errors on EVP_MD_CTX_create failures
Mark Andrews [Tue, 11 Jul 2023 04:00:29 +0000 (14:00 +1000)] 
Clear OpenSSL errors on EVP_MD_CTX_create failures

2 years agoClear OpenSSL errors on ECDSA_SIG_new failures
Mark Andrews [Thu, 13 Jul 2023 04:39:06 +0000 (14:39 +1000)] 
Clear OpenSSL errors on ECDSA_SIG_new failures

2 years agoClear OpenSSL errors on d2i_ASN1_OBJECT failures
Mark Andrews [Wed, 21 Jun 2023 11:30:15 +0000 (21:30 +1000)] 
Clear OpenSSL errors on d2i_ASN1_OBJECT failures

When d2i_ASN1_OBJECT() fails an error is pushed onto the thread's
error stack.  This is now cleared by calling ERR_clear_error().

2 years agoMerge branch 'ondrej-isc_mem_cget' into 'main'
Ondřej Surý [Thu, 31 Aug 2023 20:18:26 +0000 (20:18 +0000)] 
Merge branch 'ondrej-isc_mem_cget' into 'main'

Checked array allocation arithmetic with isc_mem_get and friends

See merge request isc-projects/bind9!8237

2 years agoAdd CHANGES note for [GL !8237]
Ondřej Surý [Wed, 23 Aug 2023 12:46:45 +0000 (14:46 +0200)] 
Add CHANGES note for [GL !8237]

2 years agoRemove ISC_MEM_ZERO and isc_mem_*x() API
Ondřej Surý [Wed, 23 Aug 2023 09:05:14 +0000 (11:05 +0200)] 
Remove ISC_MEM_ZERO and isc_mem_*x() API

Use the new isc_mem_c*() calloc-like API for allocations that are
zeroed.

In turn, this also fixes couple of incorrect usage of the ISC_MEM_ZERO
for structures that need to be zeroed explicitly.

There are few places where isc_mem_cput() is used on structures with a
flexible member (or similar).

2 years agoRemove ISC_MEM_ALIGN() memory flag
Ondřej Surý [Wed, 23 Aug 2023 08:05:30 +0000 (10:05 +0200)] 
Remove ISC_MEM_ALIGN() memory flag

The ISC_MEM_ALIGN() was not used anywhere (except mem.c itself), so just
remove the unused flag.

2 years agoDo extra manual isc_mem_cget() conversions
Ondřej Surý [Wed, 23 Aug 2023 08:00:12 +0000 (10:00 +0200)] 
Do extra manual isc_mem_cget() conversions

Some of the cases weren't caught by the coccinelle and there were some
places where cget+memmove() could get converted to simple creget().

2 years agoApply the isc_mem_cget semantic patch
Ondřej Surý [Wed, 23 Aug 2023 06:56:31 +0000 (08:56 +0200)] 
Apply the isc_mem_cget semantic patch

2 years agoA semantic patch to refactor isc_mem_cget and friends
Tony Finch [Fri, 9 Jun 2023 12:58:41 +0000 (13:58 +0100)] 
A semantic patch to refactor isc_mem_cget and friends

The aim is to match unsafe patterns of allocation size arithmetic
and turn them into safe calls to the new `isc_mem_cget()`,
`isc_mem_creget()`, and `isc_mem_cput()`.

2 years agoChecked array allocation arithmetic with isc_mem_get and friends
Ondřej Surý [Wed, 23 Aug 2023 06:56:22 +0000 (08:56 +0200)] 
Checked array allocation arithmetic with isc_mem_get and friends

Add new isc_mem_cget(), isc_mem_creget(), and isc_mem_cput() macros to
complement the isc_mem_callocate() (which works like calloc()).

The overflow checks are implemented as macros in the <isc/mem.h>, so
that the compiler can see that the element size is constant: it should
always be `sizeof(something)`.

2 years agoMerge branch 'each-cleanup-function-names' into 'main'
Ondřej Surý [Thu, 31 Aug 2023 20:08:13 +0000 (20:08 +0000)] 
Merge branch 'each-cleanup-function-names' into 'main'

remove extra function names

See merge request isc-projects/bind9!8204

2 years agoremove dns_name_totext2() and dns_name_toprincipal()
Evan Hunt [Wed, 16 Aug 2023 01:52:17 +0000 (18:52 -0700)] 
remove dns_name_totext2() and dns_name_toprincipal()

we can pass option flags to dns_name_totext() to get the same
results, and eliminate the extra function names.

2 years agoremove dns_name_towire2()
Evan Hunt [Wed, 16 Aug 2023 00:55:13 +0000 (17:55 -0700)] 
remove dns_name_towire2()

we don't need two versions of dns_name_towire(), we can just add NULL
to the calls that don't need to specify a compression offset.

2 years agoremove dns_name_fromstring2()
Evan Hunt [Wed, 16 Aug 2023 00:41:01 +0000 (17:41 -0700)] 
remove dns_name_fromstring2()

we don't need two versions of dns_name_fromstring() any longer; we
can just specify an origin value of dns_rootname for absolute names.

2 years agoremove cfg_acl_fromconfig2()
Evan Hunt [Wed, 16 Aug 2023 01:07:01 +0000 (18:07 -0700)] 
remove cfg_acl_fromconfig2()

the extra option to limit ACL configuration to only one address family
was no longer in use, and has been removed.

2 years agoMerge branch '4266-document-dnssec-policy-lifetime' into 'main'
Matthijs Mekking [Thu, 31 Aug 2023 16:30:26 +0000 (16:30 +0000)] 
Merge branch '4266-document-dnssec-policy-lifetime' into 'main'

Clarify BIND 9 time formats

Closes #4266

See merge request isc-projects/bind9!8228

2 years agoAdd CHANGES entry for #4266
Matthijs Mekking [Tue, 22 Aug 2023 09:51:25 +0000 (11:51 +0200)] 
Add CHANGES entry for #4266

2 years agoExplain lifetime format
Matthijs Mekking [Tue, 22 Aug 2023 09:49:22 +0000 (11:49 +0200)] 
Explain lifetime format

Add the text "TTL-style unit suffixes or ISO 8601 duration formats",
just like we do at other places that are duration option types.

Also, in the dnssec-policy "keys" example, use a TTL-style unit too.

2 years agoAdd a glossary definition for duration
Matthijs Mekking [Tue, 22 Aug 2023 09:48:37 +0000 (11:48 +0200)] 
Add a glossary definition for duration

We don't yet explain the syntax of TTL-style suffixes or ISO 8601
duration formats.

2 years agoFix keys reference link in ARM
Matthijs Mekking [Tue, 22 Aug 2023 09:45:41 +0000 (11:45 +0200)] 
Fix keys reference link in ARM

There's a statement that says: "Here is an example (for illustration
purposes only) of some possible entries in a [keys] list:", and that
links to the wrong "keys" statement (it links to the TSIG keys section).

Remove the reference, as we are already in the right section.

2 years agoMerge branch 'tt-arm-pkcs11-update' into 'main'
Matthijs Mekking [Thu, 31 Aug 2023 15:42:07 +0000 (15:42 +0000)] 
Merge branch 'tt-arm-pkcs11-update' into 'main'

Update PKCS#11 section in the ARM

See merge request isc-projects/bind9!8258

2 years agoUpdate PKCS#11 section in the ARM
Timo Teräs [Thu, 31 Aug 2023 11:24:15 +0000 (14:24 +0300)] 
Update PKCS#11 section in the ARM

Add instructions for pkcs11-provider and generalize common sections.

2 years agoMerge branch 'mnowak/unify-doc-tools-versions' into 'main'
Michal Nowak [Thu, 31 Aug 2023 12:50:04 +0000 (12:50 +0000)] 
Merge branch 'mnowak/unify-doc-tools-versions' into 'main'

Install Sphinx tools versions from BIND 9 repository

See merge request isc-projects/bind9!8251

2 years agoInstall Sphinx tools versions from BIND 9 repository
Michal Nowak [Tue, 29 Aug 2023 08:44:18 +0000 (10:44 +0200)] 
Install Sphinx tools versions from BIND 9 repository

The doc/arm/requirements.txt file is the single source of truth when it
comes to Sphinx tools versions used to build documentation via
util/release-tarball-comparison.sh.

2 years agoMerge branch 'aram/zone.c-got_transfer_quota-bugfix' into 'main'
Arаm Sаrgsyаn [Thu, 31 Aug 2023 09:41:34 +0000 (09:41 +0000)] 
Merge branch 'aram/zone.c-got_transfer_quota-bugfix' into 'main'

Reset the 'result' before using it again in zone.c:got_transfer_quota()

See merge request isc-projects/bind9!8241

2 years agoUnobfuscate the code-flow logic in got_transfer_quota()
Ondřej Surý [Wed, 23 Aug 2023 14:04:44 +0000 (16:04 +0200)] 
Unobfuscate the code-flow logic in got_transfer_quota()

This refactors the code flow in got_transfer_quota() to not use the
CHECK() macro as it really obfuscates the code flow logic here.

2 years agoReset the 'result' before using it again
Aram Sargsyan [Wed, 23 Aug 2023 11:50:02 +0000 (11:50 +0000)] 
Reset the 'result' before using it again

The 'result' variable should be reset to ISC_R_NOTFOUND again,
because otherwise a log message could be logged about not being
able to get the TLS configuration based on on the 'result' value
from the previous calls to get the TSIG key.

2 years agoMerge branch '4278-rndc-flush-resets-stale-refresh-time-to-0' into 'main'
Matthijs Mekking [Thu, 31 Aug 2023 09:08:52 +0000 (09:08 +0000)] 
Merge branch '4278-rndc-flush-resets-stale-refresh-time-to-0' into 'main'

Restore serve-stale settings after cache flush

Closes #4278

See merge request isc-projects/bind9!8244

2 years agoAdd release note and CHANGES for #4278
Matthijs Mekking [Thu, 24 Aug 2023 09:49:52 +0000 (11:49 +0200)] 
Add release note and CHANGES for #4278

2 years agoAfter cache flush, restore serve-stale settings
Matthijs Mekking [Thu, 24 Aug 2023 09:33:05 +0000 (11:33 +0200)] 
After cache flush, restore serve-stale settings

When flushing the cache, we create a new cache database. The serve-stale
settings need to be restored after doing this. We already did this
for max-stale-ttl, but forgot to do this for stale-refresh-time.

2 years agoAdd serve-stale test settings after flush
Matthijs Mekking [Thu, 24 Aug 2023 09:23:49 +0000 (11:23 +0200)] 
Add serve-stale test settings after flush

Add a test case to ensure that after 'rndc flush', the serve-stale
settings are not reset.

2 years agoMerge branch '4170-extend-expire-opt-support-into-xfrin-c' into 'main'
Mark Andrews [Thu, 31 Aug 2023 08:03:32 +0000 (08:03 +0000)] 
Merge branch '4170-extend-expire-opt-support-into-xfrin-c' into 'main'

Resolve "Extend EXPIRE opt support into xfrin.c"

Closes #4170

See merge request isc-projects/bind9!8064