Commit Graph

32445 Commits

Author SHA1 Message Date
Matthijs Mekking
52d3bf5f31 Change nsec3param salt config to saltlen
Upon request from Mark, change the configuration of salt to salt
length.

Introduce a new function 'dns_zone_checknsec3aram' that can be used
upon reconfiguration to check if the existing NSEC3 parameters are
in sync with the configuration. If a salt is used that matches the
configured salt length, don't change the NSEC3 parameters.

(cherry picked from commit 6f97bb6b1f)
2020-11-26 14:15:04 +00:00
Matthijs Mekking
d35dab3db8 Add check for NSEC3 and key algorithms
NSEC3 is not backwards compatible with key algorithms that existed
before the RFC 5155 specification was published.

(cherry picked from commit 00c5dabea3)
2020-11-26 14:15:03 +00:00
Matthijs Mekking
00d7cc5144 Disable one nsec3 test due to GL #2216
This known bug makes the test fail. There is no trivial fix so disable
test case for now.

(cherry picked from commit f10790b02d)
2020-11-26 14:15:03 +00:00
Matthijs Mekking
c993bc19a0 Add changes and notes for kasp NSEC3 support
This feature is news worthy.

(cherry picked from commit 9adad77ac3)
2020-11-26 14:15:03 +00:00
Matthijs Mekking
cf79e6ccc1 Add some NSEC3 optout tests
Make sure that just changing the optout value recreates the chain.

(cherry picked from commit a5b45bdd03)
2020-11-26 14:15:03 +00:00
Matthijs Mekking
2a1793a2be Check nsec3param configuration values
Check 'nsec3param' configuration for the number of iterations.  The
maximum number of iterations that are allowed are based on the key
size (see https://tools.ietf.org/html/rfc5155#section-10.3).

Check 'nsec3param' configuration for correct salt. If the string is
not "-" or hex-based, this is a bad salt.

(cherry picked from commit 7039c5f805)
2020-11-26 14:15:03 +00:00
Matthijs Mekking
b6cf88333a Don't use 'rndc signing' with kasp
The 'rndc signing' command allows you to manipulate the private
records that are used to store signing state. Don't use these with
'dnssec-policy' as such manipulations may violate the policy (if you
want to change the NSEC3 parameters, change the policy and reconfig).

(cherry picked from commit eae9a6d297)
2020-11-26 14:15:02 +00:00
Matthijs Mekking
d13786d583 Fix a reconfig bug wrt inline-signing
When doing 'rndc reconfig', named may complain about a zone not being
reusable because it has a raw version of the zone, and the new
configuration has not set 'inline-signing'. However, 'inline-signing'
may be implicitly true if a 'dnssec-policy' is used for the zone, and
the zone is not dynamic.

Improve the check in 'named_zone_reusable'.  Create a new function for
checking 'inline-signing' configuration that matches existing code in
'bin/named/server.c'.

(cherry picked from commit ba8128ea00)
2020-11-26 14:15:02 +00:00
Matthijs Mekking
008e84e965 Support for NSEC3 in dnssec-policy
Implement support for NSEC3 in dnssec-policy.  Store the configuration
in kasp objects. When configuring a zone, call 'dns_zone_setnsec3param'
to queue an nsec3param event. This will ensure that any previous
chains will be removed and a chain according to the dnssec-policy is
created.

Add tests for dnssec-policy zones that uses the new 'nsec3param'
option, as well as changing to new values, changing to NSEC, and
changing from NSEC.

(cherry picked from commit 114af58ee2)
2020-11-26 14:15:02 +00:00
Matthijs Mekking
5dfd3b2d7b Add kasp nsec3param configuration
Add configuration and documentation on how to enable NSEC3 when
using dnssec-policy for signing your zones.

(cherry picked from commit f7ca96c805)
2020-11-26 14:15:02 +00:00
Matthijs Mekking
9b9ac92fd0 Move generate_salt function to lib/dns/nsec3
We will be using this function also on reconfig, so it should have
a wider availability than just bin/named/server.

(cherry picked from commit 84a4273074)
2020-11-26 14:14:56 +00:00
Michal Nowak
e5dc276c65 Merge branch '1770-review-how-we-use-sys-un-h' into 'v9_16'
Fix typo in ISC_PLAFORM_HAVESYSUNH

See merge request isc-projects/bind9!4417
2020-11-26 14:04:55 +00:00
Michal Nowak
8885f4a6f7 Fix typo in ISC_PLAFORM_HAVESYSUNH 2020-11-26 14:17:17 +01:00
Michał Kępień
ae73b62ea9 Merge branch 'michal/use-proper-cmocka-macros-for-pointer-checks-v9_16' into 'v9_16'
[v9_16] Use proper cmocka macros for pointer checks

See merge request isc-projects/bind9!4429
2020-11-26 12:19:39 +00:00
Michał Kępień
a6f2e36ee6 Use proper cmocka macros for pointer checks
Make sure pointer checks in unit tests use cmocka assertion macros
dedicated for use with pointers instead of those dedicated for use with
integers or booleans.

(cherry picked from commit f440600126)
2020-11-26 13:13:21 +01:00
Michał Kępień
614d860c99 Merge branch 'v9_16_9-release' into 'v9_16'
Merge 9.16.9 release branch

See merge request isc-projects/bind9!4427
2020-11-26 11:31:46 +00:00
Michał Kępień
ce18f66336 Set up release notes for BIND 9.16.10 2020-11-26 12:30:25 +01:00
Michał Kępień
d29339750e Bump BIND_BASELINE_VERSION for ABI checks 2020-11-26 12:30:25 +01:00
Tinderbox User
12e9a1143e Merge branch 'prep-release' into v9_16_9-release 2020-11-26 12:25:53 +01:00
Michał Kępień
65f9517463 Merge branch 'michal/prepare-release-notes-for-bind-9.16.9' into 'v9_16_9-release'
Prepare release notes for BIND 9.16.9

See merge request isc-private/bind9!221
2020-11-26 12:25:53 +01:00
Tinderbox User
14620951cc prep 9.16.9 2020-11-26 12:25:53 +01:00
Michał Kępień
259bcc5cc2 Prepare release notes for BIND 9.16.9 2020-11-26 12:25:53 +01:00
Michał Kępień
d857435c02 Add release note for GL #2244 2020-11-26 12:25:53 +01:00
Michał Kępień
6a99a2f5e0 Add release note for GL #2236 2020-11-26 12:25:53 +01:00
Michał Kępień
9d847cb96b Add release note for GL #1736 2020-11-26 12:25:53 +01:00
Michał Kępień
10459b8151 Reorder release notes 2020-11-26 12:25:53 +01:00
Michał Kępień
51a5b64993 Tweak and reword release notes 2020-11-26 12:25:53 +01:00
Michał Kępień
72bd351694 Tweak and reword recent CHANGES entries 2020-11-26 12:25:53 +01:00
Michał Kępień
66f0c9ab6e Merge branch 'michal/fix-cppcheck-2.2-issues-v9_16' into 'v9_16'
[v9_16] Fix cppcheck 2.2 issues

See merge request isc-projects/bind9!4413
2020-11-25 12:43:01 +00:00
Mark Andrews
328e7474d2 Remove now redundant check for state != NULL
(cherry picked from commit ee135d8946)
2020-11-25 13:21:58 +01:00
Michał Kępień
a452798af4 Convert add_quota() to a function
cppcheck 2.2 reports the following false positive:

    lib/isc/tests/quota_test.c:71:21: error: Array 'quotas[101]' accessed at index 110, which is out of bounds. [arrayIndexOutOfBounds]
     isc_quota_t *quotas[110];
                        ^

The above is not even an array access, so this report is obviously
caused by a cppcheck bug.  Yet, it seems to be triggered by the presence
of the add_quota() macro, which should really be a function.  Convert
the add_quota() macro to a function in order to make the code cleaner
and to prevent the above cppcheck 2.2 false positive from being
triggered.

(cherry picked from commit ea54a932d2)
2020-11-25 13:21:58 +01:00
Michał Kępień
3158a2aead Silence cppcheck 2.2 false positive in udp_recv()
cppcheck 2.2 reports the following false positive:

    lib/dns/dispatch.c:1241:14: warning: Either the condition 'resp==NULL' is redundant or there is possible null pointer dereference: resp. [nullPointerRedundantCheck]
     if (disp != resp->disp) {
                 ^
    lib/dns/dispatch.c:1212:11: note: Assuming that condition 'resp==NULL' is not redundant
     if (resp == NULL) {
              ^
    lib/dns/dispatch.c:1241:14: note: Null pointer dereference
     if (disp != resp->disp) {
                 ^

Apparently this version of cppcheck gets confused about conditional
"goto" statements because line 1241 can never be reached if 'resp' is
NULL.

Move a code block to prevent the above false positive from being
reported without affecting the processing logic.

(cherry picked from commit 0b6216d1c7)
2020-11-25 13:21:58 +01:00
Michał Kępień
e395ff54e5 Teach cppcheck that fatal() does not return
cppcheck is not aware that the bin/dnssec/dnssectool.c:fatal() function
does not return.  This triggers certain cppcheck 2.2 false positives,
for example:

    bin/dnssec/dnssec-signzone.c:3470:13: warning: Either the condition 'ndskeys==8' is redundant or the array 'dskeyfile[8]' is accessed at index 8, which is out of bounds. [arrayIndexOutOfBoundsCond]
       dskeyfile[ndskeys++] = isc_commandline_argument;
                ^
    bin/dnssec/dnssec-signzone.c:3467:16: note: Assuming that condition 'ndskeys==8' is not redundant
       if (ndskeys == MAXDSKEYS) {
                   ^
    bin/dnssec/dnssec-signzone.c:3470:13: note: Array index out of bounds
       dskeyfile[ndskeys++] = isc_commandline_argument;
                ^

    bin/dnssec/dnssec-signzone.c:771:20: warning: Either the condition 'l->hashbuf==NULL' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
     memset(l->hashbuf + l->entries * l->length, 0, l->length);
                       ^
    bin/dnssec/dnssec-signzone.c:767:18: note: Assuming that condition 'l->hashbuf==NULL' is not redundant
      if (l->hashbuf == NULL) {
                     ^
    bin/dnssec/dnssec-signzone.c:771:20: note: Null pointer addition
     memset(l->hashbuf + l->entries * l->length, 0, l->length);
                       ^

Instead of suppressing all such warnings individually, conditionally
define a preprocessor macro which prevents them from being triggered.

(cherry picked from commit d9701e22b5)
2020-11-25 13:21:58 +01:00
Michał Kępień
ea33d1749c Remove cppcheck 2.0 false positive workarounds
The cppcheck bug which commit 4c2c93c821
works around was fixed in cppcheck 2.2.  Drop the relevant hack from the
definition of the cppcheck GitLab CI job.

(cherry picked from commit f06dfe0397)
2020-11-25 13:21:58 +01:00
Michal Nowak
aa83569975 Merge branch '1730-clean-up-no-op-ac_subst-calls-v9_16' into 'v9_16'
[v9_16] Remove unused Autoconf variables

See merge request isc-projects/bind9!4403
2020-11-24 17:38:56 +00:00
Michal Nowak
d28aca8448 Remove unused Autoconf variables 2020-11-24 18:35:40 +01:00
Michał Kępień
ec423f5c0b Merge branch 'michal/enable-stress-tests-to-be-run-on-demand-v9_16' into 'v9_16'
[v9_16] Enable "stress" tests to be run on demand

See merge request isc-projects/bind9!4408
2020-11-23 10:54:24 +00:00
Michał Kępień
b02919c4f9 Enable "stress" tests to be run on demand
The "stress" test can be run in different ways, depending on:

  - the tested scenario (authoritative, recursive),
  - the operating system used (Linux, FreeBSD),
  - the architecture used (amd64, arm64).

Currently, all supported "stress" test variants are automatically
launched for all scheduled pipelines and for pipelines started for tags;
there is no possibility of running these tests on demand, which could be
useful in certain circumstances.

Employ the "only:variables" key to enable fine-grained control over the
list of "stress" test jobs to be run for a given pipeline.  Three CI
variables are used to specify the list of "stress" test jobs to create:

  - BIND_STRESS_TEST_MODE: specifies the test mode to use; must be
    explicitly set in order for any "stress" test job to be created;
    allowed values are: "authoritative", "recursive",

  - BIND_STRESS_TEST_OS: specifies the operating system to run the test
    on; allowed values are: "linux", "freebsd"; defaults to "linux", may
    be overridden at pipeline creation time,

  - BIND_STRESS_TEST_ARCH: specifies the architecture to run the test
    on; allowed values are: "amd64", "arm64"; defaults to "amd64", may
    be overridden at pipeline creation time.

Since case-insensitive regular expressions are used for determining
which jobs to run, every variable described above may contain multiple
values.  For example, setting the BIND_STRESS_TEST_MODE variable to
"authoritative,recursive" will cause the "stress" test to be run in both
supported scenarios (either on the default OS/architecture combination,
i.e. Linux/amd64, or, if the relevant variables are explicitly
specified, the requested OS/architecture combinations).

(cherry picked from commit f23094223e)
2020-11-23 11:52:20 +01:00
Mark Andrews
f9aa84c533 Merge branch 'matthijs-fix-echo_i-in-auth-test-v9_16' into 'v9_16'
Fix syntax in echo_i messages

See merge request isc-projects/bind9!4404
2020-11-20 00:27:58 +00:00
Matthijs Mekking
259db79579 Fix syntax in echo_i messages
It's either "record returns" or "records return".

(cherry picked from commit 53188daf5b)
2020-11-20 10:43:21 +11:00
Mark Andrews
81eaf51c15 Merge branch '2280-check-dname-handling-when-qtype-is-cname-any-v9_16' into 'v9_16'
Fix DNAME when QTYPE is CNAME or ANY

See merge request isc-projects/bind9!4398
2020-11-19 01:07:54 +00:00
Mark Andrews
b3d259107f Fix DNAME when QTYPE is CNAME or ANY
The synthesised CNAME is not supposed to be followed when the
QTYPE is CNAME or ANY as the lookup is satisfied by the CNAME
record.

(cherry picked from commit e980affba0)
2020-11-19 10:52:29 +11:00
Matthijs Mekking
449d8bfa4f Merge branch '2066-fix-serve-stale-v9_16' into 'v9_16'
Resolve "Fix serve-stale so that it is usable when needed"

See merge request isc-projects/bind9!4387
2020-11-12 09:46:31 +00:00
Diego Fronza
10860b09be Update ARM and other documents 2020-11-12 10:13:04 +01:00
Diego Fronza
af45a64f86 Add CHANGES and release notes entry 2020-11-11 16:09:15 -03:00
Diego Fronza
f321d95464 Adjusted test to match new rndc serve-stale status output 2020-11-11 16:06:36 -03:00
Diego Fronza
4905c2e24a Output 'stale-refresh-time' value on rndc serve-stale status 2020-11-11 16:06:30 -03:00
Diego Fronza
73c199dec7 Check 'stale-refresh-time' when sharing cache between views
This commit ensures that, along with previous restrictions, a cache is
shareable between views only if their 'stale-refresh-time' value are
equal.
2020-11-11 16:06:23 -03:00
Matthijs Mekking
4d52ddbd15 Add two more system tests for stale-refresh-time
Add one test that checks the behavior when serve-stale is enabled
via configuration (as opposed to enabled via rndc).

Add one test that checks the behavior when stale-refresh-time is
disabled (set to 0).
2020-11-11 16:06:16 -03:00
Matthijs Mekking
276c912953 Change serve-stale test stale-answer-ttl
Using a 'stale-answer-ttl' the same value as the authoritative ttl
value makes it hard to differentiate between a response from the
stale cache and a response from the authoritative server.

Change the stale-answer-ttl from 2 to 4, so that it differs from the
authoritative ttl.
2020-11-11 16:06:07 -03:00