Commit Graph

32377 Commits

Author SHA1 Message Date
Mark Andrews
e554daa76c fctx->id was not initalised 2020-11-09 21:48:22 +00:00
Artem Boldariev
2ef19fbcf1 Merge branch 'artem/fix-DEBUG-build-backport' into 'v9_16'
Fix build with DEBUG defined (-DDEBUG) (Backport of !4351)

See merge request isc-projects/bind9!4365
2020-11-06 11:06:46 +00:00
Artem Boldariev
e8106afe43 Fix build with DEBUG defined (-DDEBUG)
The problem was introduced by commit 98b55eb4.
2020-11-06 12:58:19 +02:00
Michał Kępień
39467188d2 Merge branch 'michal/miscellaneous-windows-tweaks-v9_16' into 'v9_16'
[v9_16] Miscellaneous Windows tweaks

See merge request isc-projects/bind9!4360
2020-11-05 14:09:58 +00:00
Michał Kępień
1f26fa2588 Fix detection of CMake-built libuv on Windows
As of libuv 1.36.0, CMake is the only supported build method for libuv
on Windows.  Account for that fact by adjusting the relevant paths and
DLL file names used in the win32utils/Configure script.  Update
Windows-specific documentation accordingly.

(cherry picked from commit 64a091d587)
2020-11-05 15:07:01 +01:00
Michał Kępień
e5c88a590d Use "image" key in Windows GitLab CI job templates
Our GitLab Runner Custom executor scripts now use the "image" key for
determining the Windows Docker image to use for a given CI job.  Update
.gitlab-ci.yml to reflect that change.

(cherry picked from commit 004ca913f2)
2020-11-05 15:07:00 +01:00
Michał Kępień
3e082ef7dc Merge branch 'michal/rpz-system-test-fix-fast-expire-v9_16' into 'v9_16'
[v9_16] "rpz" system test: fix intermittent false positive (expired RPZ zone)

See merge request isc-projects/bind9!4359
2020-11-05 07:19:43 +00:00
Michał Kępień
64ca2e0061 Wait for the "fast-expire" zone to be transferred
In order for a "fast-expire/IN: response-policy zone expired" message to
be logged in ns3/named.run, the "fast-expire" zone must first be
transferred in by that server.  However, with unfavorable timing, ns3
may be stopped before it manages to fetch the "fast-expire" zone from
ns5 and after the latter has been reconfigured to no longer serve that
zone.  In such a case, the "rpz" system test will report a false
positive for the relevant check.  Prevent that from happening by
ensuring ns3 manages to transfer the "fast-expire" zone before getting
shut down.

(cherry picked from commit 39191052ad)
2020-11-05 07:55:36 +01:00
Matthijs Mekking
1e8cab780b Merge branch 'matthijs-test-multi-signer-model-v9_16' into 'v9_16'
Test multi signer model (v9.16)

See merge request isc-projects/bind9!4358
2020-11-04 14:54:45 +00:00
Matthijs Mekking
67b9e80b1e kasp test: Use DEFAULT_ALGORITHM in tests.sh
Some setup scripts uses DEFAULT_ALGORITHM in their dnssec-policy
and/or initial signing. The tests still used the literal values
13, ECDSAP256SHA256, and 256. Replace those occurrences where
appropriate.

(cherry picked from commit 518dd0bb17)
2020-11-04 14:28:19 +01:00
Matthijs Mekking
a0a4f7e318 Add a test for RFC 8901 signer model 2
The new 'dnssec-policy' was already compatible with multi-signer
model 2, now we also have a test for it.

(cherry picked from commit 7e0ec9f624)
2020-11-04 14:28:10 +01:00
Mark Andrews
80ae731b0e Merge branch '2244-nta-related-crash-after-reconfiguring-views-v9_16' into 'v9_16'
Resolve "NTA-related crash after reconfiguring views"

See merge request isc-projects/bind9!4352
2020-11-03 13:13:17 +00:00
Mark Andrews
8a180af667 Add CHANGES for [GL #2244]
(cherry picked from commit 2ef0f252a8)
2020-11-03 23:50:02 +11:00
Mark Andrews
b0f477df87 Call nta_detach() before dns_view_weakdetach() so view is available.
(cherry picked from commit ea956976d1)
2020-11-03 23:49:24 +11:00
Michał Kępień
711d954789 Merge branch '2237-fix-cross-compilation' into 'v9_16'
Fix cross-compilation

See merge request isc-projects/bind9!4312
2020-11-02 11:31:27 +00:00
Michał Kępień
f522a10801 Add CHANGES entry 2020-11-02 12:27:55 +01:00
Michał Kępień
35ca6df072 Fix cross-compilation
Using AC_RUN_IFELSE() in configure.ac breaks cross-compilation:

    configure: error: cannot run test program while cross compiling

Commit 978c7b2e89 caused AC_RUN_IFELSE()
to be used instead of AC_LINK_IFELSE() because the latter had seemingly
been causing the check for --wrap support in the linker to not work as
expected.  However, it later turned out that the problem lied elsewhere:
a minus sign ('-') was missing from the LDFLAGS variable used in the
relevant check [1].

Revert to using AC_LINK_IFELSE() for checking whether the linker
supports the --wrap option in order to make cross-compilation possible
again.

[1] see commit cfa4ea64bc
2020-11-02 12:27:55 +01:00
Michał Kępień
9ba5a4f6f8 Merge branch 'michal/sync-PLATFORMS-with-PLATFORMS.md' into 'v9_16'
Sync PLATFORMS with PLATFORMS.md

See merge request isc-projects/bind9!4339
2020-10-30 11:03:47 +00:00
Michał Kępień
188d130cc2 Sync PLATFORMS with PLATFORMS.md 2020-10-30 11:50:14 +01:00
Michał Kępień
74888fc997 Merge branch 'mnowak/OpenBSD_6.8-v9_16' into 'v9_16'
[v9_16] Update to OpenBSD 6.8

See merge request isc-projects/bind9!4336
2020-10-30 10:03:13 +00:00
Michal Nowak
f1066b3b41 Update to OpenBSD 6.8
(cherry picked from commit 773649f413)
2020-10-30 10:39:59 +01:00
Michał Kępień
2111bd5bc5 Merge branch '2231-miscellaneous-backtrace-fixes' into 'v9_16'
Miscellaneous backtrace fixes

See merge request isc-projects/bind9!4325
2020-10-30 08:16:30 +00:00
Michał Kępień
923c443389 Fix getrbp()
The following compiler warning is emitted for the BACKTRACE_X86STACK
part of lib/isc/backtrace.c:

    backtrace.c: In function ‘getrbp’:
    backtrace.c:142:1: warning: no return statement in function returning non-void [-Wreturn-type]

While getrbp() stores the value of the RBP register in the RAX register
and thus does attempt to return a value, this is not enough for an
optimizing compiler to always produce the expected result.  With -O2,
the following machine code may be generated in isc_backtrace_gettrace():

    0x00007ffff7b0ff7a <+10>:	mov    %rbp,%rax
    0x00007ffff7b0ff7d <+13>:	mov    $0x17,%eax
    0x00007ffff7b0ff82 <+18>:	retq

The above is equivalent to:

    sp = (void **)getrbp();
    return (ISC_R_NOTFOUND);

and results in the backtrace never getting printed.

Fix by using an intermediate variable.  With this change in place, the
machine code generated with -O2 becomes something like:

    0x00007ffff7af5638 <+24>:	mov    $0x17,%eax
    0x00007ffff7af563d <+29>:	mov    %rbp,%rdx
    0x00007ffff7af5640 <+32>:	test   %rdx,%rdx
    0x00007ffff7af5643 <+35>:	je     0x7ffff7af56bd <isc_backtrace_gettrace+157>
    ...
    0x00007ffff7af56bd <+157>:	retq

(Note that this method of grabbing a stack trace is finicky anyway
because in order for RBP to be relied upon, -fno-omit-stack-frame must
be present among CFLAGS.)
2020-10-30 09:12:50 +01:00
Michał Kępień
10d7055791 Check for _Unwind_Backtrace() support
Some operating systems (e.g. Linux, FreeBSD) provide the
_Unwind_Backtrace() function in libgcc_s.so, which is automatically
linked into any binary using the functions provided by that library.  On
OpenBSD, though, _Unwind_Backtrace() is provided by libc++abi.so, which
is not automatically linked into binaries produced by the stock system C
compiler.

Meanwhile, lib/isc/backtrace.c assumes that any GNU-compatible toolchain
allows _Unwind_Backtrace() to be used without any extra provisions in
the build system.  This causes build failures on OpenBSD (and possibly
other systems).

Instead of making assumptions, actually check for _Unwind_Backtrace()
support in the toolchain if the backtrace() function is unavailable.
2020-10-30 09:12:50 +01:00
Michał Kępień
1d0269a2a7 Merge branch '2228-fix-the-make-depend-check-in-gitlab-ci' into 'v9_16'
Fix the "make depend" check in GitLab CI

See merge request isc-projects/bind9!4316
2020-10-30 07:55:30 +00:00
Michał Kępień
1b5a8a914c Do not test "make depend" for out-of-tree builds
The make/mkdep script does not understand the concept of generated
source files (like lib/dns/dnstap.pb-c.c), which prevents it from
working correctly for out-of-tree builds.  As "make depend" is not
required for building BIND and the "depend" make target was removed
altogether in the development branch, just prevent the "make depend"
check from being performed for out-of-tree builds in GitLab CI instead
of trying to add support for handling generated source files to
make/mkdep.
2020-10-30 08:49:16 +01:00
Michał Kępień
0ab099ca09 Fix the "make depend" check in GitLab CI
"make depend" prints errors to stderr, not to stdout.  This means that
the check for "make depend" errors currently used in the definition of
every build job in GitLab CI could never fail.  Fix that check by
redirecting stderr to stdout.  Also employ tee to prevent the output of
"make depend" from being hidden in the job log.  (While using tee hides
the exit code of "make depend" itself, the next line still checks for
errors anyway.)
2020-10-30 08:49:16 +01:00
Mark Andrews
0a0ef9a9b3 Merge branch '2236-resolver-sometimes-treats-signed-insecure-zone-with-broken-dnskey-as-bogus-v9_16' into 'v9_16'
Resolve "Resolver sometimes treats signed, insecure zone with broken DNSKEY as bogus"

See merge request isc-projects/bind9!4332
2020-10-29 22:44:20 +00:00
Mark Andrews
d598da406d Add CHANGES note for [GL #2236]
(cherry picked from commit decf117eb6)
2020-10-30 09:19:12 +11:00
Mark Andrews
939e735e2c Check that a zone in the process of being signed resolves
ans10 simulates a local anycast server which has both signed and
unsigned instances of a zone.  'A' queries get answered from the
signed instance.  Everything else gets answered from the unsigned
instance.  The resulting answer should be insecure.

(cherry picked from commit d7840f4b93)
2020-10-30 09:19:12 +11:00
Mark Andrews
903c1136ef Handle DNS_R_NCACHENXRRSET in fetch_callback_{dnskey,validator}()
DNS_R_NCACHENXRRSET can be return when zones are in transition state
from being unsigned to signed and signed to unsigned.  The validation
should be resumed and should result in a insecure answer.

(cherry picked from commit 718e597def)
2020-10-30 08:21:43 +11:00
Michal Nowak
01bc68bc72 Merge branch 'mnowak/add-freebsd12.2-v9_16' into 'v9_16'
[v9_16] Update to FreeBSD 12.2

See merge request isc-projects/bind9!4329
2020-10-29 15:52:49 +00:00
Michal Nowak
283f0c1e75 Update to FreeBSD 12.2
(cherry picked from commit 11ab0528d9)
2020-10-29 16:28:01 +01:00
Michal Nowak
58a8873228 Merge branch 'mnowak/add-fedora-33-v9_16' into 'v9_16'
[v9_16] Add Fedora 33

See merge request isc-projects/bind9!4327
2020-10-29 15:18:42 +00:00
Michal Nowak
91e28d1fb4 Add Fedora 33
(cherry picked from commit 914be61ff8c5a3e0395acd980486c1b4cd656d20)
2020-10-29 14:00:19 +01:00
Ondřej Surý
02bdaa48fe Merge branch '2227-tcp-connection-closed-fix-v9_16' into 'v9_16'
Resolve "BIND 9.16.8 assertion failure"

See merge request isc-projects/bind9!4324
2020-10-29 12:51:38 +00:00
Witold Kręcicki
0f1810efb2 Add CHANGES and release note for GL #2227
(cherry picked from commit cd3117b747)
2020-10-29 13:23:25 +01:00
Witold Kręcicki
e1c75d00b7 Properly handle outer TCP connection closed in TCPDNS.
If the connection is closed while we're processing the request
we might access TCPDNS outerhandle which is already reset. Check
for this condition and call the callback with ISC_R_CANCELED result.

(cherry picked from commit c41ce8e0c9)
2020-10-29 13:21:55 +01:00
Evan Hunt
0ba073a1b8 Merge branch 'each-rpz-test-typo-v9_16' into 'v9_16'
fix a typo in rpz test

See merge request isc-projects/bind9!4321
2020-10-29 06:15:14 +00:00
Evan Hunt
bc9a1b0b2d fix a typo in rpz test
"tcp-only" was not being tested correctly in the RPZ system test
because the option to the "digcmd" function that causes queries to
be sent via TCP was misspelled in one case, and was being interpreted
as a query name.

the "ckresult" function has also been changed to be case sensitive
for consistency with "digcmd".

(cherry picked from commit 78af071c11)
2020-10-28 22:38:55 -07:00
Michal Nowak
f2a228d2fa Merge branch 'mnowak/test-coverage-visualization-v9_16' into 'v9_16'
Enable Test Coverage Visualization for merge requests

See merge request isc-projects/bind9!4314
2020-10-27 14:57:36 +00:00
Michal Nowak
2c9892ed1d Enable Test Coverage Visualization for merge requests
This feature allows GitLab to visualize test coverage information in the
file diff view of merge requests.

This commit makes the gcov CI job depend on the following chain of jobs:

    gcc:buster:amd64 → unit:gcc:buster:amd64 → system:gcc:buster:amd64

The reason for running the last two jobs above sequentially rather than
in parallel is that both of them create *.gcda files (containing
coverage data) in the same locations.  While some way of merging these
files from different job artifact archives could probably be designed
with the help of additional tools, the simplest thing to do is not to
run unit test and system test jobs in parallel, carrying *.gcda files
over between jobs as gcov knows how to append coverage data to existing
*.gcda files.

Also note that test coverage will not be visualized if any of the jobs
in the above dependency chain fails (because the gcov job will not be
run).

(cherry picked from commit 2dabf328c4)
2020-10-27 15:57:06 +01:00
Michal Nowak
93efe7685c Merge branch 'mnowak/enhanced-test-portability-v9_16' into 'v9_16'
[v9_16] POSIX compatibility fixes to system test

See merge request isc-projects/bind9!4311
2020-10-27 14:25:34 +00:00
Michal Nowak
175f03f5db Replace a seq invocation with a shell loop
seq is not portable.  Use a while loop instead to make the "dnssec"
system test script POSIX-compatible.

(cherry picked from commit c0c4c024c6)
2020-10-27 12:26:03 +01:00
Michal Nowak
3e937a8c7c Get rid of bashisms in string comparisons
The double equal sign ('==') is a Bash-specific string comparison
operator.  Ensure the single equal sign ('=') is used in all POSIX shell
scripts in the system test suite in order to retain their portability.

(cherry picked from commit 481dfb9671)
2020-10-27 12:26:03 +01:00
Michal Nowak
fee71478c5 Merge branch 'mnowak/add-stress-test-to-CI-v9_16' into 'v9_16'
[v9_16] Add "stress" tests to GitLab CI

See merge request isc-projects/bind9!4307
2020-10-26 17:11:56 +00:00
Michal Nowak
06f721fdc5 Add "stress" tests to GitLab CI
Run "stress" tests for scheduled pipelines and pipelines created for
tags.  These tests were previously only performed manually (as part of
pre-release testing of each new BIND version).  Their purpose is to
detect memory leaks and potential performance issues.

As the run time of each "stress" test itself is set to 1 hour, set the
GitLab CI job timeout to 2 hours in order to account for the extra time
needed to set the test up and gather its results.

(cherry picked from commit 39305411e8)
2020-10-26 18:04:53 +01:00
Michal Nowak
8643bc7a7a Merge branch 'mnowak/openbsd-fix-gdb-in-system-test-v9_16' into 'v9_16'
[v9_16] Fix system test backtrace generation on OpenBSD

See merge request isc-projects/bind9!4304
2020-10-26 15:58:13 +00:00
Michal Nowak
659feff963 Fix system test backtrace generation on OpenBSD
On Linux core dump contains absolute path to crashed binary

    Core was generated by `/home/newman/isc/ws/bind9/bin/named/.libs/lt-named -D glue-ns1 -X named.lock -m'.

However, on OpenBSD there's only a basename

    Core was generated by `named'.

This commit adds support for the latter, retains the former.

(cherry picked from commit f0b13873a3)
2020-10-26 15:01:52 +01:00
Mark Andrews
e657199696 Merge branch '2226-tsan-error-in-dispatch-c-v9_16' into 'v9_16'
Hold qid->lock when calling deref_portentry() as

See merge request isc-projects/bind9!4302
2020-10-23 20:56:48 +00:00