Commit Graph

29597 Commits

Author SHA1 Message Date
Tinderbox User
d410de0545 Merge branch 'prep-release' into security-v9_14 v9.14.7 2019-10-02 06:24:10 +00:00
Tinderbox User
4ee12e5337 prep 9.14.7 2019-10-02 06:21:57 +00:00
Evan Hunt
70da456043 Merge branch '16-security-mirror-key-check-security-v9_14' into 'security-v9_14' 2019-10-01 22:38:47 -07:00
Evan Hunt
8af8d626d3 CHANGES, release note
(cherry picked from commit 03278d6062)
2019-10-01 22:38:45 -07:00
Evan Hunt
4c09be6309 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 bc727e5ccc)
2019-10-01 22:38:30 -07:00
Evan Hunt
95b2398fdf Merge branch 'marka-forward-to-non-recursive-security-v9_14' into 'security-v9_14' 2019-10-01 22:15:24 -07:00
Mark Andrews
4c56b3c556 add release note entry
(cherry picked from commit b7442e4389)
2019-10-01 22:15:24 -07:00
Mark Andrews
2ee9a6ee4e add CHANGES
(cherry picked from commit 21553af7cc)
2019-10-01 22:15:21 -07:00
Mark Andrews
8766962f22 reset fctx->qmindcname and fctx->qminname after processing a delegation
(cherry picked from commit 622bef6aec)
2019-10-01 22:14:22 -07:00
Mark Andrews
22247084e3 check recovery from forwarding to a non-recursive server
(cherry picked from commit 47d285a7d6)
2019-10-01 22:14:22 -07:00
Evan Hunt
7434f80008 Merge branch '1191-qmin-fetch-failure-v9_14' into 'v9_14'
SERVFAIL if a prior qmin fetch has not been canceled when a new one starts

See merge request isc-projects/bind9!2426
2019-10-02 00:45:55 -04:00
Evan Hunt
31636d05c4 CHANGES
(cherry picked from commit 1d741c5c0f)
2019-10-01 21:20:38 -07:00
Evan Hunt
b632142526 SERVFAIL if a prior qmin fetch has not been canceled when a new one starts
(cherry picked from commit 488cb4da10)
2019-10-01 21:20:20 -07:00
Ondřej Surý
dd4c4d155c Merge branch '846-dig-idn-alabel-fallback-v9_14' into 'v9_14'
Resolve "dig cannot display ACE query if locale is not unicode"

See merge request isc-projects/bind9!2413
2019-09-30 06:51:14 -04:00
Ondřej Surý
b5ca157e2a Add CHANGES for GL #846
(cherry picked from commit dccec984c0)
2019-09-30 11:53:28 +02:00
Ondřej Surý
f5d443aa56 Test of valid A-label in locale that cannot display it only with non-broken idn2
The libidn2 library on Ubuntu Bionic is broken and idn2_to_unicode_8zlz() does't
fail when it should.  This commit ensures that we don't run the system test for
valid A-label in locale that cannot display with the buggy libidn2 as it would
break the tests.

(cherry picked from commit c42e3583f9)
2019-09-30 11:53:28 +02:00
Petr Menšík
b3bc4f6eac Emit warning on IDN output failure
Warning is emitted before any dig headers.

(cherry picked from commit 21371abd72)
2019-09-30 11:53:28 +02:00
Petr Menšík
30bf32365f Modify idna test to fallback to ACE
Test valid A-label on input would be displayed as A-label on output if
locale does not allow U-label.

(cherry picked from commit ac0cf85f09)
2019-09-30 11:53:28 +02:00
Petr Menšík
a38aa7f674 Fallback to ASCII on output IDN conversion error
It is possible dig used ACE encoded name in locale, which does not
support converting it to unicode. Instead of fatal error, fallback to
ACE name on output.

(cherry picked from commit c8a871e908)
2019-09-30 11:53:28 +02:00
Mark Andrews
93c334dd41 Merge branch 'marka-correct-list-v9_14' into 'v9_14'
use correct list

See merge request isc-projects/bind9!2411
2019-09-28 21:19:40 -04:00
Mark Andrews
76a15b6fe8 Address cut-and-paste error where list name was not changed in one instance for change 5292.
(cherry picked from commit 9cd308ac5e)
2019-09-29 10:52:31 +10:00
Michał Kępień
72d5660a15 Merge branch '147-add-windows-to-gitlab-ci-v9_14' into 'v9_14'
[v9_14] Add Windows to GitLab CI

See merge request isc-projects/bind9!2408
2019-09-27 07:18:10 -04:00
Michał Kępień
f861d5d156 Update Windows-specific documentation
Bring the files describing Windows-specific aspects of building and
installing BIND up to date.  Remove the parts which are either outdated
(e.g. 32-bit build instructions), already included elsewhere (e.g. the
list of Windows systems BIND is known to run on), or inconvenient to
keep up to date in the long run (e.g. ARM chapter numbers).

(cherry picked from commit 646fcb733e)
2019-09-27 09:16:02 +02:00
Michał Kępień
4fa3b4ff9c Add Windows to GitLab CI
Ensure BIND can be tested on Windows in GitLab to more quickly catch
build and test errors on that operating system.

Some notes:

  - While build jobs are triggered for all pipelines, system test jobs
    are not - due to the time it takes to run the complete system test
    suite on Windows (about 20 minutes), the latter are only run for
    pipelines created through GitLab's web interface and for pipelines
    created for Git tags.

  - Only the "Release" build configuration is currently used.  Adding
    "Debug" builds is a matter of extending .gitlab-ci.yml, but it was
    not done for the time being due to questionable usefulness of
    performing such builds in GitLab CI.

  - Only a 64-bit build is performed.  Adding support for 32-bit builds
    is not planned to be implemented.

  - Unit tests are still not run on Windows, but adding support for that
    is on the roadmap.

  - All Windows GitLab CI jobs are run inside Windows Server containers,
    using the Custom executor feature of GitLab Runner as Windows Server
    2016 is not supported by GitLab Runner's native Docker on Windows
    executor and Windows Server 2019 is not yet widely available from
    hosting providers.

  - The Windows Docker image used by GitLab CI is not stored in the
    GitLab Container Registry as it is over 27 GB in size and thus
    passing it between GitLab and its runners is impractical.

  - There is no vcvarsall.bat variant written in PowerShell and batch
    scripts are no longer supported by GitLab Runner Custom executor, so
    the environment variables set by vcvarsall.bat are injected back
    into the PowerShell environment by processing the output of "set".

  - Visual Studio parallel builds are a bit different than "make -jX"
    builds as parallelization happens in two tiers: project parallelism
    (controlled by the "/maxCpuCount" msbuild.exe switch) and compiler
    parallelism (controlled by the "/MP" cl.exe switch).  To limit the
    total number of compiler processes spawned concurrently to a value
    similar to the one used for Unix builds, msbuild.exe is allowed to
    build at most 2 projects at once, each of which can spawn up to half
    of BUILD_PARALLEL_JOBS worth of compiler processes.  Using such
    parameters is a fairly arbitrary decision taken to solve the
    trade-off between compilation speed and runner load.

  - Configuring network addresses in Windows Server containers is
    tricky.  Adding 10.53.0.1/24 and similar addresses to the vEthernet
    interface created by Docker never causes ifconfig.bat to fail, but
    in fact only one container can have any given IP address configured
    at any given time (the request to add the same address in another
    container is silently ignored).  Thus, in order to allow multiple
    system test jobs to be run in parallel, the addresses used in system
    tests are configured on the loopback interfaces.  Interestingly
    enough, the addresses set on the loopback interfaces... persist
    between containers.  Fortunately, this is acceptable for the time
    being and only requires ifconfig.bat failures to be ignored (as
    ifconfig.bat will fail if it attempts to configure an already
    existing address on an interface).  We also need to wait for a brief
    moment after calling ifconfig.bat as the addresses the latter
    attempts to configure may not be immediately available after it
    returns (and that causes runall.sh to error out).  Finally, for some
    reason we also need to signal that the DNS servers on each loopback
    interface are to be configured using DHCP or else ifconfig.bat will
    fail to add the requested addresses.

  - Since named.pid files created by named instances used in system
    tests contain Windows PIDs instead of Cygwin PIDs and various
    versions of Cygwin "kill" react differently when passed Windows PIDs
    without the -W switch, all "kill" invocations in GitLab CI need to
    use that switch (otherwise they would print error messages which
    would cause stop.pl to assume the process being killed died
    prematurely).  However, to preserve compatibility with older Cygwin
    versions used in our other Windows test environments, we alter the
    relevant scripts "on the fly" rather than in the Git repository.

  - In the containers used for running system tests, Windows Error
    Reporting is configured to automatically create crash dumps in
    C:\CrashDumps.  This directory is examined after the test suite is
    run to ensure no crashes went under stop.pl's radar.

(cherry picked from commit ca36405a3d)
2019-09-27 09:16:02 +02:00
Michał Kępień
6ab9726038 Fix the "statschannel" system test on Windows
The SYSTEMTESTTOP variable is set by bin/tests/system/run.sh.  When
system tests are run on Windows, that variable will contain an absolute
Cygwin path.  In the case of the "statschannel" system test, using the
unmodified SYSTEMTESTTOP variable in tests.sh causes the RNDCCMD
variable to contain an invocation of a native Windows application with
an absolute Cygwin path passed as a parameter, which prevents rndc from
working in that system test.  Until we have a cleaner solution, override
SYSTEMTESTTOP with a relative path to work around the issue and thus fix
the "statschannel" system test on Windows.

(cherry picked from commit 4deb2a48d9)
2019-09-27 09:16:02 +02:00
Michał Kępień
d20a928435 Fix system test error reporting on Windows
Make sure the CYGWIN environment variable is set whenever system tests
are run on Windows to prevent stop.pl from making incorrect assumptions
about the environment it is running in, which triggers e.g. false
reports about named instances crashing on shutdown when system tests are
run on Windows.  This issue has not been caught earlier because the
CYGWIN environment variable was incidentally being set on a higher level
in our Windows test environments.

Error reporting for parallel system tests on Windows has been broken all
along: since all parallel.mk targets generated by parallel.sh pipe their
output through "tee", the return code from run.sh is lost and thus
running "make -f parallel.mk check" will not yield a non-zero return
code if some system tests fail.  The same applies to runsequential.sh.
Yet, runall.sh on Windows only sets its return code to a non-zero value
if either "make -f parallel.mk check" or runsequential.sh returns a
non-zero return code.  Fix by making runall.sh yield a non-zero return
code when testsummary.sh fails, which is the same approach as the one
used in the "test" target in bin/tests/system/Makefile.

(cherry picked from commit fed397c04b)
2019-09-27 09:16:02 +02:00
Michał Kępień
78a3cacf8d Make VS solution upgrading unnecessary
Until now, the build process for BIND on Windows involved upgrading the
solution file to the version of Visual Studio used on the build host.
Unfortunately, the executable used for that (devenv.exe) is not part of
Visual Studio Build Tools and thus there is no clean way to make that
executable part of a Windows Server container.

Luckily, the solution upgrade process boils down to just adding XML tags
to Visual Studio project files and modifying certain XML attributes - in
files which we pregenerate anyway using win32utils/Configure.  Thus,
extend win32utils/Configure with three new command line parameters that
enable it to mimic what "devenv.exe bind9.sln /upgrade" does.  This
makes the devenv.exe build step redundant and thus facilitates building
BIND in Windows Server containers.

(cherry picked from commit 0476e8f1ac)
2019-09-27 09:16:02 +02:00
Michał Kępień
90b8e590b7 Enable building dnssec-cds.exe
Build configuration for the dnssec-cds Visual Studio project is absent
from the solution file template, which means the solution needs to be
upgraded using "devenv bind9.sln /upgrade" in order for the dnssec-cds
project to be built.  Add the build configuration for dnssec-cds to the
solution file template so that upgrading the solution is not necessary
for building that project.

(cherry picked from commit 1d5259b0a0)
2019-09-27 09:16:02 +02:00
Michał Kępień
d43392e546 Drop named-checkzone dependency on libbind9
named-checkzone does not use libbind9.  Update the Visual Studio project
file template for named-checkzone to reflect that, thus preventing
compilation issues during parallel builds.

(cherry picked from commit 918ebd9830)
2019-09-27 09:16:02 +02:00
Michał Kępień
1bf5a95774 Add missing nsupdate dependency on libirs
When commit 8eb88aafee removed liblwres,
it also modified nsupdate to use libirs instead of liblwres, but the
Visual Studio project files were not updated to reflect that change.
Make sure the nsupdate Visual Studio project depends on the libirs
project to prevent compilation issues during parallel builds.

(cherry picked from commit de1859422e)
2019-09-27 09:16:02 +02:00
Michał Kępień
cfb6e311a0 Merge branch 'marka-win32-vsconf-v9_14' into 'v9_14'
[v9_14] allow VSCONF to be overridden at runtime

See merge request isc-projects/bind9!2406
2019-09-27 03:15:19 -04:00
Mark Andrews
fea03c8a43 allow VSCONF to be overridden at runtime
(cherry picked from commit 2433e3e808)
2019-09-27 09:14:10 +02:00
Mark Andrews
d44a1289c9 Merge branch 'marka-resolver-fix-v9_14' into 'v9_14'
use test specific shell variables

See merge request isc-projects/bind9!2388
2019-09-27 03:07:43 -04:00
Mark Andrews
fd916bf406 use test specific shell variables
(cherry picked from commit 4a5400c1b7)
2019-09-27 16:23:27 +10:00
Ondřej Surý
6d2092e749 Merge branch 'ondrej/fix-clang-10-error-v9_14' into 'v9_14'
Silence false positive warning from Clang 10 in random_test.c

See merge request isc-projects/bind9!2405
2019-09-26 09:25:44 -04:00
Ondřej Surý
903fab5f6c Silence false positive warning from Clang 10 in random_test.c
(cherry picked from commit 9ff02c8170)
2019-09-26 15:24:56 +02:00
Michał Kępień
3096e11af9 Merge branch 'michal/prevent-unbuffered-stderr-io-on-windows-v9_14' into 'v9_14'
[v9_14] Prevent unbuffered stderr I/O on Windows

See merge request isc-projects/bind9!2401
2019-09-26 08:00:54 -04:00
Michał Kępień
b440d30a78 Prevent unbuffered stderr I/O on Windows
Make stderr fully buffered on Windows to improve named performance when
it is logging to stderr, which happens e.g. in system tests.  Note that:

  - line buffering (_IOLBF) is unavailable on Windows,

  - fflush() is called anyway after each log message gets written to the
    default stderr logging channels created by libisc.

(cherry picked from commit c72da3497d)
2019-09-26 13:56:38 +02:00
Ondřej Surý
7f55b7d60c Merge branch '1246-fix-stdatomic-shim-for-win32-v9_14' into 'v9_14'
Resolve "Add atomic_fetch_add and atomic_fetch_or shims"

See merge request isc-projects/bind9!2399
2019-09-26 07:43:16 -04:00
Ondřej Surý
9d400c7d89 Fix the wrong function for the atomic_fetch_add_explicit64 shim on non-WIN64 build 2019-09-26 13:01:26 +02:00
Michał Kępień
75bc9ea249 Merge branch 'michal/prevent-cygwin-from-concealing-non-abort-crashes-v9_14' into 'v9_14'
Prevent Cygwin from concealing non-abort() crashes

See merge request isc-projects/bind9!2394
2019-09-26 04:38:08 -04:00
Michał Kępień
239c1195d5 Prevent Cygwin from concealing non-abort() crashes
BIND system tests are run in a Cygwin environment.  Apparently Cygwin
shell sets the SEM_NOGPFAULTERRORBOX bit in its process error mode which
is then inherited by all spawned child processes.  This bit prevents the
Windows Error Reporting dialog from being displayed, which I assume is
part of an effort to contain memory handling errors triggered by Cygwin
binaries in the Cygwin environment.  Unfortunately, this also prevents
automatic crash dump creation by Windows Error Reporting and Cygwin
itself does not handle memory errors in native Windows processes spawned
from a Cygwin shell.

Fix by clearing the SEM_NOGPFAULTERRORBOX bit inside named if it is
started in a Cygwin environment, thus overriding the Cygwin-set process
error mode in order to enable Windows Error Reporting to handle all
named crashes.

(cherry picked from commit 3d4b17806f)
2019-09-26 10:34:40 +02:00
Michał Kępień
8dfb51b15d Merge branch '1245-properly-initialize-libxml2-v9_14' into 'v9_14'
[v9_14] Properly initialize libxml2

See merge request isc-projects/bind9!2392
2019-09-26 04:31:55 -04:00
Michał Kępień
258f48bcf0 Add CHANGES entry
5293.	[bug]		On Windows, named crashed upon any attempt to fetch XML
			statistics from it. [GL #1245]

(cherry picked from commit b5bcd4b8d6)
2019-09-26 10:28:52 +02:00
Michał Kępień
e9f9062732 Properly initialize libxml2
When libxml2 is to be used in a multi-threaded application, the
xmlInitThreads() function must be called before any other libxml2
function.  This function does different things on various platforms and
thus one can get away without calling it on Unix systems, but not on
Windows, where it initializes critical section objects used for
synchronizing access to data structures shared between threads.  Add the
missing xmlInitThreads() call to prevent crashes on affected systems.

Also add a matching xmlCleanupThreads() call to properly release the
resources set up by xmlInitThreads().

(cherry picked from commit a3c0b00ef6)
2019-09-26 10:28:51 +02:00
Mark Andrews
4d725a54b8 Merge branch '1205-named-crashes-when-setting-nsec3param-v9_14' into 'v9_14'
Resolve "named crashes when setting nsec3param"

See merge request isc-projects/bind9!2379
2019-09-23 23:06:24 -04:00
Mark Andrews
75a8acf3ab add CHANGES
(cherry picked from commit 31c8f66f25)
2019-09-24 11:38:06 +10:00
Mark Andrews
bf63ff09c1 Queue nsec3param setting until receive_secure_serial has completed.
(cherry picked from commit 456888c00f)
2019-09-24 11:37:37 +10:00
Mark Andrews
553313c2c2 Move dns_zone_setdb() to after the db is created.
Addresses the database changing w/o the changes being done under task lock.
Fix: build the database before assigning it to the zone.

(cherry picked from commit 4e686f40e0)
2019-09-24 11:37:37 +10:00
Michał Kępień
c6d9e9cd8f Merge branch 'michal/run-freebsd-jobs-automatically-for-all-pipelines-v9_14' into 'v9_14'
[v9_14] Run FreeBSD jobs automatically for all pipelines

See merge request isc-projects/bind9!2353
2019-09-17 14:26:16 -04:00