Commit graph

29702 commits

Author SHA1 Message Date
Brian Conry
30ccde7cdc arm: Add an explanation on the effect of 'require-server-cookie yes;'
(cherry picked from commit c6f91f8bd0)
2019-10-31 09:09:05 -05:00
Mark Andrews
bcb9fca00c arm: add why when to set 'require-server-cookie yes;'
(cherry picked from commit c5453ea328)
2019-10-31 09:09:05 -05:00
Mark Andrews
9054c1ff33 arm: document resolver-nonbackoff-tries and resolver-retry-interval
(cherry picked from commit 1ea6aadf6f)
2019-10-31 09:09:05 -05:00
Mark Andrews
09999761ad arm: add default values for require-server-cookie and send-cookie options
(cherry picked from commit d8abf4f5b6)
2019-10-31 09:09:05 -05:00
Michał Kępień
0506c0b442 Merge branch '1059-prevent-tcp-failures-from-affecting-edns-stats-v9_14' into 'v9_14'
[v9_14] Prevent TCP failures from affecting EDNS stats

See merge request isc-projects/bind9!2511
2019-10-31 05:36:51 -04:00
Michał Kępień
80586e82b1 Add CHANGES entry
5310.	[bug]		TCP failures were affecting EDNS statistics. [GL #1059]

(cherry picked from commit 36d3c66e4e)
2019-10-31 09:54:37 +01:00
Michał Kępień
b2ee3fa0bb Prevent TCP failures from affecting EDNS stats
EDNS mechanisms only apply to DNS over UDP.  Thus, errors encountered
while sending DNS queries over TCP must not influence EDNS timeout
statistics.

(cherry picked from commit fce3c93ea2)
2019-10-31 09:54:23 +01:00
Michał Kępień
79a9bf6f03 Merge branch '1059-prevent-query-loops-for-misbehaving-servers-v9_14' into 'v9_14'
[v9_14] Prevent query loops for misbehaving servers

See merge request isc-projects/bind9!2508
2019-10-31 04:45:51 -04:00
Michał Kępień
61370994fc Prevent query loops for misbehaving servers
If a TCP connection fails while attempting to send a query to a server,
the fetch context will be restarted without marking the target server as
a bad one.  If this happens for a server which:

  - was already marked with the DNS_FETCHOPT_EDNS512 flag,
  - responds to EDNS queries with the UDP payload size set to 512 bytes,
  - does not send response packets larger than 512 bytes,

and the response for the query being sent is larger than 512 byes, then
named will pointlessly alternate between sending UDP queries with EDNS
UDP payload size set to 512 bytes (which are responded to with truncated
answers) and TCP connections until the fetch context retry limit is
reached.  Prevent such query loops by marking the server as bad for a
given fetch context if the advertised EDNS UDP payload size for that
server gets reduced to 512 bytes and it is impossible to reach it using
TCP.

(cherry picked from commit 6cd115994e)
2019-10-31 08:49:09 +01:00
Mark Andrews
e99835b915 Merge branch '1288-log-dns_r_unchanged-from-sync_secure_journal-at-info-level-in-receive_secure_serial-v9_14' into 'v9_14'
Resolve "Log DNS_R_UNCHANGED from sync_secure_journal at info level in receive_secure_serial."

See merge request isc-projects/bind9!2498
2019-10-29 21:32:49 -04:00
Mark Andrews
244c72b5b6 add CHANGES
(cherry picked from commit e6ef7858c3)
2019-10-30 12:13:01 +11:00
Mark Andrews
cdf114078b Log DNS_R_UNCHANGED from sync_secure_journal() at info level in receive_secure_serial()
(cherry picked from commit 8eb09f3232)
2019-10-30 12:13:01 +11:00
Mark Andrews
f42292104b Merge branch 'u/fanf2/compilezone-hang-v9_14' into 'v9_14'
Fix hang in `named-compilezone | head`

See merge request isc-projects/bind9!2496
2019-10-29 20:14:35 -04:00
Tony Finch
c4890c7e83 CHANGES
(cherry picked from commit 548f29a4d9)
2019-10-30 10:52:52 +11:00
Tony Finch
19970088fc Fix hang in named-compilezone | head
I was truncating zone files for experimental purposes when I found
that `named-compilezone | head` got stuck. The full command line that
exhibited the problem was:

	dig axfr dotat.at |
	named-compilezone -o /dev/stdout dotat.at /dev/stdin |
	head

This requires a large enough zone to exhibit the problem, more than
about 70000 bytes of plain text output from named-compilezone.
I was running the command on Debian Stretch amd64.

This was puzzling since it looked like something was suppressing the
SIGPIPE. I used `strace` to examine what was happening at the hang.
The program was just calling write() a lot to print the zone file, and
the last write() hanged until I sent it a SIGINT.

During some discussion with friends, Ian Jackson guessed that opening
/dev/stdout O_RDRW might be the problem, and after some tests we found
that this does in fact suppress SIGPIPE.

Since `named-compilezone` only needs to write to its output file, the
fix is to omit the stdio "+" update flag.

(cherry picked from commit a87ccea032)
2019-10-30 10:52:22 +11:00
Ondřej Surý
8c2f196182 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
2019-10-29 07:39:27 -04:00
Ondřej Surý
41611a9bd9 Add CHANGES note
(cherry picked from commit 4a778cfa45)
2019-10-29 05:59:51 -05:00
Ondřej Surý
5eeaeb486f Add release notes.
(cherry picked from commit fce5a01a63)
2019-10-29 05:59:50 -05:00
Ondřej Surý
56b6d8c6a7 Adjust synthfromdnssec system test to the changed defaults
(cherry picked from commit 800d7843af)
2019-10-29 05:14:34 -05:00
Ondřej Surý
b97004be30 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 a20c42dca6)
2019-10-29 05:14:34 -05:00
Michał Kępień
4fb9ef674f 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
2019-10-29 04:22:35 -04:00
Michał Kępień
810cbde0bc 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 dce1c05042)
2019-10-29 08:53:56 +01:00
Mark Andrews
4689f8cec6 Merge branch '876-documentation-feedback-2-v9_14' into 'v9_14'
dnskey-sig-validity 0;

See merge request isc-projects/bind9!2487
2019-10-24 17:09:53 -04:00
Mark Andrews
c452db5790 add named-checkconf tests for dnskey-sig-validity at range limits
(cherry picked from commit 918f020f9f)
2019-10-25 07:12:36 +11:00
Mark Andrews
85d89c00da accept 0 for dnskey-sig-validity (indicates off)
(cherry picked from commit 20647657f9)
2019-10-25 07:12:03 +11:00
Mark Andrews
f59321d972 Merge branch '1281-dnstap-per-view-configuration-v9_14' into 'v9_14'
Resolve "dnstap per view configuration"

See merge request isc-projects/bind9!2479
2019-10-21 19:29:09 -04:00
Mark Andrews
aface50cfe add CHANGES
(cherry picked from commit 6ce1e2e731)
2019-10-22 08:23:32 +11:00
Mark Andrews
c46f4d14f5 check for relationship between dnstap and dnstap-output seperately
(cherry picked from commit c2fcc9f16f)
2019-10-22 08:23:32 +11:00
Mark Andrews
71f33e0c24 add more dnstap/dnstap-output combinations
(cherry picked from commit f3d53630c3)
2019-10-22 08:23:32 +11:00
Tinderbox User
6330f2c6c8 Merge branch 'security-v9_14' into v9_14 2019-10-19 23:34:28 +00:00
Michał Kępień
afb1e0758f 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
2019-10-17 05:50:06 -04:00
Michał Kępień
c62c7c2f86 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] af214e8212

[2] 2595b82634

(cherry picked from commit db7fd16346)
2019-10-17 10:52:19 +02:00
Michał Kępień
2a2a346340 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] aaeec462e6

(cherry picked from commit abfde3d543)
2019-10-17 10:50:51 +02:00
Michał Kępień
4ea4e9b0b0 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
2019-10-15 16:35:12 -04:00
Michał Kępień
847879f772 Remove remnants of the --with-cc-alg option
Commit afa81ee4e4 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 428dcf3b49)
2019-10-15 21:58:48 +02:00
Michał Kępień
97a940041f 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
2019-10-15 15:52:45 -04:00
Michał Kępień
695e099c67 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 603e04563b)
2019-10-15 21:48:43 +02:00
Michał Kępień
c2faa4dd64 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
2019-10-15 15:45:57 -04:00
Michał Kępień
765cdd284b 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 dd97dfdc14)
2019-10-15 20:49:28 +02:00
Michał Kępień
5599892021 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 e83b322f7f)
2019-10-15 20:49:28 +02:00
Michał Kępień
feaed60540 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
2019-10-15 14:44:41 -04:00
Michał Kępień
9d24eba876 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 07d2fcb544)
2019-10-15 16:38:24 +02:00
Michał Kępień
2395288c2e 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 6b5426e1a7)
2019-10-15 16:38:23 +02:00
Mark Andrews
71db12db0f 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
2019-10-13 10:59:37 -04:00
Mark Andrews
446de056b6 Detect partial prefixes / incomplete IPv4 address in acls.
(cherry picked from commit fb87e669fb)
2019-10-14 01:31:44 +11:00
Ondřej Surý
7076fd6825 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
2019-10-10 02:10:04 -04:00
Ondřej Surý
540f25194b Synchronize the lifetime of artifact to 1 week
(cherry picked from commit 85c0bede78)
2019-10-10 07:47:41 +02:00
Tinderbox User
5b7e2059ca Merge branch 'fix-doc' into security-v9_14 2019-10-09 20:54:55 +00:00
Tinderbox User
98f2e7149b regenerate doc 2019-10-09 20:54:43 +00:00
Ondřej Surý
148d39afbd 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
2019-10-09 02:34:53 -04:00