]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 years agoDon't perform arithmetic on NULL pointers
Mark Andrews [Tue, 10 Jan 2023 06:15:09 +0000 (17:15 +1100)] 
Don't perform arithmetic on NULL pointers

When node is NULL when calling getparent() et al. they return NULL
but performing arithmetic on the NULL pointer is undefined.  Check
if 'node' or 'header' is NULL and skip the adjustment.

3 years agoMerge branch '3678-serve-stale-servfailing-unexpectedly-v9_16' into 'v9_16'
Matthijs Mekking [Mon, 9 Jan 2023 13:31:24 +0000 (13:31 +0000)] 
Merge branch '3678-serve-stale-servfailing-unexpectedly-v9_16' into 'v9_16'

[9.16] Add serve-stale CNAME check with stale-answer-client-timeout off

See merge request isc-projects/bind9!7311

3 years agoCheck for NULL before dereferencing qctx->rpz_st
Michał Kępień [Mon, 13 Jun 2022 12:03:16 +0000 (14:03 +0200)] 
Check for NULL before dereferencing qctx->rpz_st

Commit 9ffb4a7ba11fae64a6ce2dd6390cd334372b7ab7 causes Clang Static
Analyzer to flag a potential NULL dereference in query_nxdomain():

    query.c:9394:26: warning: Dereference of null pointer [core.NullDereference]
            if (!qctx->nxrewrite || qctx->rpz_st->m.rpz->addsoa) {
                                    ^~~~~~~~~~~~~~~~~~~
    1 warning generated.

The warning above is for qctx->rpz_st potentially being a NULL pointer
when query_nxdomain() is called from query_resume().  This is a false
positive because none of the database lookup result codes currently
causing query_nxdomain() to be called (DNS_R_EMPTYWILD, DNS_R_NXDOMAIN)
can be returned by a database lookup following a recursive resolution
attempt.  Add a NULL check nevertheless in order to future-proof the
code and silence Clang Static Analyzer.

(cherry picked from commit 07592d1315412c38c978e8d009aace5d0f5bef93)
(cherry picked from commit a4547a109324fff1bdd21032c5c7d8fdeb0e4ad8)

3 years agoAdd a CHANGES note for [GL #3678]
Aram Sargsyan [Thu, 17 Nov 2022 14:21:31 +0000 (14:21 +0000)] 
Add a CHANGES note for [GL #3678]

(cherry picked from commit 40dee61a1e6c3be351b70fe4a99fbcf0f8a741db)

3 years agoConsider non-stale data when in serve-stale mode
Matthijs Mekking [Thu, 17 Nov 2022 13:52:26 +0000 (13:52 +0000)] 
Consider non-stale data when in serve-stale mode

With 'stale-answer-enable yes;' and 'stale-answer-client-timeout off;',
consider the following situation:

A CNAME record and its target record are in the cache, then the CNAME
record expires, but the target record is still valid.

When a new query for the CNAME record arrives, and the query fails,
the stale record is used, and then the query "restarts" to follow
the CNAME target. The problem is that the query's multiple stale
options (like DNS_DBFIND_STALEOK) are not reset, so 'query_lookup()'
treats the restarted query as a lookup following a failed lookup,
and returns a SERVFAIL answer when there is no stale data found in the
cache, even if there is valid non-stale data there available.

With this change, query_lookup() now considers non-stale data in the
cache in the first place, and returns it if it is available.

(cherry picked from commit 91a1a8efc5bca44ff3aa6861c31759449ea65ecd)

3 years agoAdd serve-stale CNAME check with stale-answer-client-timeout off
Aram Sargsyan [Thu, 17 Nov 2022 13:48:36 +0000 (13:48 +0000)] 
Add serve-stale CNAME check with stale-answer-client-timeout off

Prime the cache with the following records:

    shortttl.cname.example. 1 IN CNAME longttl.target.example.
    longttl.target.example. 600 IN A 10.53.0.2

Wait for the CNAME record to expire, disable the authoritative server,
and query 'shortttl.cname.example' again, expecting a stale answer.

(cherry picked from commit 537187bf2f1a1c402d862bbb105da5947b18d217)

3 years agoMerge branch '3745-delzone-catz-v9_16' into 'v9_16'
Tony Finch [Wed, 4 Jan 2023 19:32:40 +0000 (19:32 +0000)] 
Merge branch '3745-delzone-catz-v9_16' into 'v9_16'

[9.16] Don't crash when rndc delzone encounters a catz member

See merge request isc-projects/bind9!7298

3 years agoDon't crash when rndc delzone encounters a catz member
Tony Finch [Wed, 14 Dec 2022 16:24:19 +0000 (16:24 +0000)] 
Don't crash when rndc delzone encounters a catz member

Try to remove the zone from the NZF config only if it was
dynamically added but not by a catalog zone.

(cherry picked from commit 9fa20d6f6c1d978fa6a8f79fa19d0dd71c0ca4eb)

3 years agoMerge branch 'michal/update-copyright-year-to-2023-v9_16' into 'v9_16'
Michał Kępień [Mon, 2 Jan 2023 13:30:04 +0000 (13:30 +0000)] 
Merge branch 'michal/update-copyright-year-to-2023-v9_16' into 'v9_16'

[9.16] Update copyright year to 2023

See merge request isc-projects/bind9!7284

3 years agoUpdate copyright year to 2023
Michał Kępień [Mon, 2 Jan 2023 12:58:00 +0000 (13:58 +0100)] 
Update copyright year to 2023

(cherry picked from commit 1a5d707f52282117c9912a27dcc89f2ec412577a)

3 years agoMerge branch 'tkrizek/default-alg-9.16-fixes' into 'v9_16'
Tom Krizek [Fri, 23 Dec 2022 12:07:38 +0000 (12:07 +0000)] 
Merge branch 'tkrizek/default-alg-9.16-fixes' into 'v9_16'

[9.16] Skip test algorithm randomization in certain cases

See merge request isc-projects/bind9!7268

3 years agoDon't check algorithm support during configure step
Tom Krizek [Wed, 16 Nov 2022 16:28:27 +0000 (17:28 +0100)] 
Don't check algorithm support during configure step

The 9.16 version of ./configure calls bin/tests/system/cleanall.sh
unless --without-make-clean is used. The cleanall.sh script then
includes bin/tests/system/conf.sh, which includes
bin/tests/system/conf.sh.common. At that point, dnssec-keygen which is
used to detect algorithm support isn't compiled, so it can't be used.

More importantly, algorithm selection for system tests during the
./configure phase is irrelevant, so it can be safely skipped.

3 years agoDisable test algorithm randomization if Python is missing
Tom Krizek [Wed, 16 Nov 2022 14:55:16 +0000 (15:55 +0100)] 
Disable test algorithm randomization if Python is missing

This change is motivated by the fact that our Windows CI image doesn't
have a Python interpreter.

3 years agoMerge branch 'tkrizek/dangerfile-backport-tweaks-v9_16' into 'v9_16'
Tom Krizek [Fri, 23 Dec 2022 08:58:39 +0000 (08:58 +0000)] 
Merge branch 'tkrizek/dangerfile-backport-tweaks-v9_16' into 'v9_16'

[9.16] danger CI: tweak backport check and add Affects label check

See merge request isc-projects/bind9!7271

3 years agodanger: check the Affects labels are set
Tom Krizek [Mon, 19 Dec 2022 14:14:48 +0000 (15:14 +0100)] 
danger: check the Affects labels are set

Unless the MR is a backport, the Affects labels should be used to
indicate which versions are affected by the issue that prompted the MR.

(cherry picked from commit 64d71a1f5f13aec1bf380c06c404f3ae8f49684e)

3 years agodanger: check version in MR title
Tom Krizek [Mon, 19 Dec 2022 13:43:16 +0000 (14:43 +0100)] 
danger: check version in MR title

Enforce the version indicator to be at the start of the MR title.

(cherry picked from commit d1172e011c32f3708422557ad5fdbee00e6fb7dd)

3 years agoMerge branch 'tkrizek/default-alg-fixups-v9_16' into 'v9_16'
Tom Krizek [Thu, 22 Dec 2022 15:20:38 +0000 (15:20 +0000)] 
Merge branch 'tkrizek/default-alg-fixups-v9_16' into 'v9_16'

[9.16] Fix minor issues with DEFAULT_ALGORITHM selection in system tests

See merge request isc-projects/bind9!7267

3 years agoMake Perl interpreter required for system tests
Tom Krizek [Tue, 8 Nov 2022 13:54:14 +0000 (14:54 +0100)] 
Make Perl interpreter required for system tests

This change has no practical impact, as Perl was already required for
all system tests, this check only makes it more explicit.

(cherry picked from commit 084d72d1d5ea38f4ccc600fd04d61fed1c3124c3)

conf.sh.win32 was modified in addition of the mentioned commit.

3 years agoEnsure test interpreters are defined before common config
Tom Krizek [Wed, 16 Nov 2022 13:37:01 +0000 (14:37 +0100)] 
Ensure test interpreters are defined before common config

Nothing from conf.sh.common is required to set these values. On the
contrary, a Python interpreter needs to be set in order to randomize the
algorithm set (which happens in conf.sh.common).

(cherry picked from commit 492992dca8512e6cb2cd44c849656e9fa23b287d)

conf.sh.win32 was modified in addition of the above mentioned commit.

3 years agoForce quiet mode when using testcrypto.sh directly
Tom Krizek [Mon, 7 Nov 2022 14:58:40 +0000 (15:58 +0100)] 
Force quiet mode when using testcrypto.sh directly

When testcrypto.sh is used as a standalone script, always use quiet mode
to avoid using undefined commands (such as echo_i) which require
inclusion of the entire conf.sh machinery.

(cherry picked from commit ba35a6df9cf4d18d1ccbfdf7a6130a48e5eef2b7)

3 years agoMerge branch '3503-random-default-algorithm-in-tests2-v9_16' into 'v9_16'
Tom Krizek [Thu, 22 Dec 2022 14:54:01 +0000 (14:54 +0000)] 
Merge branch '3503-random-default-algorithm-in-tests2-v9_16' into 'v9_16'

[9.16] Random selection of DEFAULT_ALGORITHM in system tests at runtime

See merge request isc-projects/bind9!7265

3 years agoci: disable algorithm support checking in softhsm
Tom Krizek [Mon, 31 Oct 2022 11:18:07 +0000 (12:18 +0100)] 
ci: disable algorithm support checking in softhsm

The algorithm support detection script doesn't seem to work when using
the SoftHSM module. For some reason, dnssec-keygen returns 'crypto
failure'. Since the tests themselves pass, this is likely to be some
bug/definiency in the test scripts that check algorithm support that get
confused by SoftHSM.

Since this issue only happens for the system:gcc:softhsm2.6 job in the
9.16 branch, use a workaround to not introduce this new feature for
this particular problematic job.

3 years agoRandomize algorithm selection for mkeys test
Tom Krizek [Wed, 26 Oct 2022 14:20:57 +0000 (16:20 +0200)] 
Randomize algorithm selection for mkeys test

Use the ALGORITHM_SET option to use randomly selected default algorithm
in this test. Make sure the test works by using variables instead of
hard-coding values.

(cherry picked from commit f65f276f986fe1e0498698f7058722a0b7a9aec1)

3 years agoSet algorithms for system tests at runtime
Tom Krizek [Wed, 26 Oct 2022 15:38:32 +0000 (17:38 +0200)] 
Set algorithms for system tests at runtime

Use the get_algorithms.py script to detect supported algorithms and
select random algorithms to use for the tests.

Make sure to load common.conf.sh after KEYGEN env var is exported.

(cherry picked from commit 69b608ee9f90af0a351c176167825bfc335b982d)

3 years agoScript for random algorithm selection in system tests
Tom Krizek [Tue, 25 Oct 2022 15:45:16 +0000 (17:45 +0200)] 
Script for random algorithm selection in system tests

Multiple algorithm sets can be defined in this script. These can be
selected via the ALGORITHM_SET environment variable. For compatibility
reasons, "stable" set contains the currently used algorithms, since our
system tests need some changes before being compatible with randomly
selected algorithms.

The script operation is similar to the get_ports.py - environment
variables are created and then printed out as `export NAME=VALUE`
commands, to be interpreted by shell. Once we support pytest runner for
system tests, this should be a fixture instead.

(cherry picked from commit 5f480c8485261f32b0e9b15630cebed0e8d80eaa)

3 years agoExport env variables in system tests
Tom Krizek [Tue, 25 Oct 2022 16:00:27 +0000 (18:00 +0200)] 
Export env variables in system tests

Certain variables have to be exported in order for the system tests to
work. It makes little sense to export the variables in one place/script
while they're defined in another place.

Since it makes no harm, export all the variables to make the behaviour
more predictable and consistent. Previously, some variables were
exported as environment variables, while others were just shell
variables which could be used once the configuration was sourced from
another script. However, they wouldn't be exposed to spawned processes.

For simplicity sake (and for the upcoming effort to run system tests
with pytest), export all variables that are used. TESTS, PARALLEL_UNIX
and SUBDIRS variables are automake-specific, aren't used anywhere else
and thus not exported.

(cherry picked from commit 37d14c69c050a6c2bc0ebbbdc80a788bb6795b7e)

conf.sh.win32 was modified in addition of the above mentioned commit.

3 years agoSupport testcrypto.sh usage without including conf.sh
Tom Krizek [Tue, 25 Oct 2022 12:05:07 +0000 (14:05 +0200)] 
Support testcrypto.sh usage without including conf.sh

The only variable really needed for the script to work is the path to
the $KEYGEN binary. Allow setting this via an environment variable to
avoid loading conf.sh (and causing a chicken-egg problem). Also make
testcrypto.sh executable to allow its use from conf.sh.

(cherry picked from commit bb1c6bbdc701cdbadfe7c796acf8b5ecd719f1b9)

3 years agoUnify indentation level in testcrypto.sh
Tom Krizek [Tue, 25 Oct 2022 12:02:30 +0000 (14:02 +0200)] 
Unify indentation level in testcrypto.sh

(cherry picked from commit 01b293b055263eb1cc76b64968efd554fb4e0b42)

3 years agoMerge tag 'v9_16_36' into v9_16
Tom Krizek [Thu, 22 Dec 2022 08:51:08 +0000 (09:51 +0100)] 
Merge tag 'v9_16_36' into v9_16

BIND 9.16.36

3 years agoMerge branch 'tkrizek/system-tests-conventions-v9_16' into 'v9_16'
Tom Krizek [Wed, 21 Dec 2022 13:37:34 +0000 (13:37 +0000)] 
Merge branch 'tkrizek/system-tests-conventions-v9_16' into 'v9_16'

[9.16] Unify system tests naming conventions

See merge request isc-projects/bind9!7258

3 years agoUpdate tests gitignore file
Tom Krizek [Wed, 21 Dec 2022 11:52:08 +0000 (12:52 +0100)] 
Update tests gitignore file

The .mypy_cache was added to the system test dir gitignore, since it
should be ignored.

(cherry picked from commit 4145068bfab68c60e71b2a174292a6282bf97a86)

3 years agoUse common name convention for pytest files
Tom Krizek [Fri, 14 Oct 2022 09:12:53 +0000 (11:12 +0200)] 
Use common name convention for pytest files

It is better to use consistent file names to avoid issue with sorting
etc.

Using underscore in filenames as opposed to dash was chosen because it
seems more common in pytest/python to use underscore for filenames.

Also rename the bin/tests/system/timeouts/tests-tcp.py file to
bin/tests/system/timeouts/tests_tcp_timeouts.py to avoid pytest name
collision (there can't be two files named tests_tcp.py).

(cherry picked from commit f6409ee6ac5913c6f90545a44c4346945d911162)

3 years agoMerge branch 'tkrizek/danger-backports-v9_16' into 'v9_16'
Tom Krizek [Fri, 16 Dec 2022 13:42:06 +0000 (13:42 +0000)] 
Merge branch 'tkrizek/danger-backports-v9_16' into 'v9_16'

Check backport workflow in danger CI [v9_16]

See merge request isc-projects/bind9!7246

3 years agodanger: remove obsolete check for cherry pick msg
Tom Krizek [Thu, 15 Dec 2022 16:55:54 +0000 (17:55 +0100)] 
danger: remove obsolete check for cherry pick msg

With proper backport commit detection, this check has been made
redundant.

(cherry picked from commit e8a5ebaee508c216174624fbc37414ea2dcc5b99)

3 years agodanger: check backport commits for original commit IDs
Tom Krizek [Thu, 15 Dec 2022 16:52:52 +0000 (17:52 +0100)] 
danger: check backport commits for original commit IDs

A full backport must have all the commit from the original MR and the
original commit IDs must be referenced in the backport commit messages.

If the criteria above is not met, the MR should be marked as a partial
backport. In that case, any discrepencies are only logged as informative
messages rather than failures.

(cherry picked from commit c617f97784ff898cfea7bbbc6ab6c92eb409009d)

3 years agodanger: check that original MR has been merged
Tom Krizek [Thu, 15 Dec 2022 16:51:24 +0000 (17:51 +0100)] 
danger: check that original MR has been merged

When checking a backport MR, ensure that the original MR has been merged
already. This is vital for followup checks that verify commit IDs from
original commits are present in backport commit messages.

(cherry picked from commit 89530f1a1cb2e90b5368605fc317eaed35bf9d1f)

3 years agodanger: check backport links to the original MR
Tom Krizek [Thu, 15 Dec 2022 16:48:34 +0000 (17:48 +0100)] 
danger: check backport links to the original MR

When doing archeology, it is much easier to find stuff if it's properly
linked. This check ensures that backport MR are linked to their original
MR via a "Backport of !XXXX" message.

The regular expression is fairly broad and has been tested to accept the
following variants of the message:
Backport of MR !XXXX
Backport of: !XXXX
backport of mr !XXXX
Backport of   !XXXX
Backport of https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/XXXX

(cherry picked from commit 12e0b05738cbd456c8c691fd96364b1ac8b6b259)

3 years agodanger: ensure target branch is in the MR title
Tom Krizek [Thu, 15 Dec 2022 16:45:54 +0000 (17:45 +0100)] 
danger: ensure target branch is in the MR title

Having the MR title clearly marked in its title can be very useful when
looking through older issues/MRs.

This check also ensures that the version from the version label matches
the proper version branch (i.e. v9.16 must be marked with [v9_16]).

(cherry picked from commit 14b027cf830020cca6a57f0281bb6da73d118483)

3 years agodanger: support partial backport label
Tom Krizek [Thu, 15 Dec 2022 16:39:58 +0000 (17:39 +0100)] 
danger: support partial backport label

Treat the Backport::Partial label as a backport as well.

(cherry picked from commit 1c0c1ba8b9a280c53dd0a40141e2dd69960359b9)

3 years agoMerge branch '3740-rpz-reconfig-v9_16' into 'v9_16'
Tony Finch [Fri, 16 Dec 2022 10:26:47 +0000 (10:26 +0000)] 
Merge branch '3740-rpz-reconfig-v9_16' into 'v9_16'

A couple of RPZ options were not reconfigured as expected

See merge request isc-projects/bind9!7239

3 years agoA couple of RPZ options were not reconfigured as expected
Tony Finch [Wed, 14 Dec 2022 15:47:03 +0000 (15:47 +0000)] 
A couple of RPZ options were not reconfigured as expected

[bug] Changes to the RPZ response-policy min-update-interval
and add-soa options now take effect as expected when
named is reconfigured. [GL #3740]

(cherry picked from commit d8a3d328db1fb530b6f29c03291e80252251a2e1)

3 years agoMerge branch '3742-catz-update-log-incorrect-soa-serial-representation-v9_16' into...
Arаm Sаrgsyаn [Thu, 15 Dec 2022 14:48:22 +0000 (14:48 +0000)] 
Merge branch '3742-catz-update-log-incorrect-soa-serial-representation-v9_16' into 'v9_16'

[v9_16] Fix an incorrect SOA serial representation in catz

See merge request isc-projects/bind9!7237

3 years agoAdd a CHANGES note for [GL #3742]
Aram Sargsyan [Wed, 14 Dec 2022 14:46:26 +0000 (14:46 +0000)] 
Add a CHANGES note for [GL #3742]

(cherry picked from commit ac7149aa88cee79ddb53e83eec33996807a43bc9)

3 years agoFix logging a uint32_t SOA serial value in dns_catz_update_from_db()
Aram Sargsyan [Wed, 14 Dec 2022 14:40:31 +0000 (14:40 +0000)] 
Fix logging a uint32_t SOA serial value in dns_catz_update_from_db()

The dns_catz_update_from_db() function prints serial number as a signed
number (with "%d" in the format string), but the `vers` variable's type
is 'uint32_t'. This breaks serials bigger than 2^31.

Use PRIu32 instead of "d" in the format string.

(cherry picked from commit 72b1760ea6cd415efe9868aad97c982fea8b0a42)

3 years agoAdd big SOA serial logging check into the catz system test
Aram Sargsyan [Wed, 14 Dec 2022 14:37:06 +0000 (14:37 +0000)] 
Add big SOA serial logging check into the catz system test

Check that the SOA serial numbers printed when updating a catalog zone
is represented correctly for numbers bigger than 2^31.

(cherry picked from commit de232ab446d3aa3f5b93013c8c7f789cd5ad4013)

3 years agoMerge branch 'fanf-rsasha236-v9_16' into 'v9_16'
Tony Finch [Wed, 14 Dec 2022 12:47:23 +0000 (12:47 +0000)] 
Merge branch 'fanf-rsasha236-v9_16' into 'v9_16'

Fix a typo RSASHA236 -> RSASHA256

See merge request isc-projects/bind9!7225

3 years agoFix a typo RSASHA236 -> RSASHA256
Tony Finch [Fri, 9 Dec 2022 12:52:05 +0000 (12:52 +0000)] 
Fix a typo RSASHA236 -> RSASHA256

Use dns_secalg_format() to avoid error-prone repetition.

(cherry picked from commit c18a9a208d47d0ea27a396165fd895b7c1af2c25)

3 years agoMerge branch 'fanf-dnssec-algorithm-loglevel-v9_16' into 'v9_16'
Tony Finch [Wed, 14 Dec 2022 12:32:01 +0000 (12:32 +0000)] 
Merge branch 'fanf-dnssec-algorithm-loglevel-v9_16' into 'v9_16'

List supported DNSSEC algorithms at log level NOTICE

See merge request isc-projects/bind9!7227

3 years agoList supported DNSSEC algorithms at log level NOTICE
Tony Finch [Tue, 13 Dec 2022 13:02:19 +0000 (13:02 +0000)] 
List supported DNSSEC algorithms at log level NOTICE

NOTICE matches the other startup messages. WARNING weirdly
suggests the list is a problem.

(cherry picked from commit 72f8d03cad6352958f7f3266c3aa60e1ff6049cf)

3 years agoMerge branch '3737-fix-initialisation-of-local-in-isdotlocal-in-dig-v9_16' into ...
Mark Andrews [Wed, 14 Dec 2022 00:32:34 +0000 (00:32 +0000)] 
Merge branch '3737-fix-initialisation-of-local-in-isdotlocal-in-dig-v9_16' into 'v9_16'

Resolve "fix initialisation of local. in isdotlocal in dig" [v9_16]

See merge request isc-projects/bind9!7222

3 years agoProperly initialise local_ndata in isdotlocal in dig
Mark Andrews [Tue, 13 Dec 2022 01:03:49 +0000 (12:03 +1100)] 
Properly initialise local_ndata in isdotlocal in dig

Remove the trailing '\0' so that the length field of the dns_name_t
structure is correct.  The old data just happens to work with
dns_name_issubdomain but would fail with dns_name_equal.

(cherry picked from commit 8ce163bbc5de7048b338638f89edd4bb261f4c17)

3 years agoMerge branch '3728-v9_16-docs-can-t-retrieve-updated-man-pages' into 'v9_16'
Mark Andrews [Tue, 13 Dec 2022 23:22:50 +0000 (23:22 +0000)] 
Merge branch '3728-v9_16-docs-can-t-retrieve-updated-man-pages' into 'v9_16'

Resolve "v9_16 docs can't retrieve updated man pages"

See merge request isc-projects/bind9!7200

3 years agoMake docs artifacts always available
Mark Andrews [Thu, 8 Dec 2022 21:25:08 +0000 (08:25 +1100)] 
Make docs artifacts always available

3 years agoMerge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.16.37' into 'v9_16'
Tom Krizek [Tue, 13 Dec 2022 16:18:19 +0000 (16:18 +0000)] 
Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.16.37' into 'v9_16'

Set up version and release notes for bind 9.16.37

See merge request isc-projects/bind9!7220

3 years agoSet up release notes for BIND 9.16.37
Tom Krizek [Tue, 13 Dec 2022 16:05:05 +0000 (17:05 +0100)] 
Set up release notes for BIND 9.16.37

3 years agoUpdate BIND version to 9.16.37-dev
Tom Krizek [Tue, 13 Dec 2022 16:04:02 +0000 (17:04 +0100)] 
Update BIND version to 9.16.37-dev

3 years agoMerge branch 'prep-release' into v9_16_36-release v9.16.36
Tom Krizek [Mon, 12 Dec 2022 14:43:23 +0000 (15:43 +0100)] 
Merge branch 'prep-release' into v9_16_36-release

3 years agoprep 9.16.36
Tom Krizek [Mon, 12 Dec 2022 13:18:17 +0000 (14:18 +0100)] 
prep 9.16.36

3 years agoMerge branch 'tkrizek/prepare-documentation-for-bind-9.16.36' into 'v9_16_36-release'
Tom Krizek [Mon, 12 Dec 2022 12:57:25 +0000 (12:57 +0000)] 
Merge branch 'tkrizek/prepare-documentation-for-bind-9.16.36' into 'v9_16_36-release'

Prepare documentation for BIND 9.16.36

See merge request isc-private/bind9!489

3 years agoReorder release notes
Michał Kępień [Mon, 12 Dec 2022 12:05:36 +0000 (13:05 +0100)] 
Reorder release notes

3 years agoTweak and reword release notes
Michał Kępień [Mon, 12 Dec 2022 12:05:36 +0000 (13:05 +0100)] 
Tweak and reword release notes

3 years agoPrepare release notes for BIND 9.16.36
Michał Kępień [Mon, 12 Dec 2022 12:05:36 +0000 (13:05 +0100)] 
Prepare release notes for BIND 9.16.36

3 years agoMerge branch '3731-attach-keyfileio-to-zone-v9_16' into 'v9_16'
Ondřej Surý [Fri, 9 Dec 2022 14:53:51 +0000 (14:53 +0000)] 
Merge branch '3731-attach-keyfileio-to-zone-v9_16' into 'v9_16'

Implement proper reference counting for dns_keyfileio_t [v9.16]

See merge request isc-projects/bind9!7208

3 years agoImplement proper reference counting for dns_keyfileio_t
Ondřej Surý [Fri, 9 Dec 2022 07:53:20 +0000 (08:53 +0100)] 
Implement proper reference counting for dns_keyfileio_t

Instead of relying on hash table search when using the keys, implement a
proper reference counting in dns_keyfileio_t objects, and attach/detach
the objects to the zone.

(cherry picked from commit 79115a0c3bc5e68561109de787ec5224d25469de)

3 years agoMerge branch '3724-fix-doc-man-dig-v9_16' into 'v9_16'
Ondřej Surý [Thu, 8 Dec 2022 10:20:07 +0000 (10:20 +0000)] 
Merge branch '3724-fix-doc-man-dig-v9_16' into 'v9_16'

Update the doc/man/dig.1in

See merge request isc-projects/bind9!7195

3 years agoUpdate the doc/man/dig.1in
Ondřej Surý [Thu, 8 Dec 2022 10:00:07 +0000 (11:00 +0100)] 
Update the doc/man/dig.1in

The MR !7187 forgot to update the precompiled doc/man/dig.1in.  Update
the file.

3 years agoMerge branch '3727-fix-off-by-one-reference-counting-in-zonemgr_keymgmt_delete-v9_16...
Ondřej Surý [Thu, 8 Dec 2022 09:57:28 +0000 (09:57 +0000)] 
Merge branch '3727-fix-off-by-one-reference-counting-in-zonemgr_keymgmt_delete-v9_16' into 'v9_16'

Release unused key file IO lock objects [v9.16]

See merge request isc-projects/bind9!7192

3 years agoAdd CHANGES and release note for [GL #3727]
Ondřej Surý [Wed, 7 Dec 2022 15:52:07 +0000 (16:52 +0100)] 
Add CHANGES and release note for [GL #3727]

(cherry picked from commit 56a997b0b5dab63b78d20abda0b6ba1ae3fcd2b1)

3 years agoRelease unused key file IO lock objects
Ondřej Surý [Wed, 7 Dec 2022 15:45:33 +0000 (16:45 +0100)] 
Release unused key file IO lock objects

Due to off-by-one error in zonemgr_keymgmt_delete, unused key file IO
lock objects were never freed and they were kept until the server
shutdown.  Adjust the returned value by -1 to accomodate the fact that
the atomic_fetch_*() functions return the value before the operation and
not current value after the operation.

(cherry picked from commit fb1acd6736609360f79a498d44dffcceb8ca0f54)

3 years agoMerge branch 'tkrizek/revert-3678-serve-stale-servfail-v9_16' into 'v9_16'
Tom Krizek [Thu, 8 Dec 2022 09:32:22 +0000 (09:32 +0000)] 
Merge branch 'tkrizek/revert-3678-serve-stale-servfail-v9_16' into 'v9_16'

Revert "Merge branch '3678-serve-stale-servfailing-unexpectedly-v9_16' into 'v9_16'"

See merge request isc-projects/bind9!7185

3 years agoRevert "Merge branch '3678-serve-stale-servfailing-unexpectedly-v9_16' into 'v9_16'"
Tom Krizek [Wed, 7 Dec 2022 20:44:48 +0000 (21:44 +0100)] 
Revert "Merge branch '3678-serve-stale-servfailing-unexpectedly-v9_16' into 'v9_16'"

This reverts commit b2a4447af89e3c8234ca507ae616e5fd36b75147, reversing
changes made to 8924f929569324e8a9390cf4b7b0f63c1a0dc17f.

It also removes release note 6038, since the fix is reverted.

3 years agoMerge branch '3613-redo-dumping-expired-rdatasets-v9_16' into 'v9_16'
Mark Andrews [Thu, 8 Dec 2022 00:49:45 +0000 (00:49 +0000)] 
Merge branch '3613-redo-dumping-expired-rdatasets-v9_16' into 'v9_16'

Resolve "TTL issue with resolver's cached and expired results for qtype ANY queries" [v9_16]

See merge request isc-projects/bind9!7189

3 years agoAdd CHANGES note for [GL #3613]
Mark Andrews [Thu, 17 Nov 2022 00:23:31 +0000 (11:23 +1100)] 
Add CHANGES note for [GL #3613]

(cherry picked from commit 485e968087b4dcb8130fe8606b00572cf7f06c18)

3 years agoRemove different zero TTL handling for rdataset iterator
Mark Andrews [Mon, 21 Nov 2022 00:59:45 +0000 (11:59 +1100)] 
Remove different zero TTL handling for rdataset iterator

Zero TTL handling does not need to be different for 'rdatasetiter_first'
and 'rdatasetiter_next' and it interacts badly with 'bind_rdatadataset'
which makes different determinations.

(cherry picked from commit 1a39328feb488c1d406a1b2d15dc6e0f882dce55)

3 years agoAdd dns_db_allrdatasets options
Mark Andrews [Wed, 16 Nov 2022 00:40:33 +0000 (11:40 +1100)] 
Add dns_db_allrdatasets options

'DNS_DB_STALEOK' returns stale rdatasets as well as current rdatasets.

'DNS_DB_EXPIREDOK' returns expired rdatasets as well as current
rdatasets. This option is currently only set when DNS_DB_STALEOK is
also set.

(cherry picked from commit 85048ddeeeba8414ababfe73ba2651183b056180)

3 years agoExtend dns_db_allrdatasets to control interation results
Mark Andrews [Tue, 15 Nov 2022 23:47:40 +0000 (10:47 +1100)] 
Extend dns_db_allrdatasets to control interation results

Add an options parameter to control what rdatasets are returned when
iteratating over the node.  Specific modes will be added later.

(cherry picked from commit 7695c36a5de01c441690f2a0e46f176321b58896)

3 years agoProperly select active rdatasets when iterating across node
Mark Andrews [Tue, 15 Nov 2022 23:09:56 +0000 (10:09 +1100)] 
Properly select active rdatasets when iterating across node

Active rdatasets where not being properly selected in rdatasetiter_first
and rdatasetiter_next.

(cherry picked from commit 3bdab2d111a76b048285bb1db66be04209a1fc6a)

3 years agoCheck TTLs of mixed TTL ANY response with expired records
Mark Andrews [Tue, 25 Oct 2022 04:57:33 +0000 (15:57 +1100)] 
Check TTLs of mixed TTL ANY response with expired records

(cherry picked from commit e49f83499a4afc30847f85902726547ae7bbf4d4)

3 years agoRevert "Fix rndc dumpdb -expired for stuck cache contents"
Mark Andrews [Tue, 15 Nov 2022 05:35:32 +0000 (16:35 +1100)] 
Revert "Fix rndc dumpdb -expired for stuck cache contents"

This reverts commit f8d866c6efa4c9c2726f8ebcf2e66122198576c4.

(cherry picked from commit 90249e4aa574016b61fbd550bf038efcd85a5d15)

3 years agoMerge branch '3724-update-dig-tcp-documentation-v9_16' into 'v9_16'
Mark Andrews [Wed, 7 Dec 2022 23:14:17 +0000 (23:14 +0000)] 
Merge branch '3724-update-dig-tcp-documentation-v9_16' into 'v9_16'

Add reference to +tcp for +ignore [v9_16]

See merge request isc-projects/bind9!7187

3 years agoAdd reference to +tcp for +ignore
Mark Andrews [Wed, 7 Dec 2022 04:51:34 +0000 (15:51 +1100)] 
Add reference to +tcp for +ignore

(cherry picked from commit b5951f04111ed8c323d8b5960a721a8266220985)

3 years agoMerge branch 'ondrej-fix-missing-zone_check-in-checkds-system-test-v9_16' into 'v9_16'
Ondřej Surý [Wed, 7 Dec 2022 18:46:36 +0000 (18:46 +0000)] 
Merge branch 'ondrej-fix-missing-zone_check-in-checkds-system-test-v9_16' into 'v9_16'

Fix missing zone_check() call in checkds test [v9.16]

See merge request isc-projects/bind9!7181

3 years agoFix missing zone_check() call in checkds test
Ondřej Surý [Sun, 4 Dec 2022 13:50:54 +0000 (14:50 +0100)] 
Fix missing zone_check() call in checkds test

The bad2-dswithdrawn.checkds tests were missing call to the
zone_checks() contributing to intermittent timing failures of the
checkds system test.

(cherry picked from commit 718831bfcc600fb4690fc7afd3307421803cdb55)

3 years agoMerge branch '3183-send-shutdown-to-ns_client-on-shutdown-v9_16' into 'v9_16'
Ondřej Surý [Wed, 7 Dec 2022 18:28:10 +0000 (18:28 +0000)] 
Merge branch '3183-send-shutdown-to-ns_client-on-shutdown-v9_16' into 'v9_16'

Propagate the shutdown event to the recursing ns_client(s) [v9.16]

See merge request isc-projects/bind9!7029

3 years agoAdd CHANGES and release notes for [GL #3183]
Ondřej Surý [Thu, 3 Nov 2022 17:01:22 +0000 (18:01 +0100)] 
Add CHANGES and release notes for [GL #3183]

(cherry picked from commit d3f1639c16e7777a52d66c2dccd8b43a08a0750b)

3 years agoPropagate the shutdown event to the recursing ns_client(s)
Ondřej Surý [Thu, 3 Nov 2022 16:42:12 +0000 (17:42 +0100)] 
Propagate the shutdown event to the recursing ns_client(s)

Send the ns_query_cancel() on the recursing clients when we initiate the
named shutdown for faster shutdown.

When we are shutting down the resolver, we cancel all the outstanding
fetches, and the ISC_R_CANCEL events doesn't propagate to the ns_client
callback.

In the future, the better solution how to fix this would be to look at
the shutdown paths and let them all propagate from bottom (loopmgr) to
top (f.e. ns_client).

(cherry picked from commit d861d403bb9a7912e29a06aba6caf6d502839f1b)

3 years agoMerge branch 'matthijs-document-ns-minimal-responses-v9_16' into 'v9_16'
Matthijs Mekking [Wed, 7 Dec 2022 11:39:57 +0000 (11:39 +0000)] 
Merge branch 'matthijs-document-ns-minimal-responses-v9_16' into 'v9_16'

[v9_16] Document NS queries are excempt from minimal-responses

See merge request isc-projects/bind9!7177

3 years agoDocument NS queries are excempt from minimal-responses
Matthijs Mekking [Fri, 11 Nov 2022 09:23:04 +0000 (10:23 +0100)] 
Document NS queries are excempt from minimal-responses

Also document that DNSKEY, DS, CDNSKEY, and CDS never do additional
section processing.

(cherry picked from commit f7b477f6ea419d805f13a0187e26b17581dc572d)

3 years agoMerge branch 'mnowak/asan-tsan-respdiff-jobs-v9_16' into 'v9_16'
Michal Nowak [Wed, 7 Dec 2022 10:18:08 +0000 (10:18 +0000)] 
Merge branch 'mnowak/asan-tsan-respdiff-jobs-v9_16' into 'v9_16'

[v9_16] Add ASAN- and TSAN-enabled respdiff jobs

See merge request isc-projects/bind9!7174

3 years agoAdd ASAN- and TSAN-enabled respdiff jobs
Michal Nowak [Tue, 22 Nov 2022 09:27:17 +0000 (10:27 +0100)] 
Add ASAN- and TSAN-enabled respdiff jobs

Neither of the new CI jobs can reliably pass at the moment; hence they
are defined with "allow_failure: true" until issues in the code base are
resolved.

(cherry picked from commit 4f23de554c89ffb001097f3c48879cb8dc71f3f9)

3 years agoExtract TSAN parsing code
Michal Nowak [Tue, 22 Nov 2022 10:51:23 +0000 (11:51 +0100)] 
Extract TSAN parsing code

(cherry picked from commit 9856296666730484f840948e5e5d040d5c4da814)

3 years agoMerge branch '3683-use-after-free-in-catalog-zone-processing-v9_16' into 'v9_16'
Mark Andrews [Wed, 7 Dec 2022 02:16:47 +0000 (02:16 +0000)] 
Merge branch '3683-use-after-free-in-catalog-zone-processing-v9_16' into 'v9_16'

Resolve "use after free in catalog zone processing" [v9_16]

See merge request isc-projects/bind9!7171

3 years agoAdd release note for [GL #3683]
Mark Andrews [Wed, 30 Nov 2022 07:56:53 +0000 (18:56 +1100)] 
Add release note for [GL #3683]

(cherry picked from commit 9843da3423cafff09d65b5bcea453029c020bbf7)

3 years agoAdd CHANGES note for [GL #3683]
Mark Andrews [Wed, 30 Nov 2022 07:54:18 +0000 (18:54 +1100)] 
Add CHANGES note for [GL #3683]

(cherry picked from commit 72402e1710b05b384fc44b546fdbd1ece029ac7d)

3 years agoCheck that restored catalog zone works
Mark Andrews [Wed, 30 Nov 2022 08:32:11 +0000 (19:32 +1100)] 
Check that restored catalog zone works

Using a restored catalog zone excercised a use-after-free bug.
The test checks that the use-after-free bug is gone and is just
a reasonable behaviour check in its own right.

(cherry picked from commit bca84c8601a82d1f7d75b670a9ea8922ebecb4d6)

3 years agoAdd missing DbC magic checks
Mark Andrews [Thu, 1 Dec 2022 01:51:30 +0000 (12:51 +1100)] 
Add missing DbC magic checks

Checking for value != NULL is not sufficient to detect use after
free errors.

(cherry picked from commit b1086a5561c8024fc39b5250063fc901c27eef06)

3 years agoCall dns_db_updatenotify_unregister earlier
Mark Andrews [Wed, 30 Nov 2022 07:44:37 +0000 (18:44 +1100)] 
Call dns_db_updatenotify_unregister earlier

dns_db_updatenotify_unregister needed to be called earlier to ensure
that listener->onupdate_arg always points to a valid object.  The
existing lazy cleanup in rbtdb_free did not ensure that.

(cherry picked from commit 35839e91d84f4c22f3554ff4b6dc53d20359621e)

3 years agoSuppress duplicate dns_db_updatenotify_register registrations
Mark Andrews [Wed, 30 Nov 2022 07:40:27 +0000 (18:40 +1100)] 
Suppress duplicate dns_db_updatenotify_register registrations

Duplicate dns_db_updatenotify_register registrations need to be
suppressed to ensure that dns_db_updatenotify_unregister is successful.

(cherry picked from commit f13e71e55167bf9c94f4faf1dab110467158e7b4)

3 years agoMerge branch '3678-serve-stale-servfailing-unexpectedly-v9_16' into 'v9_16'
Arаm Sаrgsyаn [Tue, 6 Dec 2022 15:01:55 +0000 (15:01 +0000)] 
Merge branch '3678-serve-stale-servfailing-unexpectedly-v9_16' into 'v9_16'

[v9_16] Resolve "stale-serve and RPZ put in SERVFAIL cache unexpected record"

See merge request isc-projects/bind9!7167

3 years agoCheck for NULL before dereferencing qctx->rpz_st
Michał Kępień [Mon, 13 Jun 2022 12:03:16 +0000 (14:03 +0200)] 
Check for NULL before dereferencing qctx->rpz_st

Commit 9ffb4a7ba11fae64a6ce2dd6390cd334372b7ab7 causes Clang Static
Analyzer to flag a potential NULL dereference in query_nxdomain():

    query.c:9394:26: warning: Dereference of null pointer [core.NullDereference]
            if (!qctx->nxrewrite || qctx->rpz_st->m.rpz->addsoa) {
                                    ^~~~~~~~~~~~~~~~~~~
    1 warning generated.

The warning above is for qctx->rpz_st potentially being a NULL pointer
when query_nxdomain() is called from query_resume().  This is a false
positive because none of the database lookup result codes currently
causing query_nxdomain() to be called (DNS_R_EMPTYWILD, DNS_R_NXDOMAIN)
can be returned by a database lookup following a recursive resolution
attempt.  Add a NULL check nevertheless in order to future-proof the
code and silence Clang Static Analyzer.

(cherry picked from commit 07592d1315412c38c978e8d009aace5d0f5bef93)