]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
2 years agoHandle non-zero return codes in serve-stale test
Tom Krizek [Mon, 19 Jun 2023 15:45:40 +0000 (17:45 +0200)] 
Handle non-zero return codes in serve-stale test

2 years agoHandle non-zero return codes in doth test
Tom Krizek [Mon, 19 Jun 2023 15:25:29 +0000 (17:25 +0200)] 
Handle non-zero return codes in doth test

2 years agoHandle non-zero return codes in acl test
Tom Krizek [Mon, 19 Jun 2023 15:09:04 +0000 (17:09 +0200)] 
Handle non-zero return codes in acl test

2 years agoHandle non-zero return codes in statistics test
Tom Krizek [Mon, 19 Jun 2023 15:05:17 +0000 (17:05 +0200)] 
Handle non-zero return codes in statistics test

2 years agoHandle non-zero return codes in rrsetorder test
Tom Krizek [Mon, 19 Jun 2023 15:02:29 +0000 (17:02 +0200)] 
Handle non-zero return codes in rrsetorder test

2 years agoHandle non-zero return codes in redirect test
Tom Krizek [Mon, 19 Jun 2023 14:42:51 +0000 (16:42 +0200)] 
Handle non-zero return codes in redirect test

2 years agoHandle non-zero return codes in rndc test
Tom Krizek [Mon, 19 Jun 2023 14:36:05 +0000 (16:36 +0200)] 
Handle non-zero return codes in rndc test

2 years agoHandle non-zero return codes in inline test
Tom Krizek [Mon, 19 Jun 2023 14:30:46 +0000 (16:30 +0200)] 
Handle non-zero return codes in inline test

2 years agoHandle non-zero return codes unknown test
Tom Krizek [Mon, 19 Jun 2023 14:24:49 +0000 (16:24 +0200)] 
Handle non-zero return codes unknown test

2 years agoHandle non-zero return codes in nsupdate test
Tom Krizek [Mon, 19 Jun 2023 14:11:16 +0000 (16:11 +0200)] 
Handle non-zero return codes in nsupdate test

2 years agoHandle non-zero return codes in zonechecks test
Tom Krizek [Mon, 19 Jun 2023 12:08:27 +0000 (14:08 +0200)] 
Handle non-zero return codes in zonechecks test

2 years agoHandle non-zero return codes in wildcard test
Tom Krizek [Mon, 19 Jun 2023 11:58:01 +0000 (13:58 +0200)] 
Handle non-zero return codes in wildcard test

2 years agoHandle non-zero return codes in zero test
Tom Krizek [Mon, 19 Jun 2023 11:53:26 +0000 (13:53 +0200)] 
Handle non-zero return codes in zero test

2 years agoHandle non-zero return codes in legacy test
Tom Krizek [Mon, 19 Jun 2023 09:03:51 +0000 (11:03 +0200)] 
Handle non-zero return codes in legacy test

2 years agoHandle non-zero return codes in forward test
Tom Krizek [Fri, 16 Jun 2023 08:26:55 +0000 (10:26 +0200)] 
Handle non-zero return codes in forward test

2 years agoHandle non-zero return codes in upforwd test
Tom Krizek [Thu, 15 Jun 2023 13:22:59 +0000 (15:22 +0200)] 
Handle non-zero return codes in upforwd test

2 years agoHandle non-zero return codes in addzone test
Tom Krizek [Thu, 15 Jun 2023 13:20:20 +0000 (15:20 +0200)] 
Handle non-zero return codes in addzone test

2 years agoHandle non-zero return codes in rpzrecurse test
Tom Krizek [Thu, 15 Jun 2023 13:08:26 +0000 (15:08 +0200)] 
Handle non-zero return codes in rpzrecurse test

2 years agoHandle non-zero return codes in rpz test
Tom Krizek [Thu, 15 Jun 2023 12:57:27 +0000 (14:57 +0200)] 
Handle non-zero return codes in rpz test

2 years agoMake $? compatible with set -e in system tests
Tom Krizek [Fri, 9 Jun 2023 08:57:34 +0000 (10:57 +0200)] 
Make $? compatible with set -e in system tests

Ensure handling of return code from previous command doesn't cause the
script to halt if that code is non-zero when running with `set -e`.

2 years agoUse arithmetic expansion in system tests (followup)
Tom Krizek [Thu, 22 Jun 2023 12:09:22 +0000 (14:09 +0200)] 
Use arithmetic expansion in system tests (followup)

These are manual edits in addition of the automated changes from the
previous commit.

2 years agoUse arithmetic expansion in system tests
Tom Krizek [Thu, 8 Jun 2023 13:34:30 +0000 (15:34 +0200)] 
Use arithmetic expansion in system tests

Change the way arithmetic operations are performed in system test shell
scripts from using `expr` to `$(())`. This ensures that updating the
variable won't end up with a non-zero exit code, which would case the
script to exit prematurely when `set -e` is in effect.

The following replacements were performed using sed in all text files
(git grep -Il '' | xargs sed -i):

s/status=`expr $status + $ret`/status=$((status + ret))/g
s/n=`expr $n + 1`/n=$((n + 1))/g
s/t=`expr $t + 1`/t=$((t + 1))/g
s/status=`expr $status + 1`/status=$((status + 1))/g
s/try=`expr $try + 1`/try=$((try + 1))/g

2 years agoRun system tests with set -e
Tom Krizek [Wed, 7 Jun 2023 13:35:57 +0000 (15:35 +0200)] 
Run system tests with set -e

Ensure all shell system tests are executed with the errexit option set.
This prevents unchecked return codes from commands in the test from
interfering with the tests, since any failures need to be handled
explicitly.

2 years agoMerge branch 'mnowak/detect-core-dumps-after-server-failed-to-stop' into 'main'
Michal Nowak [Thu, 13 Jul 2023 13:12:37 +0000 (13:12 +0000)] 
Merge branch 'mnowak/detect-core-dumps-after-server-failed-to-stop' into 'main'

Detect core dumps after BIND failed to stop cleanly

See merge request isc-projects/bind9!8096

2 years agoDetect core dumps after BIND failed to stop cleanly
Michal Nowak [Tue, 11 Jul 2023 12:04:12 +0000 (14:04 +0200)] 
Detect core dumps after BIND failed to stop cleanly

With the pytest runner, when BIND crashed during test runtime, the
get_core_dumps.sh script hasn't been run, and core dumps were not
detected.

2 years agoMerge branch '4194-extend-dns-cookie-support' into 'main'
Mark Andrews [Thu, 13 Jul 2023 02:31:02 +0000 (02:31 +0000)] 
Merge branch '4194-extend-dns-cookie-support' into 'main'

Resolve "Extend DNS COOKIE support"

Closes #4194

See merge request isc-projects/bind9!8086

2 years agoAdd release note for [GL #4194]
Mark Andrews [Thu, 6 Jul 2023 07:19:52 +0000 (17:19 +1000)] 
Add release note for [GL #4194]

2 years agoAdd CHANGES note for [GL #4194]
Mark Andrews [Thu, 6 Jul 2023 07:13:40 +0000 (17:13 +1000)] 
Add CHANGES note for [GL #4194]

2 years agoCheck that BADCOOKIE is returned for a bad server COOKIE
Mark Andrews [Thu, 6 Jul 2023 07:09:02 +0000 (17:09 +1000)] 
Check that BADCOOKIE is returned for a bad server COOKIE

Send a well formed, all zeros, DNS COOKIE option to a named instance
running with default cookie settings and check that BADCOOKIE is
returned.

2 years agoReturn BADCOOKIE on validly formed bad SERVER COOKIES
Mark Andrews [Thu, 6 Jul 2023 06:58:53 +0000 (16:58 +1000)] 
Return BADCOOKIE on validly formed bad SERVER COOKIES

The server was previously tolerant of out-of-date or otherwise bad
DNS SERVER COOKIES that where well formed unless require-cookie was
set.  BADCOOKIE is now return for these conditions.

2 years agoMerge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.19.16' into 'main'
Tom Krizek [Mon, 10 Jul 2023 13:45:09 +0000 (13:45 +0000)] 
Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.19.16' into 'main'

Set up version and release notes for BIND 9.19.16

See merge request isc-projects/bind9!8092

2 years agoSet up release notes for BIND 9.19.16
Tom Krizek [Mon, 10 Jul 2023 13:08:50 +0000 (15:08 +0200)] 
Set up release notes for BIND 9.19.16

2 years agoUpdate BIND version to 9.19.16-dev
Tom Krizek [Mon, 10 Jul 2023 13:08:50 +0000 (15:08 +0200)] 
Update BIND version to 9.19.16-dev

2 years agoUpdate BIND version for release v9.19.15
Michał Kępień [Thu, 6 Jul 2023 13:58:14 +0000 (15:58 +0200)] 
Update BIND version for release

2 years agoAdd a CHANGES marker
Michał Kępień [Thu, 6 Jul 2023 13:58:14 +0000 (15:58 +0200)] 
Add a CHANGES marker

2 years agoMerge branch 'michal/prepare-documentation-for-bind-9.19.15' into 'v9.19.15-release'
Michał Kępień [Thu, 6 Jul 2023 13:54:10 +0000 (13:54 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.19.15' into 'v9.19.15-release'

Prepare documentation for BIND 9.19.15

See merge request isc-private/bind9!550

2 years agoAdd release note for GL #4132, GL #4136, GL #4171
Michał Kępień [Thu, 6 Jul 2023 13:38:48 +0000 (15:38 +0200)] 
Add release note for GL #4132, GL #4136, GL #4171

2 years agoTweak and reword release notes
Michał Kępień [Thu, 6 Jul 2023 13:38:48 +0000 (15:38 +0200)] 
Tweak and reword release notes

2 years agoPrepare release notes for BIND 9.19.15
Michał Kępień [Thu, 6 Jul 2023 13:38:48 +0000 (15:38 +0200)] 
Prepare release notes for BIND 9.19.15

2 years agoUpdate sample query log excerpt in the ARM
Michał Kępień [Thu, 6 Jul 2023 13:38:48 +0000 (15:38 +0200)] 
Update sample query log excerpt in the ARM

2 years agoFix typo in tests_shutdown.py
Michał Kępień [Thu, 6 Jul 2023 13:38:48 +0000 (15:38 +0200)] 
Fix typo in tests_shutdown.py

2 years agoMerge branch 'michal/add-changes-entry-for-tsig-tkey-refactoring' into 'main'
Michał Kępień [Thu, 6 Jul 2023 13:06:51 +0000 (13:06 +0000)] 
Merge branch 'michal/add-changes-entry-for-tsig-tkey-refactoring' into 'main'

Add CHANGES entry for !7828

See merge request isc-projects/bind9!8090

2 years agoAdd CHANGES entry for !7828
Michał Kępień [Thu, 6 Jul 2023 13:02:10 +0000 (15:02 +0200)] 
Add CHANGES entry for !7828

2 years agoMerge branch '4171-add-shutdown-check-in-dns_catz_dbupdate_callback' into 'main'
Arаm Sаrgsyаn [Thu, 6 Jul 2023 11:26:31 +0000 (11:26 +0000)] 
Merge branch '4171-add-shutdown-check-in-dns_catz_dbupdate_callback' into 'main'

Add shutdown checks in dns_catz_dbupdate_callback()

Closes #4171

See merge request isc-projects/bind9!8081

2 years agoAdd a CHANGES note for [GL #4171]
Aram Sargsyan [Tue, 4 Jul 2023 08:42:11 +0000 (08:42 +0000)] 
Add a CHANGES note for [GL #4171]

2 years agoAdd shutdown checks in dns_catz_dbupdate_callback()
Aram Sargsyan [Tue, 4 Jul 2023 08:38:39 +0000 (08:38 +0000)] 
Add shutdown checks in dns_catz_dbupdate_callback()

When a zone database update callback is called, the 'catzs' object,
extracted from the callback argument, might be already shutting down,
in which case the 'catzs->zones' can be NULL and cause an assertion
failure when calling isc_ht_find().

Add an early return from the callback if 'catzs->shuttingdown' is true.

Also check the validity of 'catzs->zones' after locking 'catzs' in
case there is a race with dns_catz_shutdown_catzs() running in another
thread.

2 years agoMerge branch '2471-test-three-is-a-crowd' into 'main'
Matthijs Mekking [Thu, 6 Jul 2023 08:03:34 +0000 (08:03 +0000)] 
Merge branch '2471-test-three-is-a-crowd' into 'main'

Add "three is a crowd" test case

Closes #2471

See merge request isc-projects/bind9!8065

2 years agoAdd test for "three is a crowd" bug (GL #2375)
Matthijs Mekking [Tue, 27 Jun 2023 14:29:50 +0000 (16:29 +0200)] 
Add test for "three is a crowd" bug (GL #2375)

Add this test scenario for a bug fixed a while ago. When a third key is
introduced while the previous rollover hasn't finished yet, the keymgr
could decide to remove the first two keys, because it was not checking
for an indirect dependency on the keys.

In other words, the previous bug behavior was that the first two keys
were removed from the zone too soon.

This test case checks that all three keys stay in the zone, and no keys
are removed premature after another new key has been introduced.

2 years agoCheck all keys despite early failure
Matthijs Mekking [Tue, 27 Jun 2023 14:27:35 +0000 (16:27 +0200)] 
Check all keys despite early failure

In the kasp script, if one expected key is not found, continue checking
the other key ids, even if there is no match for the first one.  This
provides a bit more information which keys mismatch and makes for
easier debugging test failures.

2 years agoMerge branch 'each-refactor-fetchopt' into 'main'
Evan Hunt [Tue, 4 Jul 2023 18:36:09 +0000 (18:36 +0000)] 
Merge branch 'each-refactor-fetchopt' into 'main'

clean up numbering of FETCHOPT and ADDRINFO flags

See merge request isc-projects/bind9!8079

2 years agoclean up numbering of FETCHOPT and ADDRINFO flags
Evan Hunt [Mon, 3 Jul 2023 19:43:17 +0000 (12:43 -0700)] 
clean up numbering of FETCHOPT and ADDRINFO flags

in the past there was overlap between the fields used
as resolver fetch options and ADB addrinfo flags. this has
mostly been eliminated; now we can clean up the rest of
it and remove some confusing comments.

2 years agoMerge branch 'tkrizek-shutdown-rndc-hang' into 'main'
Tom Krizek [Tue, 4 Jul 2023 11:34:00 +0000 (11:34 +0000)] 
Merge branch 'tkrizek-shutdown-rndc-hang' into 'main'

Split shutdown test into separate test cases

See merge request isc-projects/bind9!8058

2 years agoMark the test_named_shutdown[rndc] test as xfail
Tom Krizek [Mon, 26 Jun 2023 13:22:32 +0000 (15:22 +0200)] 
Mark the test_named_shutdown[rndc] test as xfail

It is currently affected by #4060, making the unstable as it
occassionally fails.

2 years agoUse timeout for rndc status in shutdown test
Tom Krizek [Mon, 26 Jun 2023 13:19:35 +0000 (15:19 +0200)] 
Use timeout for rndc status in shutdown test

Pass 5 second timeout to the rndc status command(s) to avoid hitting the
hard 10 second timeout from subprocess.call, which would result in an
unwanted exception that would only mask the real issue: if the rndc
status times out in this test, it is likely due to the server not
stopping as it should.

2 years agoSplit shutdown test into separate test cases
Tom Krizek [Mon, 26 Jun 2023 13:18:45 +0000 (15:18 +0200)] 
Split shutdown test into separate test cases

The shutdown test attempts to shut down the server using two different
methods - rndc and sigterm. Use pytest.mark.parametrize to run these as
separate test cases for easier identification of failures.

2 years agoMerge branch 'each-lock-counter' into 'main'
Evan Hunt [Fri, 30 Jun 2023 06:52:18 +0000 (06:52 +0000)] 
Merge branch 'each-lock-counter' into 'main'

fix a TSAN bug in "rndc fetchlimit"

See merge request isc-projects/bind9!8067

2 years agofix a TSAN bug in "rndc fetchlimit"
Evan Hunt [Wed, 28 Jun 2023 21:52:53 +0000 (14:52 -0700)] 
fix a TSAN bug in "rndc fetchlimit"

fctx counters could be accessed without locking when
"rndc fetchlimit" is called; while this is probably harmless
in production, it triggered TSAN reports in system tests.

2 years agoMerge branch '4173-refactor-resume_qmin' into 'main'
Evan Hunt [Thu, 29 Jun 2023 17:34:20 +0000 (17:34 +0000)] 
Merge branch '4173-refactor-resume_qmin' into 'main'

minor refactoring of resume_qmin() for clarity

Closes #4173

See merge request isc-projects/bind9!8068

2 years agominor refactoring of resume_qmin() for clarity
Evan Hunt [Wed, 28 Jun 2023 16:28:01 +0000 (09:28 -0700)] 
minor refactoring of resume_qmin() for clarity

make the code flow clearer by enumerating the result codes that
are treated as success conditions for an intermediate minimized
query (ISC_R_SUCCESS, DNS_R_DELEGATION, DNS_R_NXRRSET, etc), rather
than just folding them all into the 'default' branch of a switch
statement.

2 years agoMerge branch '4169-add-google-site-verification-tag-to-the-toc-page' into 'main'
Michał Kępień [Thu, 29 Jun 2023 16:48:15 +0000 (16:48 +0000)] 
Merge branch '4169-add-google-site-verification-tag-to-the-toc-page' into 'main'

Add Google Site Verification tag to the TOC page

Closes #4169

See merge request isc-projects/bind9!8076

2 years agoAdd Google Site Verification tag to the TOC page
Michał Kępień [Thu, 29 Jun 2023 16:32:50 +0000 (18:32 +0200)] 
Add Google Site Verification tag to the TOC page

This should allow tracking HTTP 404 errors for Read the Docs using the
Google Search Console.

2 years agoMerge branch 'michal/update-release-and-cve-checklists' into 'main'
Michał Kępień [Thu, 29 Jun 2023 14:14:02 +0000 (14:14 +0000)] 
Merge branch 'michal/update-release-and-cve-checklists' into 'main'

Update release and CVE checklists

See merge request isc-projects/bind9!8074

2 years agoUpdate release and CVE checklists
Michał Kępień [Thu, 29 Jun 2023 14:08:35 +0000 (16:08 +0200)] 
Update release and CVE checklists

2 years agoMerge branch 'tkrizek-disable-delv-in-tsan' into 'main'
Tom Krizek [Thu, 29 Jun 2023 10:58:44 +0000 (10:58 +0000)] 
Merge branch 'tkrizek-disable-delv-in-tsan' into 'main'

Disable delv tests under TSAN

See merge request isc-projects/bind9!8062

2 years agoCheck for unset variables only after conf.sh is loaded
Tom Krizek [Mon, 26 Jun 2023 16:59:32 +0000 (18:59 +0200)] 
Check for unset variables only after conf.sh is loaded

Make the cds/setup.sh compatible with the workaround which relies on
testing the TSAN_OPTIONS variable which may not be set.

2 years agoFix checking for executables in shell conditions in tests
Tom Krizek [Mon, 26 Jun 2023 15:14:16 +0000 (17:14 +0200)] 
Fix checking for executables in shell conditions in tests

Surround the variables which are checked whether they're executable in
double quotes. Without them, empty paths won't be properly interpreted
as not executable.

2 years agoOnly use delv if available in mkeys test
Tom Krizek [Mon, 26 Jun 2023 14:46:27 +0000 (16:46 +0200)] 
Only use delv if available in mkeys test

Check that $DELV is an executable before using it in a test.

2 years agoDisable delv tests under TSAN
Tom Krizek [Mon, 26 Jun 2023 14:40:03 +0000 (16:40 +0200)] 
Disable delv tests under TSAN

Since delv can occasionally hang in system tests when running with TSAN
(see GL#4119), disable these tests as a workaround. Otherwise, the hung
delv process will just waste CI resources and prevent any meaningful
output from the rest of the test suite.

2 years agoMerge branch '4154-restore-the-ability-to-read-old-hmac-md5-key-pair-files' into...
Mark Andrews [Thu, 29 Jun 2023 00:20:07 +0000 (00:20 +0000)] 
Merge branch '4154-restore-the-ability-to-read-old-hmac-md5-key-pair-files' into 'main'

Resolve "Restore the ability to read old HMAC-MD5 key pair files."

Closes #4154

See merge request isc-projects/bind9!8041

2 years agoEmit deprecated warning for K* file pairs
Mark Andrews [Tue, 27 Jun 2023 04:24:40 +0000 (14:24 +1000)] 
Emit deprecated warning for K* file pairs

We try reading the same file using different methods so only
emit a warning if we successfully read the file.

2 years agoAdd release note entry for [GL #4154]
Mark Andrews [Mon, 19 Jun 2023 08:58:40 +0000 (18:58 +1000)] 
Add release note entry for [GL #4154]

2 years agoTest legacy HMAC key files with dig
Mark Andrews [Mon, 19 Jun 2023 07:49:05 +0000 (17:49 +1000)] 
Test legacy HMAC key files with dig

tsig-keygen is now used to generate key files for TSIG.  These have
a different format to those that were generated by dnssec-keygen.
Test that dig can still read these files.

2 years agoTest support with legacy HMAC K files with nsupdate
Mark Andrews [Mon, 19 Jun 2023 04:14:39 +0000 (14:14 +1000)] 
Test support with legacy HMAC K files with nsupdate

tsig-keygen generates key files that are different to those that
where generated by dnssec-keygen.  Check that nsupdate can still
read those old format files.

2 years agoRestore the ability to read legacy K*+157+* files
Mark Andrews [Mon, 19 Jun 2023 04:17:14 +0000 (14:17 +1000)] 
Restore the ability to read legacy K*+157+* files

The ability to read legacy HMAC-MD5 K* keyfile pairs using algorithm
number 157 was accidentally lost when the algorithm numbers were
consolidated into a single block, in commit
09f7e0607a34d90eae53f862954e98c31b5ae532.

The assumption was that these algorithm numbers were only known
internally, but they were also used in key files. But since HMAC-MD5
got renumbered from 157 to 160, legacy HMAC-MD5 key files no longer
work.

Move HMAC-MD5 back to 157 and GSSAPI back to 160.  Add exception for
GSSAPI to list_hmac_algorithms.

2 years agoMerge branch '3325-strict-qname-minimisation-should-check-for-cached-nodata-for-ns...
Ondřej Surý [Wed, 28 Jun 2023 10:29:57 +0000 (10:29 +0000)] 
Merge branch '3325-strict-qname-minimisation-should-check-for-cached-nodata-for-ns-name' into 'main'

Refactor QNAME minimization to use NS records and check for cached NODATA

Closes #3325, #3326, and #3331

See merge request isc-projects/bind9!6267

2 years agoAdd release note for [GL #3325]
Mark Andrews [Tue, 23 May 2023 14:03:02 +0000 (00:03 +1000)] 
Add release note for [GL #3325]

2 years agoAdd CHANGES note for [GL #3325]
Mark Andrews [Tue, 23 May 2023 14:00:09 +0000 (00:00 +1000)] 
Add CHANGES note for [GL #3325]

2 years agoIn rctx_answer return DNS_R_DELEGATION on NOFOLLOW
Mark Andrews [Fri, 19 May 2023 02:22:51 +0000 (12:22 +1000)] 
In rctx_answer return DNS_R_DELEGATION on NOFOLLOW

When DNS_FETCHOPT_NOFOLLOW is set DNS_R_DELEGATION needs to be
returned to restart the resolution process rather than converting
it to ISC_R_SUCCESS.

2 years agoSkip some QNAME mininisation queries if possible
Mark Andrews [Tue, 23 May 2023 04:02:29 +0000 (14:02 +1000)] 
Skip some QNAME mininisation queries if possible

If we know that the NS RRset for an intermediate label doesn't exist
on cache contents don't query using that name when looking for a
referral.

2 years agoUse NS rather than A records for qname-minimization relaxed
Mark Andrews [Tue, 23 May 2023 06:59:40 +0000 (16:59 +1000)] 
Use NS rather than A records for qname-minimization relaxed

Remove all references to DNS_FETCHOPT_QMIN_USE_A and adjust
the expected tests results in the qmin system test.

2 years agoMerge branch 'fanf-overflow-checks' into 'main'
Ondřej Surý [Tue, 27 Jun 2023 13:13:14 +0000 (13:13 +0000)] 
Merge branch 'fanf-overflow-checks' into 'main'

Prevent integer overflow when allocating arrays

Closes #4120, #4121, and #4122

See merge request isc-projects/bind9!8007

2 years agoCHANGES entry
Tony Finch [Tue, 6 Jun 2023 17:14:08 +0000 (18:14 +0100)] 
CHANGES entry

[cleanup] Ensure that the size calculation does not overflow
when allocating memory for an array.
[GL #4120] [GL #4121] [GL #4122]

2 years agoCheck for overflow when resizing a heap
Tony Finch [Tue, 6 Jun 2023 14:24:02 +0000 (15:24 +0100)] 
Check for overflow when resizing a heap

Ensure that the heap size calculations produce the correct answers,
and use `isc_mem_reget()` instead of calling `get` and `put`.

Closes #4122

2 years agoCheck for overflow in jemalloc_shim
Tony Finch [Tue, 6 Jun 2023 14:20:44 +0000 (15:20 +0100)] 
Check for overflow in jemalloc_shim

When compiled using a malloc that lacks an equivalent to sallocx(),
the jemalloc_shim adds a size prefix to each allocation. We must check
that this does not overflow.

Closes #4121

2 years agoUse isc_mem_callocate() in http_calloc()
Tony Finch [Tue, 6 Jun 2023 14:19:20 +0000 (15:19 +0100)] 
Use isc_mem_callocate() in http_calloc()

Closes #4120

2 years agoAdd isc_mem_callocate() for safer array allocation
Tony Finch [Tue, 6 Jun 2023 14:15:31 +0000 (15:15 +0100)] 
Add isc_mem_callocate() for safer array allocation

As well as clearing the fresh memory, `calloc()`-like functions must
ensure that the count and size do not overflow when multiplied.

Use `isc_mem_callocate()` in `isc__uv_calloc()`.

2 years agoAdd <isc/overflow.h> for checked mul, add, and sub
Tony Finch [Tue, 6 Jun 2023 14:11:13 +0000 (15:11 +0100)] 
Add <isc/overflow.h> for checked mul, add, and sub

The `ISC_OVERFLOW_XXX()` macros are usually wrappers around
`__builtin_xxx_overflow()`, with alternative implementations
for compilers that lack the builtins.

Replace the overflow checks in `isc/time.c` with the new macros.

2 years agoMerge branch 'ondrej-use-loop-mctx-in-dns_resolver' into 'main'
Ondřej Surý [Tue, 27 Jun 2023 09:31:00 +0000 (09:31 +0000)] 
Merge branch 'ondrej-use-loop-mctx-in-dns_resolver' into 'main'

Use per-loop memory contexts for dns_resolver child objects

See merge request isc-projects/bind9!8015

2 years agoAdd CHANGES note for [GL !8015]
Ondřej Surý [Tue, 27 Jun 2023 08:53:02 +0000 (10:53 +0200)] 
Add CHANGES note for [GL !8015]

2 years agoUse per-loop memory contexts for dns_resolver child objects
Ondřej Surý [Wed, 7 Jun 2023 13:23:08 +0000 (15:23 +0200)] 
Use per-loop memory contexts for dns_resolver child objects

The dns_resolver creates a lot of smaller objects (fetch context, fetch
counter, query, response, ...) and those are all loop-bound.
Previously, those objects were allocated from the a single resolver
context, which in turn increases contention between threads - remember
"dead by thousand atomic paper cuts".  Instead of using a single memory
context, use the per-loop memory contexts that are bound to a specific
loop and thus there's no contention between them when doing the memory
accounting.

2 years agoMerge branch '4163-dont-create-and-destroy-call_rcu-threads-by-hand' into 'main'
Ondřej Surý [Tue, 27 Jun 2023 06:00:32 +0000 (06:00 +0000)] 
Merge branch '4163-dont-create-and-destroy-call_rcu-threads-by-hand' into 'main'

Remove the explicit call_rcu thread creating and destruction

Closes #4163

See merge request isc-projects/bind9!8060

2 years agoAdd CHANGES note for [GL #4163]
Ondřej Surý [Mon, 26 Jun 2023 14:05:51 +0000 (16:05 +0200)] 
Add CHANGES note for [GL #4163]

2 years agoRemove the explicit call_rcu thread creating and destruction
Ondřej Surý [Mon, 26 Jun 2023 13:58:48 +0000 (15:58 +0200)] 
Remove the explicit call_rcu thread creating and destruction

The free_all_cpu_call_rcu_data() call can consume hundreds of
milliseconds on shutdown.  Don't try to be smart and let the RCU library
handle this internally.

2 years agoMerge branch '950-test-validation' into 'main'
Evan Hunt [Mon, 26 Jun 2023 21:59:06 +0000 (21:59 +0000)] 
Merge branch '950-test-validation' into 'main'

explicitly set dnssec-validation in system tests

Closes #950

See merge request isc-projects/bind9!7999

2 years agoexplicitly set dnssec-validation in system tests
Evan Hunt [Fri, 2 Jun 2023 00:14:49 +0000 (17:14 -0700)] 
explicitly set dnssec-validation in system tests

the default value of dnssec-validation is 'auto', which causes
a server to send a key refresh query to the root zone when starting
up. this is undesirable behavior in system tests, so this commit
sets dnssec-validation to either 'yes' or 'no' in all tests where
it had not previously been set.

this change had the mostly-harmless side effect of changing the cached
trust level of unvalidated answer data from 'answer' to 'authanswer',
which caused a few test cases in which dumped cache data was examined in
the serve-stale system test to fail. those test cases have now been
updated to expect 'authanswer'.

2 years agoMerge branch 'tkrizek-system-test-fixes' into 'main'
Tom Krizek [Mon, 26 Jun 2023 11:06:36 +0000 (11:06 +0000)] 
Merge branch 'tkrizek-system-test-fixes' into 'main'

Fix a couple of oversights in system tests

See merge request isc-projects/bind9!8051

2 years agoCheck for proper file size output in dnstap test
Tom Krizek [Thu, 22 Jun 2023 16:08:17 +0000 (18:08 +0200)] 
Check for proper file size output in dnstap test

Previously, the first check silently failed, as 454 is apparently (in my
local setup) the minimum output size for the dnstap output, rather than
470 which the test was expecting. Effectively, the check served as a 5
second sleep rather than waiting for the proper file size.

Additionally, check the expected file sizes and fail if expectations
aren't met.

2 years agoCheck for proper log message in kasp test
Tom Krizek [Thu, 22 Jun 2023 15:57:22 +0000 (17:57 +0200)] 
Check for proper log message in kasp test

The log message is supposed to contain the zone name which was
erroneously omitted, but didn't pop up during tests, since return code
was silently ignored.

Now it actually waits for the proper log message rather than being an
equivalent of 3 second sleep (which was also sufficient to make the test
pass, thus we detected no failure).

2 years agoMerge branch 'tkrizek-forward-test-echo-i' into 'main'
Tom Krizek [Thu, 22 Jun 2023 17:15:50 +0000 (17:15 +0000)] 
Merge branch 'tkrizek-forward-test-echo-i' into 'main'

Fix echo_i typo in forward test

See merge request isc-projects/bind9!8050

2 years agoFix echo_i typo in forward test
Tom Krizek [Thu, 22 Jun 2023 16:54:48 +0000 (18:54 +0200)] 
Fix echo_i typo in forward test