]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
6 years agoMerge branch '1265-disable-synth-from-dnssec-by-default-workaround-v9_14' into 'v9_14'
Ondřej Surý [Tue, 29 Oct 2019 11:39:27 +0000 (07:39 -0400)] 
Merge branch '1265-disable-synth-from-dnssec-by-default-workaround-v9_14' into 'v9_14'

Disable synth-from-dnssec by default [v9_14]

See merge request isc-projects/bind9!2494

6 years agoAdd CHANGES note
Ondřej Surý [Mon, 28 Oct 2019 20:09:01 +0000 (15:09 -0500)] 
Add CHANGES note

(cherry picked from commit 4a778cfa455a466fae5bb77d48c871b1b8b57c28)

6 years agoAdd release notes.
Ondřej Surý [Mon, 28 Oct 2019 20:07:43 +0000 (15:07 -0500)] 
Add release notes.

(cherry picked from commit fce5a01a63f4bdcb65e9f8786702b5ae66a6d4d7)

6 years agoAdjust synthfromdnssec system test to the changed defaults
Ondřej Surý [Mon, 28 Oct 2019 22:53:37 +0000 (17:53 -0500)] 
Adjust synthfromdnssec system test to the changed defaults

(cherry picked from commit 800d7843af8ee7dc0a5c4ac729762458ed310eb5)

6 years agoDisable NSEC Aggressive Cache (synth-from-dnssec) by default
Ondřej Surý [Mon, 28 Oct 2019 20:04:38 +0000 (15:04 -0500)] 
Disable NSEC Aggressive Cache (synth-from-dnssec) by default

It was found that NSEC Aggressive Caching has a significant performance impact
on BIND 9 when used as recursor.  This commit disables the synth-from-dnssec
configuration option by default to provide immediate remedy for people running
BIND 9.12+.  The NSEC Aggressive Cache will be enabled again after a proper fix
will be prepared.

(cherry picked from commit a20c42dca68737ca341bd24fff403cf5c7940aa1)

6 years agoMerge branch 'michal/add-centos-8-to-gitlab-ci-v9_14' into 'v9_14'
Michał Kępień [Tue, 29 Oct 2019 08:22:35 +0000 (04:22 -0400)] 
Merge branch 'michal/add-centos-8-to-gitlab-ci-v9_14' into 'v9_14'

[v9_14] Add CentOS 8 to GitLab CI

See merge request isc-projects/bind9!2492

6 years agoAdd CentOS 8 to GitLab CI
Michał Kępień [Fri, 25 Oct 2019 14:56:32 +0000 (16:56 +0200)] 
Add CentOS 8 to GitLab CI

Ensure BIND can be tested on CentOS 8 in GitLab CI to more quickly catch
build and test errors on that operating system.

(cherry picked from commit dce1c05042c840e7a3ea539ad864a54f2eb4a929)

6 years agoMerge branch '876-documentation-feedback-2-v9_14' into 'v9_14'
Mark Andrews [Thu, 24 Oct 2019 21:09:53 +0000 (17:09 -0400)] 
Merge branch '876-documentation-feedback-2-v9_14' into 'v9_14'

dnskey-sig-validity 0;

See merge request isc-projects/bind9!2487

6 years agoadd named-checkconf tests for dnskey-sig-validity at range limits
Mark Andrews [Thu, 24 Oct 2019 03:13:39 +0000 (14:13 +1100)] 
add named-checkconf tests for dnskey-sig-validity at range limits

(cherry picked from commit 918f020f9f5d3ca41cd230e489326654cf14c588)

6 years agoaccept 0 for dnskey-sig-validity (indicates off)
Mark Andrews [Thu, 24 Oct 2019 02:21:43 +0000 (13:21 +1100)] 
accept 0 for dnskey-sig-validity (indicates off)

(cherry picked from commit 20647657f9f64a51108c9f53240535d399bfcd4b)

6 years agoMerge branch '1281-dnstap-per-view-configuration-v9_14' into 'v9_14'
Mark Andrews [Mon, 21 Oct 2019 23:29:09 +0000 (19:29 -0400)] 
Merge branch '1281-dnstap-per-view-configuration-v9_14' into 'v9_14'

Resolve "dnstap per view configuration"

See merge request isc-projects/bind9!2479

6 years agoadd CHANGES
Mark Andrews [Mon, 21 Oct 2019 00:11:35 +0000 (11:11 +1100)] 
add CHANGES

(cherry picked from commit 6ce1e2e7315694889ff95c83958f00a845ac3018)

6 years agocheck for relationship between dnstap and dnstap-output seperately
Mark Andrews [Mon, 21 Oct 2019 00:08:06 +0000 (11:08 +1100)] 
check for relationship between dnstap and dnstap-output seperately

(cherry picked from commit c2fcc9f16f75d0a58767660d41dabf3bcd881787)

6 years agoadd more dnstap/dnstap-output combinations
Mark Andrews [Mon, 21 Oct 2019 00:06:21 +0000 (11:06 +1100)] 
add more dnstap/dnstap-output combinations

(cherry picked from commit f3d53630c302dffb9b429b2cbc0aa2c079116118)

6 years agoMerge branch 'security-v9_14' into v9_14
Tinderbox User [Sat, 19 Oct 2019 23:34:28 +0000 (23:34 +0000)] 
Merge branch 'security-v9_14' into v9_14

6 years agoMerge branch 'michal/address-cppcheck-1.89-warnings-v9_14' into 'v9_14'
Michał Kępień [Thu, 17 Oct 2019 09:50:06 +0000 (05:50 -0400)] 
Merge branch 'michal/address-cppcheck-1.89-warnings-v9_14' into 'v9_14'

[v9_14] Address cppcheck 1.89 warnings

See merge request isc-projects/bind9!2473

6 years agoSuppress cppcheck 1.89 false positive
Michał Kępień [Wed, 16 Oct 2019 20:06:00 +0000 (22:06 +0200)] 
Suppress cppcheck 1.89 false positive

cppcheck 1.89 emits a false positive for lib/dns/spnego_asn1.c:

    lib/dns/spnego_asn1.c:700:9: error: Uninitialized variable: data [uninitvar]
     memset(data, 0, sizeof(*data));
            ^
    lib/dns/spnego.c:1709:47: note: Calling function 'decode_NegTokenResp', 3rd argument '&resp' value is <Uninit>
     ret = decode_NegTokenResp(buf + taglen, len, &resp, NULL);
                                                  ^
    lib/dns/spnego_asn1.c:700:9: note: Uninitialized variable: data
     memset(data, 0, sizeof(*data));
            ^

This message started appearing with cppcheck 1.89 [1], but it will be
gone in the next release [2], so just suppress it for the time being.

[1] https://github.com/danmar/cppcheck/commit/af214e8212efa303e664920a468de00ee0b1fe3d

[2] https://github.com/danmar/cppcheck/commit/2595b826349a7ffbe1c958b806498b6e336bea33

(cherry picked from commit db7fd16346317600f6e1da0c25d50c37fddcf681)

6 years agoFix cppcheck 1.89 warnings
Michał Kępień [Wed, 16 Oct 2019 20:06:00 +0000 (22:06 +0200)] 
Fix cppcheck 1.89 warnings

cppcheck 1.89 enabled certain value flow analysis mechanisms [1] which
trigger null pointer dereference false positives in lib/dns/rpz.c:

    lib/dns/rpz.c:584:7: warning: Possible null pointer dereference: tgt_ip [nullPointer]
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:1425:44: note: Calling function 'adj_trigger_cnt', 4th argument '(void*)0' value is 0
      adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, true);
                                               ^
    lib/dns/rpz.c:584:7: note: Null pointer dereference
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:598:7: warning: Possible null pointer dereference: tgt_ip [nullPointer]
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:1425:44: note: Calling function 'adj_trigger_cnt', 4th argument '(void*)0' value is 0
      adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, true);
                                               ^
    lib/dns/rpz.c:598:7: note: Null pointer dereference
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:612:7: warning: Possible null pointer dereference: tgt_ip [nullPointer]
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:1425:44: note: Calling function 'adj_trigger_cnt', 4th argument '(void*)0' value is 0
      adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, true);
                                               ^
    lib/dns/rpz.c:612:7: note: Null pointer dereference
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^

It seems that cppcheck no longer treats at least some REQUIRE()
assertion failures as fatal, so add extra assertion macro definitions to
lib/isc/include/isc/util.h that are only used when the CPPCHECK
preprocessor macro is defined; these definitions make cppcheck 1.89
behave as expected.

There is an important requirement for these custom definitions to work:
cppcheck must properly treat abort() as a function which does not
return.  In order for that to happen, the __GNUC__ macro must be set to
a high enough number (because system include directories are used and
system headers compile attributes away if __GNUC__ is not high enough).
__GNUC__ is thus set to the major version number of the GCC compiler
used, which is what that latter does itself during compilation.

[1] https://github.com/danmar/cppcheck/commit/aaeec462e6d96bb70c2b1cf030979d09e2d7c959

(cherry picked from commit abfde3d543576311ce5d32089d774a360b7edc9f)

6 years agoMerge branch 'michal/cleanup-with-cc-alg-remnants-v9_14' into 'v9_14'
Michał Kępień [Tue, 15 Oct 2019 20:35:12 +0000 (16:35 -0400)] 
Merge branch 'michal/cleanup-with-cc-alg-remnants-v9_14' into 'v9_14'

[v9_14] Remove remnants of the --with-cc-alg option

See merge request isc-projects/bind9!2469

6 years agoRemove remnants of the --with-cc-alg option
Michał Kępień [Tue, 15 Oct 2019 19:57:58 +0000 (21:57 +0200)] 
Remove remnants of the --with-cc-alg option

Commit afa81ee4e4e863fa646177947c55e8c6b1475f47 omitted some spots in
the source tree which are still referencing the removed --with-cc-alg
"configure" option.  Make sure the latter is removed completely.

(cherry picked from commit 428dcf3b49d9c0ddbc1a2239812228172611bd56)

6 years agoMerge branch 'michal/limit-triggers-for-openbsd-system-test-jobs-v9_14' into 'v9_14'
Michał Kępień [Tue, 15 Oct 2019 19:52:45 +0000 (15:52 -0400)] 
Merge branch 'michal/limit-triggers-for-openbsd-system-test-jobs-v9_14' into 'v9_14'

[v9_14] Limit triggers for OpenBSD system test jobs

See merge request isc-projects/bind9!2467

6 years agoLimit triggers for OpenBSD system test jobs
Michał Kępień [Tue, 15 Oct 2019 19:35:18 +0000 (21:35 +0200)] 
Limit triggers for OpenBSD system test jobs

When a GitLab CI runner is not under load, a single OpenBSD system test
job completes in about 12 minutes, which is considered decent.  However,
such jobs are usually multiplexed with other system test jobs on the
same host, which causes each of them to take even 40 minutes to
complete.  Taking retries into account, this is completely unacceptable
for everyday use, so only start OpenBSD system test jobs for pipelines
created through GitLab's web interface and for pipelines created for Git
tags.

(cherry picked from commit 603e04563b65d230651c6861f4459c0ebdcd8fc5)

6 years agoMerge branch 'michal/minor-gitlab-ci-tweaks-v9_14' into 'v9_14'
Michał Kępień [Tue, 15 Oct 2019 19:45:57 +0000 (15:45 -0400)] 
Merge branch 'michal/minor-gitlab-ci-tweaks-v9_14' into 'v9_14'

[v9_14] Minor GitLab CI tweaks

See merge request isc-projects/bind9!2464

6 years agoTweak dependencies for the Windows build job
Michał Kępień [Tue, 15 Oct 2019 18:49:08 +0000 (20:49 +0200)] 
Tweak dependencies for the Windows build job

Since the Windows build job does not use the files created as a result
of running "autoreconf -fi" in the "autoreconf:sid:amd64" job, set its
dependencies to an empty list.

Since it is currently not possible to use "needs: []" for jobs which do
not belong to the first stage of a pipeline, set the "needs" key for the
Windows build job to the "autoreconf:sid:amd64" job so that all build
jobs are started at the same time (without this change, the Windows
build job does not start until all jobs in the "precheck" stage are
finished).

As a side note, these changes also attempt to eliminate intermittent,
bogus GitLab error messages ("There has been a missing dependency
failure").

(cherry picked from commit dd97dfdc1447833d70da82493400c5b8a87f73f6)

6 years agoFix artifacts created by the "autoreconf" CI job
Michał Kępień [Tue, 15 Oct 2019 18:49:08 +0000 (20:49 +0200)] 
Fix artifacts created by the "autoreconf" CI job

The intended purpose of the "autoreconf:sid:amd64" GitLab CI job is to
run "autoreconf -fi" and then pass the updated files on to subsequent
non-Windows build jobs.  However, the artifacts currently created by
that job only include files which are not tracked by Git.  Since we
currently do track e.g. "configure" with Git, the aforementioned job is
essentially a no-op.  Fix by manually specifying the files generated by
the "autoreconf:sid:amd64" job that should be passed on to subsequent
build jobs.

(cherry picked from commit e83b322f7f2c9e533319e250455bc12f752b4998)

6 years agoMerge branch 'michal/add-openbsd-to-gitlab-ci-v9_14' into 'v9_14'
Michał Kępień [Tue, 15 Oct 2019 18:44:41 +0000 (14:44 -0400)] 
Merge branch 'michal/add-openbsd-to-gitlab-ci-v9_14' into 'v9_14'

[v9_14] Add OpenBSD to GitLab CI

See merge request isc-projects/bind9!2459

6 years agoAdd OpenBSD to GitLab CI
Michał Kępień [Tue, 15 Oct 2019 14:38:04 +0000 (16:38 +0200)] 
Add OpenBSD to GitLab CI

Ensure BIND can be tested on OpenBSD in GitLab CI to more quickly catch
build and test errors on that operating system.

Some notes:

  - While GCC is packaged for OpenBSD, only old versions (4.2.1, 4.9.4)
    are readily available and none of them is the default system
    compiler, so we are only doing Clang builds in GitLab CI.

  - Unit tests are currently not run on OpenBSD because it ships with an
    old version of kyua which does not handle skipped tests properly.
    These jobs will be added when we move away from using kyua in the
    future as the test code itself works fine.

  - All OpenBSD jobs are run inside QEMU virtual machines, using GitLab
    Runner Custom executor.

(cherry picked from commit 07d2fcb5441960c508f5f36662f7c3acc5b98be7)

6 years agoWork around an OpenBSD "make" quirk
Michał Kępień [Tue, 15 Oct 2019 14:38:04 +0000 (16:38 +0200)] 
Work around an OpenBSD "make" quirk

Consider the following Makefile:

    foo:
     false

On OpenBSD, the following happens for this Makefile:

  - "make foo" returns 1,
  - "make -k foo" returns 0,
  - "make -k -j6 foo" returns 1.

However, if the .NOTPARALLEL pseudo-target is added to this Makefile,
"make -k -j6 foo" will return 0 as well.

Since bin/tests/Makefile contains the .NOTPARALLEL pseudo-target,
running "make -k -j6 test" from bin/tests/ on OpenBSD prevents any
errors from being reported through that command's exit code.

Work around the issue by running "make -k -j6 test" in the
bin/tests/system/ directory instead as bin/tests/system/Makefile does
not contain the .NOTPARALLEL pseudo-target and thus things work as
expected there.

(cherry picked from commit 6b5426e1a7e19e4e39848a362c3dce80b40243b9)

6 years agoMerge branch '1143-a-minor-documentation-issue-consideration-of-parsing-inconsistenci...
Mark Andrews [Sun, 13 Oct 2019 14:59:37 +0000 (10:59 -0400)] 
Merge branch '1143-a-minor-documentation-issue-consideration-of-parsing-inconsistencies-in-ipv4s-in-address-match-lists-and-in-a-controls-inet-statement-v9_14' into 'v9_14'

Resolve "A minor documentation issue & consideration of parsing inconsistencies in IPv4s in address match lists and in a controls/inet statement"

See merge request isc-projects/bind9!2454

6 years agoDetect partial prefixes / incomplete IPv4 address in acls.
Mark Andrews [Mon, 15 Jul 2019 00:25:36 +0000 (10:25 +1000)] 
Detect partial prefixes / incomplete IPv4 address in acls.

(cherry picked from commit fb87e669fb3cb7148fc5ff4226b20837971c3e66)

6 years agoMerge branch 'ondrej/1-week-artifact-expiration-v9_14' into 'v9_14'
Ondřej Surý [Thu, 10 Oct 2019 06:10:04 +0000 (02:10 -0400)] 
Merge branch 'ondrej/1-week-artifact-expiration-v9_14' into 'v9_14'

Synchronize the lifetime of artifact to 1 week

See merge request isc-projects/bind9!2449

6 years agoSynchronize the lifetime of artifact to 1 week
Ondřej Surý [Wed, 9 Oct 2019 19:34:18 +0000 (21:34 +0200)] 
Synchronize the lifetime of artifact to 1 week

(cherry picked from commit 85c0bede78522f6cc1ceaf8d1c2c1e5aae17263e)

6 years agoMerge branch 'fix-doc' into security-v9_14
Tinderbox User [Wed, 9 Oct 2019 20:54:55 +0000 (20:54 +0000)] 
Merge branch 'fix-doc' into security-v9_14

6 years agoregenerate doc
Tinderbox User [Wed, 9 Oct 2019 20:54:43 +0000 (20:54 +0000)] 
regenerate doc

6 years agoMerge branch 'security-v9_14-issue-numbers' into 'security-v9_14'
Ondřej Surý [Wed, 9 Oct 2019 06:34:53 +0000 (02:34 -0400)] 
Merge branch 'security-v9_14-issue-numbers' into 'security-v9_14'

Fix the GitLab issue numbers in CHANGES and notes.xml

See merge request isc-private/bind9!120

6 years agoFix the GitLab issue numbers in CHANGES and notes.xml
Ondřej Surý [Wed, 9 Oct 2019 06:02:05 +0000 (08:02 +0200)] 
Fix the GitLab issue numbers in CHANGES and notes.xml

6 years agoMerge branch 'marka-missing-runtime-check-v9_14' into 'v9_14'
Mark Andrews [Fri, 4 Oct 2019 04:34:22 +0000 (00:34 -0400)] 
Merge branch 'marka-missing-runtime-check-v9_14' into 'v9_14'

missing RUNTIME_CHECK

See merge request isc-projects/bind9!2417

6 years agoadd CHANGES
Mark Andrews [Mon, 30 Sep 2019 07:45:38 +0000 (17:45 +1000)] 
add CHANGES

(cherry picked from commit 346624fe3838c2bb367aa2b07a262729497d01f3)

6 years agoMove the failure handling block closer to the only place where it could fail
Ondřej Surý [Fri, 13 Sep 2019 08:52:06 +0000 (10:52 +0200)] 
Move the failure handling block closer to the only place where it could fail

(cherry picked from commit 69ecc711ac0c862b4ec8a186fcd06db8023526a6)

6 years agoReplace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf()
Ondřej Surý [Tue, 10 Sep 2019 12:42:41 +0000 (14:42 +0200)] 
Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf()

Use the semantic patch from the previous commit to replace all the calls to
dns_name_copy() with NULL as third argument with dns_name_copynf().

(cherry picked from commit c2dad0dcb2523a7711380e4409144745231b5282)

6 years agoAdd semantic patch to replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_c...
Ondřej Surý [Tue, 10 Sep 2019 12:41:53 +0000 (14:41 +0200)] 
Add semantic patch to replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf

(cherry picked from commit ac26ecf540e7c6138a227de3e564b17f06df8b5b)

6 years agoSplit dns_name_copy() into dns_name_copy() and dns_name_copynf()
Ondřej Surý [Tue, 10 Sep 2019 12:36:41 +0000 (14:36 +0200)] 
Split dns_name_copy() into dns_name_copy() and dns_name_copynf()

The dns_name_copy() function followed two different semanitcs that was driven
whether the last argument was or wasn't NULL.  This commit splits the function
in two where now third argument to dns_name_copy() can't be NULL and
dns_name_copynf() doesn't have third argument.

(cherry picked from commit f7aef3738a9288d6b85bdc9ef4496ca1120acac7)

6 years agoThe final round of adding RUNTIME_CHECK() around dns_name_copy() calls
Ondřej Surý [Fri, 27 Sep 2019 06:37:26 +0000 (08:37 +0200)] 
The final round of adding RUNTIME_CHECK() around dns_name_copy() calls

This commit was done by hand to add the RUNTIME_CHECK() around stray
dns_name_copy() calls with NULL as third argument.  This covers the edge cases
that doesn't make sense to write a semantic patch since the usage pattern was
unique or almost unique.

(cherry picked from commit 5efa29e03afc6c29aff881efe9d9b188bff65e46)

6 years agoAdd RUNTIME_CHECK() around result = dns_name_copy(..., NULL) calls
Ondřej Surý [Tue, 10 Sep 2019 11:55:18 +0000 (13:55 +0200)] 
Add RUNTIME_CHECK() around result = dns_name_copy(..., NULL) calls

This second commit uses second semantic patch to replace the calls to
dns_name_copy() with NULL as third argument where the result was stored in a
isc_result_t variable.  As the dns_name_copy(..., NULL) cannot fail gracefully
when the third argument is NULL, it was just a bunch of dead code.

Couple of manual tweaks (removing dead labels and unused variables) were
manually applied on top of the semantic patch.

(cherry picked from commit 89b269b0d28e0acf4a1f92414b5df2e86e2a008e)

6 years agoAdd RUNTIME_CHECK() around plain dns_name_copy(..., NULL) calls using spatch
Ondřej Surý [Tue, 10 Sep 2019 11:16:48 +0000 (13:16 +0200)] 
Add RUNTIME_CHECK() around plain dns_name_copy(..., NULL) calls using spatch

This commit add RUNTIME_CHECK() around all simple dns_name_copy() calls where
the third argument is NULL using the semantic patch from the previous commit.

(cherry picked from commit 35bd7e4da0c59a912cd0785dff11aafc4026253b)

6 years agoAdd semantic patches to correctly check dns_name_copy(..., NULL) return code
Ondřej Surý [Mon, 9 Sep 2019 10:14:39 +0000 (12:14 +0200)] 
Add semantic patches to correctly check dns_name_copy(..., NULL) return code

The dns_name_copy() function cannot fail gracefully when the last argument
(target) is NULL.  Add RUNTIME_CHECK()s around such calls.

The first semantic patch adds RUNTIME_CHECK() around any call that ignores the
return value and is very safe to apply.

The second semantic patch attempts to properly add RUNTIME_CHECK() to places
where the return value from `dns_name_copy()` is recorded into `result`
variable.  The result of this semantic patch needs to be reviewed by hand.

Both patches misses couple places where the code surrounding the
`dns_name_copy(..., NULL)` usage is more complicated and is better suited to be
fixed by a human being that understands the surrounding code.

(cherry picked from commit 406eba0c4125c99ec4c79839a8a890b812225ca4)

6 years agoMerge branch 'marka-cppcheck-fixes-v9_12-and-v9_14' into 'v9_14'
Mark Andrews [Fri, 4 Oct 2019 03:36:19 +0000 (23:36 -0400)] 
Merge branch 'marka-cppcheck-fixes-v9_12-and-v9_14' into 'v9_14'

Address cppcheck reports (v9_11/v9_14)

See merge request isc-projects/bind9!2342

6 years agoAddress cppcheck reports
Mark Andrews [Fri, 13 Sep 2019 06:06:34 +0000 (16:06 +1000)] 
Address cppcheck reports

6 years agoMerge branch 'marka-silence-clang-v9_14' into 'v9_14'
Mark Andrews [Fri, 4 Oct 2019 01:58:45 +0000 (21:58 -0400)] 
Merge branch 'marka-silence-clang-v9_14' into 'v9_14'

silence clang warning by using local variable.

See merge request isc-projects/bind9!2441

6 years agosilence clang warning by using local variable.
Mark Andrews [Tue, 1 Oct 2019 04:06:53 +0000 (14:06 +1000)] 
silence clang warning by using local variable.

'isc_commandline_index' is a global variable so it can theoretically
change result between if expressions.  Save 'argv[isc_commandline_index]'
to local variable 'arg1' and use 'arg1 == NULL' in if expressions
instead of 'argc < isc_commandline_index + 1'.  This allows clang
to correctly determine what code is reachable.

(cherry picked from commit 1b27ab8642a43617d1359375d1cff7afd5bd79e3)

6 years agoMerge branch 'ondrej/fix-docs-autoreconf-v9_14' into 'v9_14'
Ondřej Surý [Thu, 3 Oct 2019 14:08:05 +0000 (10:08 -0400)] 
Merge branch 'ondrej/fix-docs-autoreconf-v9_14' into 'v9_14'

Fix docs -> autoreconf dependencies in the .gitlab-ci.yml (v9_14)

See merge request isc-projects/bind9!2439

6 years agoFix the triggering rule for autoreconf job (take 2)
Ondřej Surý [Tue, 1 Oct 2019 14:42:33 +0000 (16:42 +0200)] 
Fix the triggering rule for autoreconf job (take 2)

6 years agoFix docs -> autoreconf dependencies in the .gitlab-ci.yml
Ondřej Surý [Tue, 1 Oct 2019 14:29:33 +0000 (16:29 +0200)] 
Fix docs -> autoreconf dependencies in the .gitlab-ci.yml

6 years agoMerge branch 'ondrej/enable-cppcheck-v9_14' into 'v9_14'
Ondřej Surý [Thu, 3 Oct 2019 12:20:18 +0000 (08:20 -0400)] 
Merge branch 'ondrej/enable-cppcheck-v9_14' into 'v9_14'

Enable Cppcheck for v9_14 branch

See merge request isc-projects/bind9!2432

6 years agoUse util/suppressions.txt for Cppcheck suppressions list
Ondřej Surý [Thu, 3 Oct 2019 12:02:08 +0000 (14:02 +0200)] 
Use util/suppressions.txt for Cppcheck suppressions list

6 years agolib/isc/tests/md_test.c: Silence sizeofFunctionCall Cppcheck
Ondřej Surý [Thu, 3 Oct 2019 08:21:04 +0000 (10:21 +0200)] 
lib/isc/tests/md_test.c: Silence sizeofFunctionCall Cppcheck

6 years agolib/isc/tests/hmac_test.c: Silence sizeofFunctionCall Cppcheck
Ondřej Surý [Thu, 3 Oct 2019 08:20:29 +0000 (10:20 +0200)] 
lib/isc/tests/hmac_test.c: Silence sizeofFunctionCall Cppcheck

6 years agolib/dns/zone.c: Fix invalid order of DbC checks that could cause dereference before...
Ondřej Surý [Thu, 3 Oct 2019 08:16:03 +0000 (10:16 +0200)] 
lib/dns/zone.c: Fix invalid order of DbC checks that could cause dereference before NULL check

6 years agolib/dns/sdlz.c: Use the referenced variable in the DbC check
Ondřej Surý [Thu, 3 Oct 2019 08:15:35 +0000 (10:15 +0200)] 
lib/dns/sdlz.c: Use the referenced variable in the DbC check

6 years agolib/dns/sdb.c: Fix invalid order of DbC checks that could cause dereference before...
Ondřej Surý [Thu, 3 Oct 2019 08:14:43 +0000 (10:14 +0200)] 
lib/dns/sdb.c: Fix invalid order of DbC checks that could cause dereference before NULL check

6 years agoRemove randomly scattered additional style check suppressions that caused unmatchedSu...
Ondřej Surý [Fri, 27 Sep 2019 10:48:23 +0000 (12:48 +0200)] 
Remove randomly scattered additional style check suppressions that caused unmatchedSuppression

(cherry picked from commit a0d3614a609bc9e5af39f2282daac78c40ab6363)

6 years agolib/ns/query.c: Fix invalid order of DbC checks that could cause dereference before...
Ondřej Surý [Fri, 27 Sep 2019 10:12:14 +0000 (12:12 +0200)] 
lib/ns/query.c: Fix invalid order of DbC checks that could cause dereference before NULL check

(cherry picked from commit d1f035bbba57df40407a8c1dfbebc15cf42eccf3)

6 years agolib/ns/interfacemgr.c: Fix invalid order of DbC checks that could cause dereference...
Ondřej Surý [Fri, 27 Sep 2019 10:11:16 +0000 (12:11 +0200)] 
lib/ns/interfacemgr.c: Fix invalid order of DbC checks that could cause dereference before NULL check

(cherry picked from commit 033f3eb58046f2f1f97d434bc3e7bdc6f2c15125)

6 years agolib/ns/client.c: Fix invalid order of DbC checks that could cause dereference before...
Ondřej Surý [Fri, 27 Sep 2019 10:10:44 +0000 (12:10 +0200)] 
lib/ns/client.c: Fix invalid order of DbC checks that could cause dereference before NULL check

(cherry picked from commit b4a42a286fd33ef1bdc6d8b74ade12e56da3b35c)

6 years agolib/isccfg/parser.c: Fix invalid order of DbC checks that could cause dereference...
Ondřej Surý [Fri, 27 Sep 2019 10:07:32 +0000 (12:07 +0200)] 
lib/isccfg/parser.c: Fix invalid order of DbC checks that could cause dereference before NULL check

(cherry picked from commit f855f09a55bd7e3ba96ae42a64a81737c3c36ac6)

6 years agolib/isccfg/aclconf.c: Suppress nullPointerRedundantCheck false positive
Ondřej Surý [Fri, 27 Sep 2019 10:06:16 +0000 (12:06 +0200)] 
lib/isccfg/aclconf.c: Suppress nullPointerRedundantCheck false positive

(cherry picked from commit 09232213d70c2a746f18ee0e9797883b9fe43f57)

6 years agolib/isc/unix/socket.c: Suppress preprocessorErrorDirective error from Cppcheck
Ondřej Surý [Fri, 27 Sep 2019 10:04:35 +0000 (12:04 +0200)] 
lib/isc/unix/socket.c: Suppress preprocessorErrorDirective error from Cppcheck

(cherry picked from commit 026cf2ff4f72adfdf17d4b45496a1d3866c068ab)

6 years agolib/isc/task.c: Fix invalid order of DbC checks that could cause dereference before...
Ondřej Surý [Fri, 27 Sep 2019 10:02:41 +0000 (12:02 +0200)] 
lib/isc/task.c: Fix invalid order of DbC checks that could cause dereference before NULL check

(cherry picked from commit c662969da190dfa186d9357b2d4454b571c2ed1a)

6 years agolib/isc/pkc11.c: Fix possible NULL pointer dereference in push_attribute()
Ondřej Surý [Fri, 27 Sep 2019 10:01:30 +0000 (12:01 +0200)] 
lib/isc/pkc11.c: Fix possible NULL pointer dereference in push_attribute()

(cherry picked from commit e8948fd9b4b8b188db2d51600dc01a46d57d4b5f)

6 years agolib/isc/buffer.c: Fix invalid order of DbC checks that could cause dereference before...
Ondřej Surý [Fri, 27 Sep 2019 09:53:49 +0000 (11:53 +0200)] 
lib/isc/buffer.c: Fix invalid order of DbC checks that could cause dereference before NULL check

(cherry picked from commit e9f30fc2115524fdef638bc33beaf00a56d27b70)

6 years agolib/dns/tsig.c: Suppress Cppcheck false positive error uninitStructMember
Ondřej Surý [Fri, 27 Sep 2019 09:51:15 +0000 (11:51 +0200)] 
lib/dns/tsig.c: Suppress Cppcheck false positive error uninitStructMember

(cherry picked from commit 8f2ad12d0a308a5f72f60148694976563c9a577d)

6 years agolib/dns/tests/rbt_serialize_test.c: Fix dereference before DbC check
Ondřej Surý [Fri, 27 Sep 2019 09:40:44 +0000 (11:40 +0200)] 
lib/dns/tests/rbt_serialize_test.c: Fix dereference before DbC check

(cherry picked from commit 14c174d9212f0c8c9598d21e205d5d7380c54969)

6 years agoInstead of declaring unused va_list, just don't declare it at all
Ondřej Surý [Fri, 27 Sep 2019 09:40:00 +0000 (11:40 +0200)] 
Instead of declaring unused va_list, just don't declare it at all

(cherry picked from commit 269d507cccab454bf221f03d83b6882668b41c33)

6 years agolib/dns/rdatalist.c: Fix dereference before DbC check
Ondřej Surý [Fri, 27 Sep 2019 09:37:27 +0000 (11:37 +0200)] 
lib/dns/rdatalist.c: Fix dereference before DbC check

(cherry picked from commit 5fc7e98d296f2c094b11cfed68becc60a73d1594)

6 years agolib/dns/rdata/*/*.c: Silence false positive nullPointerRedundantCheck warning from...
Ondřej Surý [Fri, 27 Sep 2019 08:40:51 +0000 (10:40 +0200)] 
lib/dns/rdata/*/*.c: Silence false positive nullPointerRedundantCheck warning from Cppcheck

Cppcheck gets confused by:

void bar(void *arg) {
    foo *data = arg;
    REQUIRE(source != NULL);
    REQUIRE(data->member != NULL);
}

and for consistency the DbC check needs to be changed to

void bar(void *arg) {
    foo *data = arg;
    REQUIRE(data != NULL);
    REQUIRE(data->member != NULL);
}

(cherry picked from commit 66af8713d8a4350780c060d517dea27d2c31dd08)

6 years agolib/dns/rdata.c: Silence false positive nullPointerRedundantCheck warning from Cppcheck
Ondřej Surý [Fri, 27 Sep 2019 08:38:18 +0000 (10:38 +0200)] 
lib/dns/rdata.c: Silence false positive nullPointerRedundantCheck warning from Cppcheck

(cherry picked from commit e68333aa67e304ff295820cadb7bbfb293e77111)

6 years agolib/dns/rbtdb.c: Add DbC check to safely dereference rbtdb in rbt_datafixer()
Ondřej Surý [Fri, 27 Sep 2019 08:35:49 +0000 (10:35 +0200)] 
lib/dns/rbtdb.c: Add DbC check to safely dereference rbtdb in rbt_datafixer()

(cherry picked from commit d508ce4036ce4431b8e6a58697cf890bed6db341)

6 years agolib/dns/rbt.c: Suppress nullPointerRedundantCheck warnings from Cppcheck
Ondřej Surý [Fri, 27 Sep 2019 08:28:30 +0000 (10:28 +0200)] 
lib/dns/rbt.c: Suppress nullPointerRedundantCheck warnings from Cppcheck

(cherry picked from commit 8be5c3fcfcbe7ed2dee3eaf508d0a674141636fa)

6 years agolib/dns/name.c: Fix dereference before DbC check reported by Cppcheck
Ondřej Surý [Fri, 27 Sep 2019 08:05:27 +0000 (10:05 +0200)] 
lib/dns/name.c: Fix dereference before DbC check reported by Cppcheck

(cherry picked from commit 0f5860aad3a131d22b6fb1ffc97da83a1b1bca21)

6 years agolib/dns/gssapi_link.c: Fix %d -> %u formatting when printing unsigned integers
Ondřej Surý [Fri, 27 Sep 2019 08:04:26 +0000 (10:04 +0200)] 
lib/dns/gssapi_link.c: Fix %d -> %u formatting when printing unsigned integers

(cherry picked from commit cea871464fe56b951dfde5a33dda962551c919b1)

6 years agoFix passing NULL after the last typed argument to a variadic function leads to undefi...
Ondřej Surý [Fri, 27 Sep 2019 08:00:46 +0000 (10:00 +0200)] 
Fix passing NULL after the last typed argument to a variadic function leads to undefined behaviour.

From Cppcheck:

Passing NULL after the last typed argument to a variadic function leads to
undefined behaviour.  The C99 standard, in section 7.15.1.1, states that if the
type used by va_arg() is not compatible with the type of the actual next
argument (as promoted according to the default argument promotions), the
behavior is undefined.  The value of the NULL macro is an implementation-defined
null pointer constant (7.17), which can be any integer constant expression with
the value 0, or such an expression casted to (void*) (6.3.2.3). This includes
values like 0, 0L, or even 0LL.In practice on common architectures, this will
cause real crashes if sizeof(int) != sizeof(void*), and NULL is defined to 0 or
any other null pointer constant that promotes to int.  To reproduce you might be
able to use this little code example on 64bit platforms. If the output includes
"ERROR", the sentinel had only 4 out of 8 bytes initialized to zero and was not
detected as the final argument to stop argument processing via
va_arg(). Changing the 0 to (void*)0 or 0L will make the "ERROR" output go away.

void f(char *s, ...) {
    va_list ap;
    va_start(ap,s);
    for (;;) {
        char *p = va_arg(ap,char*);
        printf("%018p, %s\n", p, (long)p & 255 ? p : "");
        if(!p) break;
    }
    va_end(ap);
}

void g() {
    char *s2 = "x";
    char *s3 = "ERROR";

    // changing 0 to 0L for the 7th argument (which is intended to act as
    // sentinel) makes the error go away on x86_64
    f("first", s2, s2, s2, s2, s2, 0, s3, (char*)0);
}

void h() {
    int i;
    volatile unsigned char a[1000];
    for (i = 0; i<sizeof(a); i++)
        a[i] = -1;
}

int main() {
    h();
    g();
    return 0;
}

(cherry picked from commit d8879af877c232bd15d0011e65c8759f36a09901)

6 years agolib/dns/ecdb.c: Fix couple of DbC conditions reported by Cppcheck
Ondřej Surý [Fri, 27 Sep 2019 07:55:19 +0000 (09:55 +0200)] 
lib/dns/ecdb.c: Fix couple of DbC conditions reported by Cppcheck

(cherry picked from commit 91cc6b9eb9242da5eb188462725b3553fd372360)

6 years agoFix the constification of the dns_name_t * result variable for dns_tsig_identity()
Ondřej Surý [Fri, 27 Sep 2019 07:49:31 +0000 (09:49 +0200)] 
Fix the constification of the dns_name_t * result variable for dns_tsig_identity()

(cherry picked from commit fa7475b77a27d326be15a4c4b987f1f5388272dc)

6 years agobin/named/zoneconf.c: Reset dns_name_t *tsig on every view iteration
Ondřej Surý [Fri, 27 Sep 2019 07:39:35 +0000 (09:39 +0200)] 
bin/named/zoneconf.c: Reset dns_name_t *tsig on every view iteration

(cherry picked from commit 43925b2a8b1b17d1cbf7940f9ffa347889e181e9)

6 years agoChange dns_tsigkey_identity from macro to a function and const argument and result
Ondřej Surý [Fri, 27 Sep 2019 07:39:02 +0000 (09:39 +0200)] 
Change dns_tsigkey_identity from macro to a function and const argument and result

(cherry picked from commit 2e304b0b7f5f08d01572cc855deadb1026e15ca8)

6 years agoConstify dns_name_t *signer argument to dns_acl_allowed()
Ondřej Surý [Fri, 27 Sep 2019 07:38:18 +0000 (09:38 +0200)] 
Constify dns_name_t *signer argument to dns_acl_allowed()

(cherry picked from commit 4d2697b31c2a29b5e9027294ad9fa0940715e5b5)

6 years agobin/named/server.c: Fix couple of DbC conditions reported by Cppcheck
Ondřej Surý [Fri, 27 Sep 2019 07:19:36 +0000 (09:19 +0200)] 
bin/named/server.c: Fix couple of DbC conditions reported by Cppcheck

(cherry picked from commit 476277a6e66086c1148d57eb1f43cf75bcd5539f)

6 years agobin/dig/dighost.c: Fix REQUIRE(!= NULL) condition after the variable has been derefer...
Ondřej Surý [Fri, 27 Sep 2019 06:48:06 +0000 (08:48 +0200)] 
bin/dig/dighost.c: Fix REQUIRE(!= NULL) condition after the variable has been dereferenced

(cherry picked from commit 9366ca769f2f6d6ede4e12fe919179f4a409a9e6)

6 years agobin/delv/delv.c: Fix invalid logic operation in REQUIRE() condition
Ondřej Surý [Fri, 27 Sep 2019 06:46:03 +0000 (08:46 +0200)] 
bin/delv/delv.c: Fix invalid logic operation in REQUIRE() condition

(cherry picked from commit 9ab16d10d48e4476adfa54807c62fe69cee96526)

6 years agoAdd Cppcheck job to the CI
Ondřej Surý [Thu, 26 Sep 2019 12:47:04 +0000 (14:47 +0200)] 
Add Cppcheck job to the CI

This MR changes the default Debian sid build to wrap make with bear
that creates compilation database and use the compilation database
to run Cppcheck on the source files systematically.

The job is currently set to be allowed to fail as it will take some
time to fix all the Cppcheck detected issues.

(cherry picked from commit f55dc51f42576fbbc5912a3fbb77e156158b844b)

6 years agoMerge branch 'prep-release' into security-v9_14 v9.14.7
Tinderbox User [Wed, 2 Oct 2019 06:24:10 +0000 (06:24 +0000)] 
Merge branch 'prep-release' into security-v9_14

6 years agoprep 9.14.7
Tinderbox User [Wed, 2 Oct 2019 06:16:15 +0000 (06:16 +0000)] 
prep 9.14.7

6 years agoMerge branch '16-security-mirror-key-check-security-v9_14' into 'security-v9_14'
Evan Hunt [Wed, 2 Oct 2019 05:38:47 +0000 (22:38 -0700)] 
Merge branch '16-security-mirror-key-check-security-v9_14' into 'security-v9_14'

6 years agoCHANGES, release note
Evan Hunt [Fri, 20 Sep 2019 00:51:51 +0000 (17:51 -0700)] 
CHANGES, release note

(cherry picked from commit 03278d606285fe56f241aa6308c579b8f5d934aa)

6 years agofix mirror zone trust anchor check
Evan Hunt [Fri, 20 Sep 2019 00:43:14 +0000 (17:43 -0700)] 
fix mirror zone trust anchor check

- compare key data when checking for a trust anchor match.
- allow for the possibility of multiple trust anchors with the same key ID
  so we don't overlook possible matches.

(cherry picked from commit bc727e5ccc3dcf1e5b597fcd06c5e78b77bc229d)

6 years agoMerge branch 'marka-forward-to-non-recursive-security-v9_14' into 'security-v9_14'
Evan Hunt [Wed, 2 Oct 2019 05:15:24 +0000 (22:15 -0700)] 
Merge branch 'marka-forward-to-non-recursive-security-v9_14' into 'security-v9_14'

6 years agoadd release note entry
Mark Andrews [Wed, 25 Sep 2019 01:39:17 +0000 (11:39 +1000)] 
add release note entry

(cherry picked from commit b7442e43899dc8e765710e530130beb095257b8f)

6 years agoadd CHANGES
Mark Andrews [Wed, 25 Sep 2019 01:37:08 +0000 (11:37 +1000)] 
add CHANGES

(cherry picked from commit 21553af7cc17ab4732ea768a70c285c240296d25)

6 years agoreset fctx->qmindcname and fctx->qminname after processing a delegation
Mark Andrews [Thu, 12 Sep 2019 06:03:41 +0000 (16:03 +1000)] 
reset fctx->qmindcname and fctx->qminname after processing a delegation

(cherry picked from commit 622bef6aeca9b31d341483bbba812af378515c6e)

6 years agocheck recovery from forwarding to a non-recursive server
Mark Andrews [Wed, 11 Sep 2019 07:08:47 +0000 (17:08 +1000)] 
check recovery from forwarding to a non-recursive server

(cherry picked from commit 47d285a7d67c75cf10a1e9cd1cb064d3f75e3bc5)