]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
4 years agoSilence cppcheck possible NULL pointer dereference marka-cppcheck-2-6
Mark Andrews [Fri, 29 Oct 2021 21:28:34 +0000 (08:28 +1100)] 
Silence cppcheck possible NULL pointer dereference

Use isc_region_t instead of isc_textregion_t as ccpcheck marked
tr.base as not initalised.

4 years agoSuppress cppcheck warning
Mark Andrews [Fri, 29 Oct 2021 21:21:02 +0000 (08:21 +1100)] 
Suppress cppcheck warning

Warning "Either the condition '(child)==((void*)0)' is redundant
or there is possible null pointer dereference: child."

Add "cppcheck-suppress nullPointerRedundantCheck symbolName=child"

4 years agoSilence cppcheck reports of function call in sizeof()
Mark Andrews [Fri, 29 Oct 2021 11:30:51 +0000 (22:30 +1100)] 
Silence cppcheck reports of function call in sizeof()

cmocka macros call sizeof() on arguments that are function calls
reimplement to remove warning

4 years agoDeconfuse cppcheck
Mark Andrews [Fri, 29 Oct 2021 08:51:58 +0000 (19:51 +1100)] 
Deconfuse cppcheck

4 years agoRemove dead code
Mark Andrews [Fri, 29 Oct 2021 08:41:18 +0000 (19:41 +1100)] 
Remove dead code

INSIST() is redundent as it is a condition of entry to loop.

4 years agoAddress cppcheck reports regarding function pointer
Mark Andrews [Fri, 29 Oct 2021 08:11:34 +0000 (19:11 +1100)] 
Address cppcheck reports regarding function pointer

cppcheck reports local address being returned with function
pointers that are not deferrenced

e.g.

int
function(int (*action)(int *)) {
int local = 0;

return ((action)(&local));
}

replace with

return ((*action)(&local));

4 years agoisc_result_t is now an enum which are signed, adjust format strings
Mark Andrews [Fri, 29 Oct 2021 05:57:50 +0000 (16:57 +1100)] 
isc_result_t is now an enum which are signed, adjust format strings

4 years ago'task' is reported when uninitalised
Mark Andrews [Fri, 29 Oct 2021 05:57:16 +0000 (16:57 +1100)] 
'task' is reported when uninitalised

move XTRACE to after 'task' is created so that 'task' is valid

4 years agoMerge branch 'artem/tls-do-not-strictly-require-key-and-cert' into 'main'
Artem Boldariev [Sat, 30 Oct 2021 09:13:59 +0000 (09:13 +0000)] 
Merge branch 'artem/tls-do-not-strictly-require-key-and-cert' into 'main'

Be less strict regarding "tls" statements in the configuration file by allowing both "key-file" and "cert-file" be omitted

See merge request isc-projects/bind9!5546

4 years agoBe less strict regarding "tls" statements in the configuration file
Artem Boldariev [Fri, 29 Oct 2021 15:43:40 +0000 (18:43 +0300)] 
Be less strict regarding "tls" statements in the configuration file

In the 9.17.19 release "tls" statements verification code was
added. The code was too strict and assumed that every such a statement
should have both "cert-file" and "key-file" specified. This turned out
to be a regression, as in some cases we plan to use the "tls"
statement to specify TLS connection parameters.

This commit fixes this behaviour; now a "tls" statement should either
have both "cert-file" and "key-file" specified, or both should be
omitted.

4 years agoMerge branch 'pspacek/reentrant-cleanup' into 'main'
Petr Špaček [Fri, 29 Oct 2021 07:09:20 +0000 (07:09 +0000)] 
Merge branch 'pspacek/reentrant-cleanup' into 'main'

remove last remaining reference to _REENTRANT macro and fix DLZ example

See merge request isc-projects/bind9!5544

4 years agoremove last remaining reference to _REENTRANT macro and fix DLZ example
Petr Špaček [Thu, 28 Oct 2021 12:26:09 +0000 (14:26 +0200)] 
remove last remaining reference to _REENTRANT macro and fix DLZ example

It was used only as guard against unused variable declaration, but the
surrounding code depends on strtok_r being defined unconditionally, so
there is no point in guarding a variable.
Glibc documentation suggests it is obsolete anyway and e.g. Meson build
system decided to ignore it. It seems to be required only by old
Solaris compiler and OpenIndiana uses gcc.

4 years agoMerge branch 'pspacek/clang-format-gen-patch' into 'main'
Petr Špaček [Fri, 29 Oct 2021 07:07:09 +0000 (07:07 +0000)] 
Merge branch 'pspacek/clang-format-gen-patch' into 'main'

retain diff output if clang-format changes something

See merge request isc-projects/bind9!5543

4 years agoretain diff output if clang-format changes something
Petr Špaček [Thu, 28 Oct 2021 14:39:20 +0000 (16:39 +0200)] 
retain diff output if clang-format changes something

It's major PITA trying to guess what exactly clang-format has changed,
so how CI stores patch file with changes which can be applied locally if
needed.

4 years agoMerge branch 'pspacek/placeholder' into 'main'
Petr Špaček [Thu, 28 Oct 2021 14:12:01 +0000 (14:12 +0000)] 
Merge branch 'pspacek/placeholder' into 'main'

Add placeholder for [GL !332P]

See merge request isc-projects/bind9!5542

4 years agoAdd placeholder for [GL !332P]
Petr Špaček [Thu, 28 Oct 2021 13:58:38 +0000 (15:58 +0200)] 
Add placeholder for [GL !332P]

4 years agoMerge branch 'michal/disable-pylint-warning-C0209' into 'main'
Michał Kępień [Thu, 28 Oct 2021 13:37:37 +0000 (13:37 +0000)] 
Merge branch 'michal/disable-pylint-warning-C0209' into 'main'

Disable PyLint warning C0209

See merge request isc-projects/bind9!5538

4 years agoDisable PyLint warning C0209
Michał Kępień [Thu, 28 Oct 2021 12:03:04 +0000 (14:03 +0200)] 
Disable PyLint warning C0209

PyLint 2.11 reports a new warning, C0209 (consider-using-f-string).
Since f-strings are only available in Python 3.6+, existing scripts
cannot be updated to use this feature just yet because they would stop
working with older Python versions.  Instead, disable PyLint warning
C0209 for the time being.  Sort all disabled warnings in .pylintrc.

4 years agoMerge branch 'v9_17_19-release' into 'main'
Michał Kępień [Thu, 28 Oct 2021 10:10:20 +0000 (10:10 +0000)] 
Merge branch 'v9_17_19-release' into 'main'

Merge 9.17.19 release branch

See merge request isc-projects/bind9!5535

4 years agoMove CHANGES entry for GL #2308
Michał Kępień [Thu, 28 Oct 2021 10:05:58 +0000 (12:05 +0200)] 
Move CHANGES entry for GL #2308

GL #2308 was originally referenced by CHANGES entry 5727.  However, the
corresponding code change turned out to be flawed and had to be reverted
in BIND 9.17.19, causing CHANGES entry 5727 to be turned into a
placeholder on the release branch.

Commit 63145fb1d328eb66f9c786d2273bc2e3f6a3ecf5 subsequently addressed
the flaw, so the fix for GL #2308 will be included in BIND 9.17.20.
Move the relevant CHANGES entry to reflect that.

4 years agoSet up release notes for BIND 9.17.20
Michał Kępień [Thu, 28 Oct 2021 10:05:58 +0000 (12:05 +0200)] 
Set up release notes for BIND 9.17.20

4 years agoUpdate BIND version to 9.17.19
Michał Kępień [Mon, 11 Oct 2021 13:27:49 +0000 (15:27 +0200)] 
Update BIND version to 9.17.19

4 years agoAdd a CHANGES marker
Michał Kępień [Mon, 11 Oct 2021 13:27:49 +0000 (15:27 +0200)] 
Add a CHANGES marker

4 years agoMerge branch 'michal/prepare-documentation-for-bind-9.17.19' into 'security-main'
Michał Kępień [Mon, 11 Oct 2021 13:26:44 +0000 (13:26 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.17.19' into 'security-main'

Prepare documentation for BIND 9.17.19

See merge request isc-private/bind9!325

4 years agoMerge branch '2899-security-disable-lame-cache' into 'security-main'
Michał Kępień [Mon, 11 Oct 2021 12:07:41 +0000 (12:07 +0000)] 
Merge branch '2899-security-disable-lame-cache' into 'security-main'

[CVE-2021-25219] Disable "lame-ttl" cache

See merge request isc-private/bind9!322

4 years agoPrepare release notes for BIND 9.17.19
Michał Kępień [Mon, 11 Oct 2021 12:39:06 +0000 (14:39 +0200)] 
Prepare release notes for BIND 9.17.19

4 years agoAdd CHANGES and release note for [GL #2899]
Ondřej Surý [Fri, 24 Sep 2021 07:58:47 +0000 (09:58 +0200)] 
Add CHANGES and release note for [GL #2899]

4 years agoAdd release note for GL #2911
Michał Kępień [Mon, 11 Oct 2021 12:39:06 +0000 (14:39 +0200)] 
Add release note for GL #2911

4 years agoEnable lame response detection even with disabled lame cache
Ondřej Surý [Fri, 24 Sep 2021 07:48:50 +0000 (09:48 +0200)] 
Enable lame response detection even with disabled lame cache

Previously, when lame cache would be disabled by setting lame-ttl to 0,
it would also disable lame answer detection.  In this commit, we enable
the lame response detection even when the lame cache is disabled.  This
enables stopping answer processing early rather than going through the
whole answer processing flow.

4 years agoReorder release notes
Michał Kępień [Mon, 11 Oct 2021 12:39:06 +0000 (14:39 +0200)] 
Reorder release notes

4 years agoDisable lame-ttl cache
Ondřej Surý [Fri, 24 Sep 2021 07:35:11 +0000 (09:35 +0200)] 
Disable lame-ttl cache

The lame-ttl cache is implemented in ADB as per-server locked
linked-list "indexed" with <qname,qtype>.  This list has to be walked
every time there's a new query or new record added into the lame cache.
Determined attacker can use this to degrade performance of the resolver.

Resolver testing has shown that disabling the lame cache has little
impact on the resolver performance and it's a minimal viable defense
against this kind of attack.

4 years agoTweak and reword release notes
Michał Kępień [Mon, 11 Oct 2021 12:39:06 +0000 (14:39 +0200)] 
Tweak and reword release notes

4 years agoTweak and reword recent CHANGES entries
Michał Kępień [Mon, 11 Oct 2021 12:39:06 +0000 (14:39 +0200)] 
Tweak and reword recent CHANGES entries

4 years agoMinor tweaks to PKCS#11 docs and ARM formatting
Michał Kępień [Mon, 11 Oct 2021 12:39:06 +0000 (14:39 +0200)] 
Minor tweaks to PKCS#11 docs and ARM formatting

Explain more clearly what engine_pkcs11 is.  Fix improperly rendered
pre-formatted text.

4 years agoUpdate release checklist
Michał Kępień [Mon, 11 Oct 2021 12:39:06 +0000 (14:39 +0200)] 
Update release checklist

4 years agoMerge branch '2843-openssl-3-deprecations' into 'main'
Arаm Sаrgsyаn [Thu, 28 Oct 2021 09:42:42 +0000 (09:42 +0000)] 
Merge branch '2843-openssl-3-deprecations' into 'main'

Refactoring for OpenSSL 3.0.0 support

Closes #2843

See merge request isc-projects/bind9!5385

4 years agoAdd release note for [GL #2843]
Mark Andrews [Mon, 11 Oct 2021 01:52:46 +0000 (12:52 +1100)] 
Add release note for [GL #2843]

4 years agoAdd CHANGES note for [GL #2843]
Mark Andrews [Fri, 8 Oct 2021 06:43:57 +0000 (17:43 +1100)] 
Add CHANGES note for [GL #2843]

4 years agoThe OpenSSL engine API is deprecated in OpenSSL 3.0.0
Mark Andrews [Fri, 8 Oct 2021 01:10:56 +0000 (12:10 +1100)] 
The OpenSSL engine API is deprecated in OpenSSL 3.0.0

don't use the engine API unless the OpenSSL API is less
than 3.0.0 (OPENSSL_API_LEVEL < 30000)

4 years agoUse OpenSSL version macro instead of function check
Aram Sargsyan [Wed, 6 Oct 2021 14:18:49 +0000 (14:18 +0000)] 
Use OpenSSL version macro instead of function check

Unless being configured with the `no-deprecated` option, OpenSSL 3.0.0
still has the deprecated APIs present and will throw warnings during
compilation, when using them.

Make sure that the old APIs are being used only with the older versions
of OpenSSL.

4 years agoRefactor the OpenSSL DH usage to use newer APIs
Aram Sargsyan [Tue, 5 Oct 2021 09:11:33 +0000 (09:11 +0000)] 
Refactor the OpenSSL DH usage to use newer APIs

OpenSSL 3 deprecates most of the DH* family and associated APIs.

Reimplement the existing functionality using a newer set of APIs
which will be used when compiling/linking with OpenSSL 3.0.0 or newer
versions.

4 years agoUse the special shims file for DH shims
Aram Sargsyan [Mon, 4 Oct 2021 16:51:02 +0000 (16:51 +0000)] 
Use the special shims file for DH shims

Since we now have a separate `openssl_shim.{c,h}` files in the `dns`
library, we can place the exisintg shims there.

4 years agoRefactor the OpenSSL RSA usage to use newer APIs
Aram Sargsyan [Tue, 28 Sep 2021 08:09:39 +0000 (08:09 +0000)] 
Refactor the OpenSSL RSA usage to use newer APIs

OpenSSL 3 deprecates most of the RSA* family and associated APIs.

Reimplement the existing functionality using a newer set of APIs
which will be used when compiling/linking with OpenSSL 3.0.0 or newer
versions.

4 years agoUse the special shims file for RSA shims
Aram Sargsyan [Sun, 26 Sep 2021 18:53:38 +0000 (18:53 +0000)] 
Use the special shims file for RSA shims

Since we now have a separate `openssl_shim.{c,h}` files in the `dns`
library, we can place the exisintg shims there.

4 years agoRefactor the OpenSSL ECDSA usage to use newer APIs
Aram Sargsyan [Mon, 20 Sep 2021 15:15:14 +0000 (15:15 +0000)] 
Refactor the OpenSSL ECDSA usage to use newer APIs

OpenSSL 3 deprecates most of the EC* family and associated APIs.

Reimplement the existing functionality using a newer set of APIs
which will be used when compiling/linking with OpenSSL 3.0.0 or newer
versions.

4 years agoUse the special shims file for ECDSA shims
Aram Sargsyan [Tue, 14 Sep 2021 14:59:18 +0000 (14:59 +0000)] 
Use the special shims file for ECDSA shims

Since we now have a separate `openssl_shim.{c,h}` files in the `dns`
library, we can place the exisintg shims there.

4 years agoUse EVP_PKEY_eq() instead of deprected EVP_PKEY_cmp()
Mark Andrews [Wed, 8 Sep 2021 06:31:56 +0000 (16:31 +1000)] 
Use EVP_PKEY_eq() instead of deprected EVP_PKEY_cmp()

EVP_PKEY_eq() is the replacement with a smaller result range (0, 1)
instead of (-1, 0, 1).  EVP_PKEY_cmp() is mapped to EVP_PKEY_eq() when
building with older versions of OpenSSL.

4 years agoUse EVP_RSA_gen() if available
Mark Andrews [Tue, 7 Sep 2021 03:25:45 +0000 (13:25 +1000)] 
Use EVP_RSA_gen() if available

BN and other low level functions are deprecated in OpenSSL 3.0.0
the is one of the replacement methods for generating RSA keys.

4 years agoRefactor the OpenSSL HMAC usage to use newer APIs
Aram Sargsyan [Wed, 1 Sep 2021 19:07:58 +0000 (19:07 +0000)] 
Refactor the OpenSSL HMAC usage to use newer APIs

OpenSSL 3 deprecates the HMAC* family and associated APIs.

Rewrite portions of OpenSSL library usage code to use a newer
set of HMAC APIs.

4 years agoUse thinner shims for OpenSSL's EVP_MD_CTX_new() and EVP_MD_CTX_free()
Aram Sargsyan [Sat, 4 Sep 2021 18:33:25 +0000 (18:33 +0000)] 
Use thinner shims for OpenSSL's EVP_MD_CTX_new() and EVP_MD_CTX_free()

The EVP_MD_CTX_new() and EVP_MD_CTX_free() functions are renamed APIs
which were previously available as EVP_MD_CTX_create() and
EVP_MD_CTX_destroy() respectively, which means that we can use them
instead of providing our own shim functions.

4 years agoUse ERR_get_error_all() instead of deprecated ERR_get_error_line_data()
Aram Sargsyan [Sun, 5 Sep 2021 09:41:00 +0000 (09:41 +0000)] 
Use ERR_get_error_all() instead of deprecated ERR_get_error_line_data()

OpenSSL 3.0.0 deprecates the ERR_get_error_line_data() function.

Use ERR_get_error_all() instead of ERR_get_error_line_data() and create
a shim to use the old variant for the older OpenSSL versions which don't
have the newer ERR_get_error_all().

4 years agoUse EVP_MD_CTX_get0_md() instead of deprecated EVP_MD_CTX_md()
Aram Sargsyan [Wed, 1 Sep 2021 18:50:46 +0000 (18:50 +0000)] 
Use EVP_MD_CTX_get0_md() instead of deprecated EVP_MD_CTX_md()

OpenSSL 3.0.0 deprecates the EVP_MD_CTX_md() function.

Use EVP_MD_CTX_md() instead of EVP_MD_CTX_get0_md() and create a shim
to use the old variant for the older OpenSSL versions which don't have
the newer EVP_MD_CTX_get0_md().

4 years agoMake the configure.ac script compatible with OpenSSL 3.0.0
Aram Sargsyan [Wed, 1 Sep 2021 13:13:24 +0000 (13:13 +0000)] 
Make the configure.ac script compatible with OpenSSL 3.0.0

OpenSSL 3.0.0 deprecates many low level API functions.

In preparation for the future support of linking BIND with OpenSSL 3.0.0
without the deprecated API functions, change the configure.ac script to
use functions which are available on all supported versions of OpenSSL
and LibreSSL.

4 years agoMerge branch '2972-rsa-keys-compare-typo-bug' into 'main'
Arаm Sаrgsyаn [Thu, 28 Oct 2021 07:31:13 +0000 (07:31 +0000)] 
Merge branch '2972-rsa-keys-compare-typo-bug' into 'main'

Fix a bug when comparing two RSA keys

Closes #2972

See merge request isc-projects/bind9!5529

4 years agoAdd dst_key_pubcompare and dst_key_compare unit test
Aram Sargsyan [Wed, 27 Oct 2021 19:52:05 +0000 (19:52 +0000)] 
Add dst_key_pubcompare and dst_key_compare unit test

The dst_key_pubcompare() and dst_key_compare() didn't have a unit test,
add the unit tests which test comparing the same keys, different keys,
and, where possible, similar keys with a manually altered parameter.

dst_key_pubcompare() internally uses the *_todns() functions of the
lib/dns/openssl*_link.c modules.

dst_key_compare() internally uses the *_compare() functions of the
lib/dns/openssl*_link.c modules.

4 years agoAdd CHANGES note for [GL #2972]
Aram Sargsyan [Fri, 22 Oct 2021 13:38:45 +0000 (13:38 +0000)] 
Add CHANGES note for [GL #2972]

4 years agoFix a bug when comparing two RSA keys
Aram Sargsyan [Sat, 25 Sep 2021 14:03:27 +0000 (14:03 +0000)] 
Fix a bug when comparing two RSA keys

When comparing different parameters of two RSA keys there is a typo
which causes the "p" prime factors to not being compared.

Fix the typo.

4 years agoMerge branch '2916-duplicate-catalog-zones-is-fatal' into 'main'
Mark Andrews [Tue, 26 Oct 2021 14:54:03 +0000 (14:54 +0000)] 
Merge branch '2916-duplicate-catalog-zones-is-fatal' into 'main'

Resolve "duplicate catalog-zones is fatal"

Closes #2916

See merge request isc-projects/bind9!5432

4 years agoAdd CHANGES note for [GL #2916]
Mark Andrews [Wed, 22 Sep 2021 05:29:58 +0000 (15:29 +1000)] 
Add CHANGES note for [GL #2916]

4 years agoHandle duplicate catalog zone entries gracefully
Mark Andrews [Wed, 22 Sep 2021 05:21:45 +0000 (15:21 +1000)] 
Handle duplicate catalog zone entries gracefully

Duplicate catalog zone entries caused an assertion failure
in named during configuration.  This is now a soft error
that is detected earlier by named and also by named-checkconf.

4 years agoMerge branch '1542-silent-failure-of-build-when-creating-a-new-rr-type-if-code-is...
Mark Andrews [Mon, 25 Oct 2021 21:52:34 +0000 (21:52 +0000)] 
Merge branch '1542-silent-failure-of-build-when-creating-a-new-rr-type-if-code-is-out-of-range' into 'main'

Resolve "Silent failure of build when creating a new RR Type if CODE is out of range"

Closes #1542

See merge request isc-projects/bind9!2895

4 years agoDocument typenumber and classnumber format
Matthijs Mekking [Thu, 21 Oct 2021 13:22:57 +0000 (15:22 +0200)] 
Document typenumber and classnumber format

Document the typenumber and classnumber in doc/dev/rdata so that it
is clear what the expected format is.

4 years agoError out if gen finds a type or class that is greater than 65535
Mark Andrews [Wed, 15 Jan 2020 02:54:05 +0000 (13:54 +1100)] 
Error out if gen finds a type or class that is greater than 65535

4 years agoMerge branch '2956-nsec3param-no-salt-n-pepa' into 'main'
Matthijs Mekking [Mon, 25 Oct 2021 10:08:30 +0000 (10:08 +0000)] 
Merge branch '2956-nsec3param-no-salt-n-pepa' into 'main'

Change nsec3param default to iter 0 salt-length 0

Closes #2956

See merge request isc-projects/bind9!5513

4 years agoAdd release note and CHANGES for #2956
Matthijs Mekking [Thu, 21 Oct 2021 08:12:21 +0000 (10:12 +0200)] 
Add release note and CHANGES for #2956

Feature change.

4 years agoUpdate tests to match new nsec3param default
Matthijs Mekking [Wed, 20 Oct 2021 14:38:37 +0000 (16:38 +0200)] 
Update tests to match new nsec3param default

Update the nsec3 system tests to use the new default values. Change
the policy for "nsec3-other" so that we still have a test case for
non-zero salt length.

4 years agoChange nsec3param default to iter 0 salt-length 0
Matthijs Mekking [Wed, 20 Oct 2021 14:36:11 +0000 (16:36 +0200)] 
Change nsec3param default to iter 0 salt-length 0

When using 'nsec3param' in 'dnssec-policy' and no specific parameters
are provided, default to zero additional iterations and no salt, as
recommended by draft-ietf-dnsop-nsec3-guidance.

4 years agoMerge branch '2742-serve-stale-is-confusing' into 'main'
Matthijs Mekking [Mon, 25 Oct 2021 09:26:33 +0000 (09:26 +0000)] 
Merge branch '2742-serve-stale-is-confusing' into 'main'

Update rndc serve-stale status output

Closes #2742

See merge request isc-projects/bind9!5521

4 years agoAdd release note and CHANGES for #2742
Matthijs Mekking [Thu, 21 Oct 2021 14:48:38 +0000 (16:48 +0200)] 
Add release note and CHANGES for #2742

Feature change.

4 years agoUpdate rndc serve-stale status output
Matthijs Mekking [Thu, 21 Oct 2021 14:46:15 +0000 (16:46 +0200)] 
Update rndc serve-stale status output

Explicitly show if cache is enabled or disabled, and if answering stale
data is enabled or disabled.

4 years agoMerge branch '2458-run-asan-and-tsan-with-latest-stable-gcc' into 'main'
Michal Nowak [Fri, 22 Oct 2021 13:13:30 +0000 (13:13 +0000)] 
Merge branch '2458-run-asan-and-tsan-with-latest-stable-gcc' into 'main'

Use Fedora image for ASAN and TSAN CI jobs; drop TSan suppressions

Closes #2458

See merge request isc-projects/bind9!4709

4 years agoDrop GCC ThreadSanitizer suppresion of fstrm-originated calls
Michal Nowak [Wed, 20 Oct 2021 17:47:17 +0000 (19:47 +0200)] 
Drop GCC ThreadSanitizer suppresion of fstrm-originated calls

With custom fstrm library in the Fedora image which uses mutexes instead
of barriers ThreadSanitizer suppression with GCC is not necessary
anymore.

4 years agoRename ASAN_OPTIONS_COMMON to ASAN_OPTIONS
Michal Nowak [Wed, 20 Oct 2021 14:06:45 +0000 (16:06 +0200)] 
Rename ASAN_OPTIONS_COMMON to ASAN_OPTIONS

Renaming the variable removes some of the complexity.

4 years agoUse Fedora image for GCC ASAN and TSAN CI jobs
Michal Nowak [Thu, 18 Feb 2021 15:19:57 +0000 (16:19 +0100)] 
Use Fedora image for GCC ASAN and TSAN CI jobs

For the sake of running ASAN and TSAN jobs with the latest stable GCC,
replace "base image" (Debian Buster with GCC 8.3.0) with Fedora 34 image
with GCC 11.

4 years agoMerge branch 'mnowak/debian-11-bullseye' into 'main'
Michal Nowak [Fri, 22 Oct 2021 08:33:39 +0000 (08:33 +0000)] 
Merge branch 'mnowak/debian-11-bullseye' into 'main'

Add Debian 11 (bullseye)

See merge request isc-projects/bind9!5330

4 years agoDo not spawn Debian 9 CI jobs in merge requests
Michal Nowak [Thu, 21 Oct 2021 11:43:42 +0000 (13:43 +0200)] 
Do not spawn Debian 9 CI jobs in merge requests

4 years agoAdd Debian 11 (bullseye)
Michal Nowak [Tue, 17 Aug 2021 08:38:14 +0000 (10:38 +0200)] 
Add Debian 11 (bullseye)

4 years agoMerge branch 'mnowak/openbsd-7.0' into 'main'
Michal Nowak [Fri, 22 Oct 2021 07:38:06 +0000 (07:38 +0000)] 
Merge branch 'mnowak/openbsd-7.0' into 'main'

Add OpenBSD 7.0

See merge request isc-projects/bind9!5519

4 years agoAdd OpenBSD 7.0
Michal Nowak [Thu, 21 Oct 2021 09:48:21 +0000 (11:48 +0200)] 
Add OpenBSD 7.0

4 years agoMerge branch '2966-logfileconfig-system-test-is-timing-sensitive' into 'main'
Mark Andrews [Thu, 21 Oct 2021 20:46:12 +0000 (20:46 +0000)] 
Merge branch '2966-logfileconfig-system-test-is-timing-sensitive' into 'main'

Resolve "logfileconfig system test is timing sensitive"

Closes #2966

See merge request isc-projects/bind9!5516

4 years agoAccept either 2 or 3 old versions of log file
Mark Andrews [Thu, 21 Oct 2021 06:22:58 +0000 (17:22 +1100)] 
Accept either 2 or 3 old versions of log file

Depending upon when the directory is sampled there may be 2
(oldest version removed and rename / reopen is in progresss) or
3 old versions of the log file.

4 years agoMerge branch 'ondrej/fix-missing-DNS_ZONEFLG_DUMPING-in-setmodtime' into 'main'
Ondřej Surý [Thu, 21 Oct 2021 10:33:03 +0000 (10:33 +0000)] 
Merge branch 'ondrej/fix-missing-DNS_ZONEFLG_DUMPING-in-setmodtime' into 'main'

Add missing DNS_ZONEFLG_DUMPING to setmodtime()

See merge request isc-projects/bind9!5512

4 years agoAdd missing DNS_ZONEFLG_DUMPING to setmodtime()
Ondřej Surý [Wed, 20 Oct 2021 11:01:13 +0000 (13:01 +0200)] 
Add missing DNS_ZONEFLG_DUMPING to setmodtime()

It was found, that the original commit adding the setmodtime() was
incompletely squashed and there was double check for
DNS_ZONEFLG_NEEDDUMP instead of check for DNS_ZONEFLG_NEEDDUMP and
DNS_ZONEFLG_DUMPING.

Change the duplicate check to DNS_ZONEFLG_DUMPING.

4 years agoMerge branch '2927-lame-server-loop' into 'main'
Evan Hunt [Thu, 21 Oct 2021 09:26:44 +0000 (09:26 +0000)] 
Merge branch '2927-lame-server-loop' into 'main'

check for loops in ADB finds

Closes #2927

See merge request isc-projects/bind9!5474

4 years agoCHANGES and release note for [GL #2927]
Evan Hunt [Tue, 19 Oct 2021 06:20:32 +0000 (23:20 -0700)] 
CHANGES and release note for [GL #2927]

4 years agoadd a system test with an ADB loop
Evan Hunt [Tue, 19 Oct 2021 06:14:28 +0000 (23:14 -0700)] 
add a system test with an ADB loop

Add a lame delegation to lame.example.org with only an A record
in the additional section; on failure, this will trigger a retry
with AAAA, which will loop. Test that dig returns SERVFAIL, in
addition to confirming that named doesn't hang on shutdown.

4 years agocheck for loops in ADB finds
Evan Hunt [Wed, 6 Oct 2021 20:42:09 +0000 (13:42 -0700)] 
check for loops in ADB finds

If an ADB find is started on behalf of a resolver fetch, and fails to
find any addresses but has a pending resolver fetch associated with it,
then we need to check whether the fetch it's waiting on is the one
that created it. If so, it can never finish and needs to be terminated.

4 years agoincidental cleanup
Evan Hunt [Tue, 19 Oct 2021 00:57:58 +0000 (17:57 -0700)] 
incidental cleanup

The NAME_FETCH_A and NAME_FETCH_AAAA macros were meant to be
boolean, indicating whether the pointers were set or not, while
the NAME_FETCH_V4 and NAME_FETCH_V6 macros were meant to return
the pointer values. The latter were only used as booleans, so
they've been removed in favor of the former.

Also did some style cleanup and removed an unreachable code block.

4 years agoMerge branch '2963-gettcp-assert' into 'main'
Evan Hunt [Thu, 21 Oct 2021 08:39:03 +0000 (08:39 +0000)] 
Merge branch '2963-gettcp-assert' into 'main'

don't set DNS_DISPATCHSTATE_CONNECTED until attaching handle

Closes #2963

See merge request isc-projects/bind9!5515

4 years agodon't set DNS_DISPATCHSTATE_CONNECTED until attaching handle
Evan Hunt [Wed, 20 Oct 2021 18:39:13 +0000 (11:39 -0700)] 
don't set DNS_DISPATCHSTATE_CONNECTED until attaching handle

there was a race possible in which a dispatch was put into
the 'connected' state before it had a TCP handle attached,
which could cause an assertion failure in dns_dispatch_gettcp().

4 years agoMerge branch 'ondrej/fix-isc_time_add-overflow' into 'main'
Ondřej Surý [Thu, 21 Oct 2021 07:50:50 +0000 (07:50 +0000)] 
Merge branch 'ondrej/fix-isc_time_add-overflow' into 'main'

Fix isc_time_add() overflow

See merge request isc-projects/bind9!5511

4 years agoAdd isc_time_add and isc_time_subtract unit test
Ondřej Surý [Wed, 20 Oct 2021 10:06:09 +0000 (12:06 +0200)] 
Add isc_time_add and isc_time_subtract unit test

The isc_time_add() and isc_time_subtract() didn't have a unit test, add
the unit test with couple of edge case vectors to check whether overflow
and underflow is correctly handled.

4 years agoUse __builtin_*_overflow for isc_time_{add,subtract}()
Ondřej Surý [Wed, 20 Oct 2021 09:22:52 +0000 (11:22 +0200)] 
Use __builtin_*_overflow for isc_time_{add,subtract}()

Use the __builtin_uadd_overflow() and __builtin_usub_overflow() for
overflow checks in isc_time_add() and isc_time_subtract().  This
generates more efficient and safe code.

4 years agoFix isc_time_add() overflow
Ondřej Surý [Wed, 20 Oct 2021 09:22:52 +0000 (11:22 +0200)] 
Fix isc_time_add() overflow

The isc_time_add() could overflow when t.seconds + i.seconds == UINT_MAX
and t.nanoseconds + i.nanoseconds >= NS_PER_S.

Fix the overflow in isc_time_add(), and simplify the ISC_R_RANGE checks
both in isc_time_add() and isc_time_subtract() functions.

4 years agoMerge branch '2944-doth-system-test-fails-with-256-file-descriptors' into 'main'
Mark Andrews [Wed, 20 Oct 2021 20:45:17 +0000 (20:45 +0000)] 
Merge branch '2944-doth-system-test-fails-with-256-file-descriptors' into 'main'

Resolve "doth system test fails with 256 file descriptors"

Closes #2944

See merge request isc-projects/bind9!5477

4 years agoIncrease the number of file descriptors for stress_http_quota.py
Mark Andrews [Fri, 8 Oct 2021 01:57:24 +0000 (12:57 +1100)] 
Increase the number of file descriptors for stress_http_quota.py

stress_http_quota.py uses more than 256 file descriptors and fails
on some platforms.  Increase the available descriptors to 1024.

4 years agoMerge branch 'each-cleanup-qmin-test' into 'main'
Evan Hunt [Wed, 20 Oct 2021 06:30:05 +0000 (06:30 +0000)] 
Merge branch 'each-cleanup-qmin-test' into 'main'

fix qmin system test

See merge request isc-projects/bind9!5509

4 years agofix qmin system test
Evan Hunt [Tue, 19 Oct 2021 18:34:52 +0000 (11:34 -0700)] 
fix qmin system test

The qmin system test was printing spurious output.  On investigation,
the test case turned out to be both broken and ineffective: its
expectations were wrong, and it was printing the output because its
wrong expectations were not met, and those failed expectations were
not causing a test failure. All of this has been corrected.

4 years agoMerge branch 'compat/main/arm-sphinx' into 'main'
Michał Kępień [Tue, 19 Oct 2021 11:46:47 +0000 (11:46 +0000)] 
Merge branch 'compat/main/arm-sphinx' into 'main'

Make backward compatibility for older python-sphinx

See merge request isc-projects/bind9!5501

4 years agoEnable building documentation with Sphinx < 2.0.0
Petr Mensik [Fri, 15 Oct 2021 20:07:53 +0000 (22:07 +0200)] 
Enable building documentation with Sphinx < 2.0.0

The ReferenceRole class is only available in Sphinx >= 2.0.0, which
makes building BIND 9 documentation impossible with older Sphinx
versions:

    Running Sphinx v1.7.6

    Configuration error:
    There is a programable error in your configuration file:

    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/sphinx/config.py", line 161, in __init__
        execfile_(filename, config)
      File "/usr/lib/python3.6/site-packages/sphinx/util/pycompat.py", line 150, in execfile_
        exec_(code, _globals)
      File "conf.py", line 21, in <module>
        from sphinx.util.docutils import ReferenceRole
    ImportError: cannot import name 'ReferenceRole'

Work around the problem by defining a stub version of the ReferenceRole
class if the latter cannot be imported.  This allows documentation
(without GitLab hyperlinks in release notes) to be built with older
Sphinx versions.