Commit graph

34473 commits

Author SHA1 Message Date
Tinderbox User
1c4b350ca2 Merge branch 'prep-release' into v9_16_31-release 2022-07-11 04:55:00 +00:00
Tinderbox User
a2bd0075bb prep 9.16.31 2022-07-11 04:49:15 +00:00
Michał Kępień
163c0b8089 Merge branch 'michal/prepare-documentation-for-bind-9.16.31' into 'v9_16_31-release'
Prepare documentation for BIND 9.16.31

See merge request isc-private/bind9!414
2022-07-11 04:40:29 +00:00
Michał Kępień
5cbf8d3c18 Tweak and reword release notes 2022-07-11 06:32:55 +02:00
Michał Kępień
59da803e86 Prepare release notes for BIND 9.16.31 2022-07-11 06:32:55 +02:00
Michał Kępień
7b1d377562 Merge branch '3441-fix-fetch-context-use-after-free-bugs' into 'v9_16'
Fix fetch context use-after-free bugs

See merge request isc-projects/bind9!6537
2022-07-11 04:18:04 +00:00
Michał Kępień
6505056267 Fix fetch context use-after-free bugs
fctx_decreference() may call fctx_destroy(), which in turn may free the
fetch context by calling isc_mem_putanddetach().  This means that
whenever fctx_decreference() is called, the fetch context pointer should
be assumed to point to garbage after that call.  Meanwhile, the
following pattern is used in several places in lib/dns/resolver.c:

    LOCK(&res->buckets[fctx->bucketnum].lock);
    bucket_empty = fctx_decreference(fctx);
    UNLOCK(&res->buckets[fctx->bucketnum].lock);

Given that 'fctx' may be freed by the fctx_decreference() call, there is
no guarantee that the value of fctx->bucketnum will be the same before
and after the fctx_decreference() call.  This can cause all kinds of
locking issues as LOCK() calls no longer match up with their UNLOCK()
counterparts.

Fix by always using a helper variable to hold the bucket number when the
pattern above is used.

Note that fctx_try() still uses 'fctx' after calling fctx_decreference()
(it calls fctx_done()).  This is safe to do because the reference count
for 'fctx' is increased a few lines earlier and it also cannot be zero
right before that increase happens, so the fctx_decreference() call in
that particular location never invokes fctx_destroy().  Nevertheless,
use a helper variable for that call site as well, to retain consistency
and to prevent copy-pasted code from causing similar problems in the
future.
2022-07-08 11:26:34 +02:00
Petr Špaček
bf2ea74622 Merge branch '3320-rewrite-arm-dnssec-chapter-v9_16' into 'v9_16'
Rewrite DNSSEC ARM Chapter [v9_16]

See merge request isc-projects/bind9!6536
2022-07-07 11:25:11 +00:00
Petr Špaček
4caaff0afa
Deduplicate Manual Signing between DNSSEC chapter and DNSSEC Guide
The two procedures were essentially the same, but each instance was
missing some details from the other. They are now combined into one text
in the DNSSEC Guide and linked from DNSSEC chapter.

(cherry picked from commit 7d25027898)
2022-07-07 12:04:39 +02:00
Suzanne Goldlust
71f3d521cb
Minor grammar improvements in the Signing chapter of the DNSSEC Guide
(cherry picked from commit 6b1ad4dcfb)
2022-07-07 11:48:33 +02:00
Petr Špaček
dd46af7f59
Deduplicate key filename description in the DNSSEC Guide
Third time ...

(cherry picked from commit 7e96801841)
2022-07-07 11:40:45 +02:00
Petr Špaček
6c1b34e9b5
Use ECDSAP256SHA256 in DNSSEC signing examples
(cherry picked from commit 3eb6898a14)
2022-07-07 11:39:32 +02:00
Matthijs Mekking
0a13a85dff
Add a section about key rollover
Describe how to do key rollovers with dnssec-policy. Update the
revert to unsigned recipe in the DNSSEC guide.

(cherry picked from commit f721986589)
2022-07-07 11:37:25 +02:00
Petr Špaček
75854c5e6b
Rewrite DNSSEC Validation subchapter in the ARM
Mostly deduplicating and linking information across the ARM.
Generally people should not touch it unless they what they are doing, so
let's try to discourage them a bit.

(cherry picked from commit bffa3063f0)
2022-07-07 11:07:32 +02:00
Petr Špaček
c9e52437ca
Resynchronize DNSSEC chapter with the main branch
This is essentially a backport of !6296.

Replace DNSSEC chapter with version from the main branch, commit
901b6425d2.

There were structural changes to the ARM in the main branch, and
replacing the whole file with a new version is an order of magniture
easier than attempting to cherry-pick individual changes which should, in
the end, produce the same file under a different name.

File names in the main branch and v9_16 are now in sync (for the DNSSEC
chapter).

Fixes: #3320
2022-07-07 10:34:06 +02:00
Mark Andrews
339668b2e4 Merge branch '3433-support-default-hmac-v9_18-v9_16' into 'v9_16'
Add DEFAULT_HMAC to conf.sh.common [v9_16]

See merge request isc-projects/bind9!6534
2022-07-07 05:29:39 +00:00
Mark Andrews
40c7096caf Add DEFAULT_HMAC to conf.sh.common
(cherry picked from commit 972d7fd682)
(cherry picked from commit ba45075acb)
2022-07-07 15:11:33 +10:00
Mark Andrews
19970f720d Merge branch '3061-ifconfig-sh-down-messes-up-loopback-interfaces-v9_16' into 'v9_16'
update ifconfig.sh [v9_16]

See merge request isc-projects/bind9!6531
2022-07-07 00:53:08 +00:00
Mark Andrews
e1b3d3d259 Add CHANGES note for [GL #3061]
(cherry picked from commit e0708c8950)
2022-07-07 10:16:07 +10:00
Mark Andrews
76ed6f32e8 update ifconfig.sh
* make it harder to get the interface numbers wrong by using 'max'
to specify the upper bound of the sequence of interfaces and use 'max'
when calculating the interface number
* extract the platform specific instruction into 'up' and 'down'
and call them from the inner loop so that the interface number is
calculated in one place.
* calculate the A and AAAA address in a single place rather than
in each command
* use /sbin/ipadm on Solaris 2.11 and greater

(cherry picked from commit abfb5b1173)
2022-07-07 10:15:35 +10:00
Mark Andrews
abf9a59b1a Merge branch '3429-detect-overflow-in-generate-directive-v9_16' into 'v9_16'
Check for overflow in $GENERATE computations [v9_16]

See merge request isc-projects/bind9!6527
2022-07-06 01:55:41 +00:00
Mark Andrews
3433983407 Add CHANGES note for [GL #3429]
(cherry picked from commit d935ead14b)
2022-07-06 11:36:10 +10:00
Evan Hunt
4897f3ccc0 Improve $GENERATE documentation
Clarify the documentation of $GENERATE modifiers and add an example.

(cherry picked from commit 13fb2faf7a)
2022-07-06 11:35:16 +10:00
Mark Andrews
d10e20da0d Tighten $GENERATE directive parsing
The original sscanf processing allowed for a number of syntax errors
to be accepted.  This included missing the closing brace in
${modifiers}

Look for both comma and right brace as intermediate seperators as
well as consuming the final right brace in the sscanf processing
for ${modifiers}.  Check when we got right brace to determine if
the sscanf consumed more input than expected and if so behave as
if it had stopped at the first right brace.

(cherry picked from commit 7be64c0e94)
2022-07-06 11:26:24 +10:00
Mark Andrews
16ac79a8f7 Check for overflow in $GENERATE computations
$GENERATE uses 'int' for its computations and some constructions
can overflow values that can be represented by an 'int' resulting
in undefined behaviour.  Detect these conditions and return a
range error.

(cherry picked from commit 5327b9708f)
2022-07-06 11:26:24 +10:00
Mark Andrews
357ac87986 Merge branch '3437-cds-error-window-too-small-v9_16' into 'v9_16'
Only report not matching stderr content when we look for it [v9_16]

See merge request isc-projects/bind9!6524
2022-07-05 18:33:05 +00:00
Mark Andrews
7cd7f7d2cb Increase the amount of time allowed for signing to occur in
On slow systems we have seen this take 9 seconds.  Increased the
allowance from 3 seconds to 10 seconds to reduce the probabilty of
a false negative from the system test.

(cherry picked from commit 4db847e80e)
2022-07-05 23:12:22 +10:00
Mark Andrews
351aa3d3b5 Only report not matching stderr content when we look for it
The previous test code could emit "D:cds:stderr did not match ''" rather
that just showing the contents of stderr.  Moved the debug line inside
the if/else block.

Replaced backquotes with $() and $(()) as approriate.

(cherry picked from commit 304d33fb32)
2022-07-05 23:12:22 +10:00
Michał Kępień
a9407704e6 Merge branch '3357-test_send_timeout-add-code-comment' into 'v9_16'
Add code comment to test_send_timeout test

See merge request isc-projects/bind9!6503
2022-07-04 21:12:33 +00:00
Michał Kępień
8ebc9c76a9 Add a code comment to the test_send_timeout() test 2022-07-04 23:10:59 +02:00
Petr Špaček
269ecb6f63 Merge branch 'marka-cobertura-replaced-by-coverage_report-v9_16' into 'v9_16'
Fix for GitLab 15.0: cobertura replaced by coverage_report [v9_16]

See merge request isc-projects/bind9!6514
2022-07-04 05:50:40 +00:00
Mark Andrews
7680a12431
Fix for GitLab 15.0: cobertura replaced by coverage_report
From Gitlab 15.0 release notes:

   artifacts:reports:cobertura keyword

   As of GitLab 15.0, the artifacts:reports:cobertura keyword has
   been replaced by artifacts:reports:coverage_report. Cobertura
   is the only supported report file, but this is the first step
   towards GitLab supporting other report types.

(cherry picked from commit 008032d268)
2022-07-04 07:15:53 +02:00
Arаm Sаrgsyаn
d50036114e Merge branch '3398-race-resolver-query-timeout-and-validation-v9_16' into 'v9_16'
Fix a race between resolver query timeout and validation

See merge request isc-projects/bind9!6419
2022-07-01 09:20:29 +00:00
Aram Sargsyan
d31223d477 Add CHANGES and release note for [GL #3398] 2022-07-01 08:42:28 +00:00
Aram Sargsyan
61d77affdd Remove resolver.c:maybe_destroy()
After refactoring of `validated()`, the `maybe_destroy()` function is
no longer expected to actually destroy the fetch context when it is
being called, so effectively it only ensures that the validators are
canceled when the context has no more queries and pending events, but
that is redundant, because `maybe_destroy()` `REQUIRE`s that the context
should be in the shutting down state, and the function which sets that
state is already canceling the validators in its own turn.

As a failsafe, to make sure that no validators will be created after
`fctx_doshutdown()` is called, add an early return from `valcreate()` if
the context is in the shutting down state.
2022-06-30 19:12:17 +00:00
Aram Sargsyan
058a2e7d44 Fix a race between resolver query timeout and validation
The `resolver.c:validated()` function unlinks the current validator from
the fetch's validators list, which can leave it empty, then unlocks
the bucket lock. If, by a chance, the fetch was timed out just before
the `validated()` call, the final timeout callback running in parallel
with `validated()` can find the fetch context with no active fetches
and with an empty validators list and destroy it, which is unexpected
for the `validated()` function and can lead to a crash.

Increase the fetch context's reference count in the beginning of
`validated()` and decrease it when it finishes its work to avoid the
unexpected destruction of the fetch context.
2022-06-30 18:58:58 +00:00
Michal Nowak
b56317fc56 Merge branch '2371-add-stress-testing-with-rpz-v9_16' into 'v9_16'
[v9_16] Add stress testing with RPZ

See merge request isc-projects/bind9!6498
2022-06-28 22:06:34 +00:00
Michal Nowak
49f96e6287
Add stress testing with RPZ
(cherry picked from commit d272574653)
2022-06-28 20:43:15 +02:00
Petr Špaček
54609a00be Merge branch '3408-drop-debian-9-stretch-v9_16' into 'v9_16'
Drop support for Debian 9 (Stretch) [v9_16]

See merge request isc-projects/bind9!6496
2022-06-28 16:00:34 +00:00
Petr Špaček
561f2a3930
Declare Debian 9 (Stretch) community-maintained
(cherry picked from commit 4ce1f25210)
2022-06-28 17:59:21 +02:00
Petr Špaček
a6496edf7e
Drop Debian 9 (Stretch) from CI
(cherry picked from commit aa86a8bcf0)
2022-06-28 17:59:20 +02:00
Matthijs Mekking
0420302a8a Merge branch '3422-dnssec-policy-clarifications-v9_16' into 'v9_16'
[v9_16] Add some clarifications wrt dynamic zones

See merge request isc-projects/bind9!6490
2022-06-27 12:38:18 +00:00
Matthijs Mekking
68105e66cf Add some clarifications wrt dynamic zones
These were suggested by GitLab user @elmaimbo.

(cherry picked from commit fb517eb52a)
2022-06-27 11:56:59 +02:00
Mark Andrews
0fbf59d6f8 Merge branch '3420-rrsetorder-update-status-v9_16' into 'v9_16'
Add missing update of status variable in rrsetorder system test [v9_16]

See merge request isc-projects/bind9!6481
2022-06-23 07:56:14 +00:00
Mark Andrews
c978785be6 Replace expr's with $((expression)) shell constucts
Also make indenting consistent.

(cherry picked from commit 669c42cd95)
2022-06-23 17:35:51 +10:00
Mark Andrews
9786a785f3 Add missing update of status variable in rrsetorder system test
(cherry picked from commit da63e63c41)
2022-06-23 17:28:58 +10:00
Michal Nowak
d29b7b2601 Merge branch 'mnowak/add-system_gcc_bullseye_unstable_amd64-ci-job-v9_16' into 'v9_16'
[v9_16] Add system:gcc:bullseye:unstable:amd64 CI job

See merge request isc-projects/bind9!6477
2022-06-22 13:52:21 +00:00
Michal Nowak
805fa06cc8
Put default-triggering-rules anchor in alphabetical order
(cherry picked from commit db1a72d581)
2022-06-22 15:06:10 +02:00
Michal Nowak
0f4623f717
Rename schedules_tags_web_triggering_rules anchor
The schedules_tags_web_triggering_rules anchor name should match it's
content, hence api_schedules_tags_triggers_web_triggering_rules anchor
name.

(cherry picked from commit 0629f53431)
2022-06-22 15:06:10 +02:00
Michal Nowak
4f3dc87d81
Extract API, schedules, triggers, and web triggering rules
(cherry picked from commit fbc1345dd7)
2022-06-22 14:58:54 +02:00