]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
5 years agoadd missing decrements; set *versionp to NULL at start of closeversion marka-closeversion-tsan
Mark Andrews [Wed, 19 Aug 2020 02:31:38 +0000 (12:31 +1000)] 
add missing decrements; set *versionp to NULL at start of closeversion

5 years agoMerge branch '2077-negative-hook-point-value-in-filter-aaaa-c' into 'main'
Mark Andrews [Wed, 19 Aug 2020 00:17:05 +0000 (00:17 +0000)] 
Merge branch '2077-negative-hook-point-value-in-filter-aaaa-c' into 'main'

Resolve "negative hook point value in filter-aaaa.c"

Closes #2077

See merge request isc-projects/bind9!3985

5 years agoRemove stray '-' from filter-aaaa initialisation
Mark Andrews [Tue, 18 Aug 2020 23:21:59 +0000 (09:21 +1000)] 
Remove stray '-' from filter-aaaa initialisation

5 years agoMerge branch 'ondrej/dns_rdata_fromwire_text-corpus-update' into 'main'
Ondřej Surý [Tue, 18 Aug 2020 15:44:11 +0000 (15:44 +0000)] 
Merge branch 'ondrej/dns_rdata_fromwire_text-corpus-update' into 'main'

Expand, but minimize (tmin, cmin) dns_rdata_fromwire_text corpus

See merge request isc-projects/bind9!3981

5 years agoExpand, but minimize (tmin, cmin) dns_rdata_fromwire_text corpus
Ondřej Surý [Tue, 18 Aug 2020 14:16:38 +0000 (16:16 +0200)] 
Expand, but minimize (tmin, cmin) dns_rdata_fromwire_text corpus

5 years agoMerge branch 'marka-fuzz-consolidated' into 'main'
Ondřej Surý [Tue, 18 Aug 2020 09:07:47 +0000 (09:07 +0000)] 
Merge branch 'marka-fuzz-consolidated' into 'main'

Consolidated fuzz fixes

See merge request isc-projects/bind9!3975

5 years agoMerge branch 'ondrej/update-readline-support' into 'main'
Ondřej Surý [Tue, 18 Aug 2020 09:05:51 +0000 (09:05 +0000)] 
Merge branch 'ondrej/update-readline-support' into 'main'

Update and cleanup the readline library support

See merge request isc-projects/bind9!3942

5 years agoA6: return FORMERR in fromwire if bits are non zero.
Mark Andrews [Sat, 15 Aug 2020 00:12:50 +0000 (10:12 +1000)] 
A6: return FORMERR in fromwire if bits are non zero.

oss_fuzz: Issue 24864: bind9:dns_rdata_fromwire_text_fuzzer: Overwrites-const-input in dns_rdata_fromwire_text_fuzzer

5 years agoRRSIG: reject records with empty SIG section
Mark Andrews [Mon, 17 Aug 2020 01:21:41 +0000 (11:21 +1000)] 
RRSIG: reject records with empty SIG section

5 years agoDisable compression in dns_rdata_fromwire_text()
Mark Andrews [Sat, 15 Aug 2020 08:06:50 +0000 (18:06 +1000)] 
Disable compression in dns_rdata_fromwire_text()

5 years agodns_rdata_fromwire() only accepts input up to 2^16-1 octets.
Mark Andrews [Fri, 14 Aug 2020 22:50:37 +0000 (08:50 +1000)] 
dns_rdata_fromwire() only accepts input up to 2^16-1 octets.

5 years agoPrint out input if dns_rdata_fromtext() fails in debug mode.
Mark Andrews [Mon, 17 Aug 2020 03:03:49 +0000 (13:03 +1000)] 
Print out input if dns_rdata_fromtext() fails in debug mode.

5 years agoAdd the ability to specify an input file
Mark Andrews [Fri, 14 Aug 2020 03:45:44 +0000 (13:45 +1000)] 
Add the ability to specify an input file

5 years agoAdd CHANGES note for GL !3942 3982/head
Ondřej Surý [Wed, 12 Aug 2020 07:23:01 +0000 (09:23 +0200)] 
Add CHANGES note for GL !3942

5 years agoUpdate and cleanup the readline library support
Ondřej Surý [Tue, 11 Aug 2020 14:14:36 +0000 (16:14 +0200)] 
Update and cleanup the readline library support

This commit updates and simplifies the checks for the readline support
in nslookup and nsupdate:

  * Change the autoconf checks to pkg-config only, all supported
    libraries have accompanying .pc files now.
  * Add editline support in addition to libedit and GNU readline
  * Add isc/readline.h shim header that defines dummy readline()
    function when no readline library is available

5 years agoMerge branch 'mnowak/gcovr' into 'main'
Michal Nowak [Mon, 17 Aug 2020 15:21:41 +0000 (15:21 +0000)] 
Merge branch 'mnowak/gcovr' into 'main'

Report coverage with gcovr

Closes isc-private/bind-qa#23

See merge request isc-projects/bind9!3606

5 years agoReport coverage with gcovr
Michal Nowak [Thu, 28 May 2020 10:21:27 +0000 (12:21 +0200)] 
Report coverage with gcovr

5 years agoMerge branch 'mnowak/broaden-abi-check-scope' into 'main'
Michal Nowak [Mon, 17 Aug 2020 13:07:15 +0000 (13:07 +0000)] 
Merge branch 'mnowak/broaden-abi-check-scope' into 'main'

Broaden scope of abi-check

See merge request isc-projects/bind9!3927

5 years agoBroaden scope of abi-check
Michal Nowak [Thu, 6 Aug 2020 12:23:38 +0000 (14:23 +0200)] 
Broaden scope of abi-check

For abi-check we should use as broad 'configure' options as possible.

5 years agoMerge branch 'patch-3' into 'main'
Mark Andrews [Mon, 17 Aug 2020 02:35:33 +0000 (02:35 +0000)] 
Merge branch 'patch-3' into 'main'

Option -s is not supported in tsig-keygen

See merge request isc-projects/bind9!3966

5 years agoOption -s is not supported in tsig-keygen
JP Mens [Sun, 16 Aug 2020 16:23:48 +0000 (16:23 +0000)] 
Option -s is not supported in tsig-keygen

5 years agoMerge branch 'marka-bad-bool-value' into 'main'
Mark Andrews [Fri, 14 Aug 2020 04:42:23 +0000 (04:42 +0000)] 
Merge branch 'marka-bad-bool-value' into 'main'

Ensure that a bool is stored in 'eol'

See merge request isc-projects/bind9!3960

5 years agoEnsure that a bool is stored in 'eol'
Mark Andrews [Thu, 13 Aug 2020 22:26:53 +0000 (08:26 +1000)] 
Ensure that a bool is stored in 'eol'

oss-fuzz: Issue 24875: bind9:isc_lex_getmastertoken_fuzzer: Invalid-bool-value in isc_lex_getmastertoken.c

5 years agoMerge branch 'ondrej/fix-oss-fuzz-debug' into 'main'
Ondřej Surý [Thu, 13 Aug 2020 16:00:08 +0000 (16:00 +0000)] 
Merge branch 'ondrej/fix-oss-fuzz-debug' into 'main'

Move the debug variable from main.c to individual fuzzer

See merge request isc-projects/bind9!3959

5 years agoMove the debug variable from main.c to individual fuzzer
Ondřej Surý [Thu, 13 Aug 2020 15:55:38 +0000 (17:55 +0200)] 
Move the debug variable from main.c to individual fuzzer

The fuzzers needs to be completely independent of the main.c for
OSS-Fuzz to work.

5 years agoMerge branch 'marka-fuzz-fixes' into 'main'
Mark Andrews [Thu, 13 Aug 2020 14:08:50 +0000 (14:08 +0000)] 
Merge branch 'marka-fuzz-fixes' into 'main'

Add issues found by dns_rdata_fromwiretext fuzzer.

See merge request isc-projects/bind9!3953

5 years agoAdd CHANGES note
Mark Andrews [Thu, 13 Aug 2020 05:16:55 +0000 (15:16 +1000)] 
Add CHANGES note

5 years agoAdd previously detected dns_rdata_fromwire_text failures
Mark Andrews [Thu, 13 Aug 2020 13:16:05 +0000 (23:16 +1000)] 
Add previously detected dns_rdata_fromwire_text failures

5 years agoX25: Check that record is all ASCII digits
Mark Andrews [Thu, 13 Aug 2020 04:13:49 +0000 (14:13 +1000)] 
X25: Check that record is all ASCII digits

5 years agoWKS: reject records with zero octets at the end of the bitmap
Mark Andrews [Thu, 13 Aug 2020 03:33:32 +0000 (13:33 +1000)] 
WKS: reject records with zero octets at the end of the bitmap

5 years agoTLSA: fix fromwire length checks
Mark Andrews [Thu, 13 Aug 2020 02:30:04 +0000 (12:30 +1000)] 
TLSA: fix fromwire length checks

5 years agoSIG: reject records with a zero length signature
Mark Andrews [Thu, 13 Aug 2020 00:51:40 +0000 (10:51 +1000)] 
SIG: reject records with a zero length signature

5 years agoNXT: fix fromwire bitmap checks
Mark Andrews [Thu, 13 Aug 2020 02:08:50 +0000 (12:08 +1000)] 
NXT: fix fromwire bitmap checks

5 years agoNSEC3PARAM: check that saltlen is consistent with the rdata length
Mark Andrews [Thu, 13 Aug 2020 03:21:46 +0000 (13:21 +1000)] 
NSEC3PARAM: check that saltlen is consistent with the rdata length

5 years agoNSEC3: reject records with a zero length hash field
Mark Andrews [Thu, 13 Aug 2020 02:46:55 +0000 (12:46 +1000)] 
NSEC3: reject records with a zero length hash field

5 years agoIPSECKEY: require non-zero length public keys
Mark Andrews [Thu, 13 Aug 2020 03:08:17 +0000 (13:08 +1000)] 
IPSECKEY: require non-zero length public keys

5 years agoCERT: reject records with a empty certificate field
Mark Andrews [Thu, 13 Aug 2020 03:38:49 +0000 (13:38 +1000)] 
CERT: reject records with a empty certificate field

5 years agoGet rid of type 'RESERVED0'.
Mark Andrews [Thu, 13 Aug 2020 03:59:32 +0000 (13:59 +1000)] 
Get rid of type 'RESERVED0'.

5 years agodns_rdata_fromwire_text fixes:
Mark Andrews [Thu, 13 Aug 2020 02:18:57 +0000 (12:18 +1000)] 
dns_rdata_fromwire_text fixes:

* Disallow compression pointers in names as we are not
  reading from a packet and as a result length checks fail.
* Increase totext buffer size as fuzzer ran out of space on
  big bitmaps.
* NUL terminate totext to make fault diagnosis easier.
* Add debugging messages to make fault diagnosie easier.

5 years agobase32_decode*() could incorrectly decode a input.
Mark Andrews [Thu, 13 Aug 2020 00:22:49 +0000 (10:22 +1000)] 
base32_decode*() could incorrectly decode a input.

base32_decode_char() added a extra zero octet to the output
if the fifth character was a pad character.  The length
of octets to copy to the output was set to 3 instead of 2.

5 years agoMerge branch 'matthijs-fix-kasp-test-next-key-event' into 'main'
Matthijs Mekking [Thu, 13 Aug 2020 10:04:10 +0000 (10:04 +0000)] 
Merge branch 'matthijs-fix-kasp-test-next-key-event' into 'main'

Update check next key events after rndc checkds

See merge request isc-projects/bind9!3937

5 years agoFix check next key event check in kasp test
Matthijs Mekking [Mon, 10 Aug 2020 15:09:44 +0000 (17:09 +0200)] 
Fix check next key event check in kasp test

Prevent intermittent false positives on slow platforms by subtracting
the number of seconds which passed between key creation and invoking
'rndc dnssec -checkds'.

This particularly fails for the step3.csk-roll2.autosign zone because
the closest next key event is when the zone signatures become
omnipresent. Running 'rndc dnssec -checkds' some time later means
that the next key event is in fact closer than the calculated time
and thus we need to adjust the expected time by the time already
passed.

5 years agoMerge branch 'marka-handle-eof' into 'main'
Ondřej Surý [Thu, 13 Aug 2020 07:21:19 +0000 (07:21 +0000)] 
Merge branch 'marka-handle-eof' into 'main'

Address infinite loop on EOF.

See merge request isc-projects/bind9!3954

5 years agoAddress infinite loop on EOF.
Mark Andrews [Thu, 13 Aug 2020 06:42:40 +0000 (16:42 +1000)] 
Address infinite loop on EOF.

5 years agoMerge branch 'ondrej/oss-fuzz' into 'main'
Ondřej Surý [Wed, 12 Aug 2020 20:56:50 +0000 (20:56 +0000)] 
Merge branch 'ondrej/oss-fuzz' into 'main'

Couple of minor changes to the autoconf for the OSS-Fuzz project

See merge request isc-projects/bind9!3951

5 years agoAdd explicit support of OSS-Fuzz
Ondřej Surý [Wed, 12 Aug 2020 19:06:26 +0000 (21:06 +0200)] 
Add explicit support of OSS-Fuzz

The --enable-fuzzing option now allows third choice "ossfuzz" that just
adds $LIB_FUZZING_ENGINE to FUZZ_LDFLAGS to make the fuzzer builds
compatible with OSS-Fuzz project that has some special quirks (the
main() routine is provided in the static library the project provides).

5 years agoAllow static linking in the developer mode
Ondřej Surý [Wed, 12 Aug 2020 13:19:23 +0000 (15:19 +0200)] 
Allow static linking in the developer mode

Previously, we have disallowed static linking (for good reasons).
However, there are legitimate reasons where static linking might be
useful, and one of the reasons is the OSS-Fuzz project that doesn't have
the libraries used for build, so static linking is the sane option here.

The static linking is still disallowed in the "production" builds, but
it's not possible to disable shared and enable static libraries when
used together with --enable-developer.

5 years agoMerge branch '2064-fix-isc_lex_getmastertoken-fuzzing' into 'main'
Ondřej Surý [Wed, 12 Aug 2020 19:53:49 +0000 (19:53 +0000)] 
Merge branch '2064-fix-isc_lex_getmastertoken-fuzzing' into 'main'

Really fuzz isc_lex_getmastertoken() in the test

Closes #2064

See merge request isc-projects/bind9!3949

5 years agoReally fuzz isc_lex_getmastertoken() in the test
Ondřej Surý [Wed, 12 Aug 2020 09:29:30 +0000 (11:29 +0200)] 
Really fuzz isc_lex_getmastertoken() in the test

There was a copy&paste error in fuzz/isc_lex_getmastertoken.c where we
didn't really test the function we wanted to test.  Update the test to
have the input data to always include expected 'tokentype' in the first
byte, `eol` argument in the second byte and the rest of the input is the
data to parse.

5 years agoMerge branch 'mnowak/fix-core-dumps-were-found-line' into 'main'
Michal Nowak [Wed, 12 Aug 2020 07:48:05 +0000 (07:48 +0000)] 
Merge branch 'mnowak/fix-core-dumps-were-found-line' into 'main'

Make sure .txt files are not identified as crashed test

See merge request isc-projects/bind9!3909

5 years agoMake sure .txt files are not identified as crashed test
Michal Nowak [Mon, 3 Aug 2020 06:36:05 +0000 (08:36 +0200)] 
Make sure .txt files are not identified as crashed test

Previously .txt files with full backtrace may be identified as a
crashed test:

    I:Core dumps were found for the following system tests:
    I:  core.19948-backtrace.txt
    I:   shutdown

Now .txt files are removed from the list.

Change 'run.sh.in' to match the core matching pattern in
'testsummary.sh'.

5 years agoMerge branch '2045-readline-rltypedefs-h-35-22-error-this-function-declaration-is...
Mark Andrews [Tue, 11 Aug 2020 23:34:55 +0000 (23:34 +0000)] 
Merge branch '2045-readline-rltypedefs-h-35-22-error-this-function-declaration-is-not-a-prototype-on-netbsd-9' into 'main'

Resolve "readline/rltypedefs.h:35:22: error: this function declaration is not a prototype on NetBSD 9"

Closes #2045

See merge request isc-projects/bind9!3926

5 years agoEnsure rl_message() gets prototype.
Mark Andrews [Tue, 11 Aug 2020 12:02:10 +0000 (22:02 +1000)] 
Ensure rl_message() gets prototype.

5 years agoStop deprecated functions being defined
Mark Andrews [Thu, 6 Aug 2020 07:52:48 +0000 (17:52 +1000)] 
Stop deprecated functions being defined

5 years agoMerge branch 'mnowak/run-tarball-tests-in-schedule' into 'main'
Michal Nowak [Tue, 11 Aug 2020 14:59:35 +0000 (14:59 +0000)] 
Merge branch 'mnowak/run-tarball-tests-in-schedule' into 'main'

Run unit and system tarball tests on schedules

See merge request isc-projects/bind9!3928

5 years agoRun unit and system tarball tests on schedules
Michal Nowak [Thu, 6 Aug 2020 13:02:25 +0000 (15:02 +0200)] 
Run unit and system tarball tests on schedules

To prevent problems with unit and system tarball tests being revealed
during release process, run these tests on schedules.

5 years agoMerge branch '2067-nta-related-crash-in-checkbogus-after-an-rndc-reload' into 'main'
Mark Andrews [Tue, 11 Aug 2020 01:45:43 +0000 (01:45 +0000)] 
Merge branch '2067-nta-related-crash-in-checkbogus-after-an-rndc-reload' into 'main'

Resolve "NTA-related crash in checkbogus() after an "rndc reload""

Closes #2067

See merge request isc-projects/bind9!3930

5 years agoAddress use after free between view, resolver and nta.
Mark Andrews [Fri, 7 Aug 2020 08:00:41 +0000 (18:00 +1000)] 
Address use after free between view, resolver and nta.

Hold a weak reference to the view so that it can't go away while
nta is performing its lookups.  Cancel nta timers once all external
references to the view have gone to prevent them triggering new work.

5 years agoMerge branch '2027-update-managed-keys-log-messages' into 'main'
Mark Andrews [Tue, 11 Aug 2020 00:54:39 +0000 (00:54 +0000)] 
Merge branch '2027-update-managed-keys-log-messages' into 'main'

Resolve "Slightly misleading diagnostic when revoked key is removed from managed-keys zone"

Closes #2027

See merge request isc-projects/bind9!3934

5 years agoUpdate managed keys log messages to be less confusing.
Mark Andrews [Mon, 10 Aug 2020 03:40:27 +0000 (13:40 +1000)] 
Update managed keys log messages to be less confusing.

5 years agoMerge branch 'each-fix-typo' into 'main'
Evan Hunt [Mon, 10 Aug 2020 19:38:49 +0000 (19:38 +0000)] 
Merge branch 'each-fix-typo' into 'main'

fix ARM typo

See merge request isc-projects/bind9!3938

5 years agofix ARM typo
Evan Hunt [Mon, 10 Aug 2020 19:36:29 +0000 (12:36 -0700)] 
fix ARM typo

5 years agoMerge branch '1775-pick-smaller-default-rbt-hash-table-size' into 'main'
Michał Kępień [Mon, 10 Aug 2020 09:29:16 +0000 (09:29 +0000)] 
Merge branch '1775-pick-smaller-default-rbt-hash-table-size' into 'main'

Reduce the default rbt hashtable size to 16 entries (4 bits)

Closes #1775

See merge request isc-projects/bind9!3935

5 years agoReduce the default RBT hash table size to 16 entries (4 bits)
Ondřej Surý [Mon, 10 Aug 2020 07:02:30 +0000 (09:02 +0200)] 
Reduce the default RBT hash table size to 16 entries (4 bits)

The hash table rework MRs (!3865, !3871) increased the default RBT hash
table size from 64 to 65,536 entries (for 64-bit architectures, that is
512 bytes before vs. 524,288 bytes after).  This works fine for RBTs
used for cache databases, but since three separate RBT databases are
created for every zone loaded (RRs, NSEC, NSEC3), memory usage would
skyrocket when BIND 9 is used as an authoritative DNS server with many
zones.

The default RBT hash table size before the rework was 64 entries, this
commit reduces it to 16 entries because our educated guess is that most
zones are just couple of entries (SOA, NS, A, AAAA, MX) and rehashing
small hash tables is actually cheap.  The rework we did in the previous
MRs tries to avoid growing the hash tables for big-to-huge caches where
growing the hash table comes at a price because the whole cache needs to
be locked.

5 years agoMerge branch 'michal/do-not-run-make-recheck-if-the-test-suite-fails' into 'main'
Michal Nowak [Fri, 7 Aug 2020 14:38:38 +0000 (14:38 +0000)] 
Merge branch 'michal/do-not-run-make-recheck-if-the-test-suite-fails' into 'main'

Do not run "make recheck" if the test suite fails

See merge request isc-projects/bind9!3932

5 years agoDo not run "make recheck" if the test suite fails
Michał Kępień [Fri, 7 Aug 2020 12:35:05 +0000 (14:35 +0200)] 
Do not run "make recheck" if the test suite fails

Running "make recheck" after the test suite fails hides intermittent
system test failures in GitLab CI.  This makes it hard to identify which
branches are affected by a particular test failure mode and causes CI
results to be overly optimistic.  Prevent "make recheck" from being run
when "make check" fails to ensure GitLab CI results properly reflect the
stability of the "main" branch.

5 years agoMerge branch '1613-rndc-dnssec-checkds' into 'main'
Matthijs Mekking [Fri, 7 Aug 2020 11:19:09 +0000 (11:19 +0000)] 
Merge branch '1613-rndc-dnssec-checkds' into 'main'

Resolve "Signal DS submitting via rndc"

Closes #1613

See merge request isc-projects/bind9!3906

5 years agorndc dnssec -checkds set algorithm
Matthijs Mekking [Tue, 4 Aug 2020 08:33:19 +0000 (10:33 +0200)] 
rndc dnssec -checkds set algorithm

In the rare case that you have multiple keys acting as KSK and that
have the same keytag, you can now set the algorithm when calling
'-checkds'.

5 years agoAdd notes for #1613 (rndc dnssec -checkds)
Matthijs Mekking [Fri, 31 Jul 2020 09:15:49 +0000 (11:15 +0200)] 
Add notes for #1613 (rndc dnssec -checkds)

This is a new feature that should be mentioned in the notes.

5 years agoTest 'rndc dnssec -checkds' on multiple zones
Matthijs Mekking [Fri, 31 Jul 2020 09:13:53 +0000 (11:13 +0200)] 
Test 'rndc dnssec -checkds' on multiple zones

Make sure the 'checkds' command correctly sets the right key timing
metadata and also make sure that it rejects setting the key timing
metadata if there are multiple keys with the KSK role and no key
identifier is provided.

5 years agoMake 'parent-registration-delay' obsolete
Matthijs Mekking [Fri, 31 Jul 2020 07:58:59 +0000 (09:58 +0200)] 
Make 'parent-registration-delay' obsolete

With the introduction of 'checkds', the 'parent-registration-delay'
option becomes obsolete.

5 years agoAdjust kasp tests to use 'checkds'
Matthijs Mekking [Fri, 31 Jul 2020 07:04:07 +0000 (09:04 +0200)] 
Adjust kasp tests to use 'checkds'

With 'checkds' replacing 'parent-registration-delay', the kasp
test needs the expected times to be adjusted. Also the system test
needs to call 'rndc dnssec -checkds' to progress the rollovers.

Since we pretend that the KSK is active as soon as the DS is
submitted (and parent registration delay is no longer applicable)
we can simplify the 'csk_rollover_predecessor_keytimes' function
to take only one "addtime" parameter.

This commit also slightly changes the 'check_dnssecstatus' function,
passing the zone as a parameter.

5 years agoFix time printing in key files
Matthijs Mekking [Fri, 31 Jul 2020 06:52:05 +0000 (08:52 +0200)] 
Fix time printing in key files

Don't strip off the final character when printing times in key files.

With the introduction of 'rndc dnssec -status' we introduced
'isc_stdtime_tostring()'. This changed in behavior such that it was no
longer needed to strip of the final '\n' of the string format
datetime. However, in 'printtime()' it still stripped the final
character.

5 years agoImplement 'rndc dnssec -checkds'
Matthijs Mekking [Fri, 31 Jul 2020 06:37:51 +0000 (08:37 +0200)] 
Implement 'rndc dnssec -checkds'

Add a new 'rndc' command 'dnssec -checkds' that allows the user to
signal named that a new DS record has been seen published in the
parent, or that an existing DS record has been withdrawn from the
parent.

Upon the 'checkds' request, 'named' will write out the new state for
the key, updating the 'DSPublish' or 'DSRemoved' timing metadata.

This replaces the "parent-registration-delay" configuration option,
this was unreliable because it was purely time based (if the user
did not actually submit the new DS to the parent for example, this
could result in an invalid DNSSEC state).

Because we cannot rely on the parent registration delay for state
transition, we need to replace it with a different guard. Instead,
if a key wants its DS state to be moved to RUMOURED, the "DSPublish"
time must be set and must not be in the future. If a key wants its
DS state to be moved to UNRETENTIVE, the "DSRemoved" time must be set
and must not be in the future.

By default, with '-checkds' you set the time that the DS has been
published or withdrawn to now, but you can set a different time with
'-when'. If there is only one KSK for the zone, that key has its
DS state moved to RUMOURED. If there are multiple keys for the zone,
specify the right key with '-key'.

5 years agoMerge branch 'michal/remove-arm64-jobs-from-gitlab-ci' into 'main'
Michał Kępień [Wed, 5 Aug 2020 10:07:20 +0000 (10:07 +0000)] 
Merge branch 'michal/remove-arm64-jobs-from-gitlab-ci' into 'main'

Remove arm64 jobs from GitLab CI

See merge request isc-projects/bind9!3920

5 years agoRemove arm64 jobs from GitLab CI
Michał Kępień [Wed, 5 Aug 2020 10:04:59 +0000 (12:04 +0200)] 
Remove arm64 jobs from GitLab CI

The only arm64 runner we have at our disposal is suffering from
intermittent connectivity issues which make it unusable for extended
periods of time.  Remove arm64 jobs from GitLab CI until we manage to
set up an arm64 runner with more reliable connectivity.

5 years agoMerge branch '2065-set-max-cache-size-in-the-geoip2-system-test' into 'main'
Michał Kępień [Wed, 5 Aug 2020 09:07:52 +0000 (09:07 +0000)] 
Merge branch '2065-set-max-cache-size-in-the-geoip2-system-test' into 'main'

Set "max-cache-size" in the "geoip2" system test

Closes #2065

See merge request isc-projects/bind9!3919

5 years agoSet "max-cache-size" in the "geoip2" system test
Michał Kępień [Wed, 5 Aug 2020 07:04:53 +0000 (09:04 +0200)] 
Set "max-cache-size" in the "geoip2" system test

The named configuration files used in the "geoip2" system test cause a
rather large number of views (6-8) to be set up in each tested named
instance.  Each view has its own cache.

Commit e24bc324b455d9cad7b51acd3d5c7b4e40c66187 caused the RBT hash
table to be pre-allocated to a size derived from "max-cache-size", so
that it never needs to be rehashed.  The size of that hash table is not
expected to be significant enough to cause memory use issues in typical
conditions even for large "max-cache-size" settings.

However, these two factors combined can cause memory exhaustion issues
in GitLab CI, where we run multiple "instances" of the test suite in
parallel on the same runner, each test suite executes multiple system
tests concurrently, and each system test may potentially start multiple
named instances at the same time.  In practice, this problem currently
only seems to be affecting the "geoip2" system test, which is failing
intermittently due to named instances used by that test getting killed
by oom-killer.

Prevent the "geoip2" system test from failing intermittently by setting
"max-cache-size" in named configuration files used in that test to a low
value in order to keep memory usage at bay even with a large number of
views configured.

5 years agoMerge branch '2030-bind-arm-incorrectly-documents-the-processing-of-forwarders-still...
Michał Kępień [Tue, 4 Aug 2020 19:44:27 +0000 (19:44 +0000)] 
Merge branch '2030-bind-arm-incorrectly-documents-the-processing-of-forwarders-still-has-the-pre-9-3-0-explanation' into 'main'

Resolve "BIND ARM incorrectly documents the processing of forwarders (still has the pre 9.3.0 explanation)"

Closes #2030

See merge request isc-projects/bind9!3881

5 years agoUpdate description of forwarding behavior in ARM
Suzanne Goldlust [Thu, 23 Jul 2020 13:05:43 +0000 (13:05 +0000)] 
Update description of forwarding behavior in ARM

5 years agoMerge branch 'michal/add-placeholder-for-1475' into 'main'
Michał Kępień [Tue, 4 Aug 2020 13:49:37 +0000 (13:49 +0000)] 
Merge branch 'michal/add-placeholder-for-1475' into 'main'

Add placeholder for #1475

See merge request isc-projects/bind9!3916

5 years agoAdd placeholder for #1475
Michał Kępień [Tue, 4 Aug 2020 13:46:34 +0000 (15:46 +0200)] 
Add placeholder for #1475

5 years agoMerge branch 'marka-DNS_R_BADTSIG-map-to-FORMERR' into 'main'
Mark Andrews [Tue, 4 Aug 2020 13:02:24 +0000 (13:02 +0000)] 
Merge branch 'marka-DNS_R_BADTSIG-map-to-FORMERR' into 'main'

Map DNS_R_BADTSIG to FORMERR

See merge request isc-projects/bind9!3877

5 years agoCheck rcode is FORMERR
Mark Andrews [Fri, 31 Jul 2020 10:36:14 +0000 (20:36 +1000)] 
Check rcode is FORMERR

5 years agoMap DNS_R_BADTSIG to FORMERR
Mark Andrews [Wed, 22 Jul 2020 23:47:49 +0000 (09:47 +1000)] 
Map DNS_R_BADTSIG to FORMERR

Now that the log message has been printed set the result code to
DNS_R_FORMERR.  We don't do this via dns_result_torcode() as we
don't want upstream errors to produce FORMERR if that processing
end with DNS_R_BADTSIG.

5 years agoMerge branch 'ondrej/serve-stale-improvements' into 'main'
Matthijs Mekking [Tue, 4 Aug 2020 12:17:57 +0000 (12:17 +0000)] 
Merge branch 'ondrej/serve-stale-improvements' into 'main'

Serve-stale improvements

Closes #1712 and #1829

See merge request isc-projects/bind9!3872

5 years agoAdd CHANGES and release notes for GL #1712 and GL #1829
Ondřej Surý [Thu, 30 Jul 2020 13:10:49 +0000 (15:10 +0200)] 
Add CHANGES and release notes for GL #1712 and GL #1829

5 years agoAdd tests with stale-cache-disabled into serve-stale system test
Ondřej Surý [Thu, 30 Jul 2020 11:55:13 +0000 (13:55 +0200)] 
Add tests with stale-cache-disabled into serve-stale system test

Add a fifth named (ns5) that runs with `stale-cache-enable no;` and
check that there are no stale records in the cache.

5 years agoExpire the 0 TTL RRSet quickly rather using them for serve-stale
Ondřej Surý [Tue, 21 Jul 2020 09:35:42 +0000 (11:35 +0200)] 
Expire the 0 TTL RRSet quickly rather using them for serve-stale

When a received RRSet has TTL 0, they would be preserved for
serve-stale (default `max-stale-cache` is 12 hours) rather than expiring
them quickly from the cache database.

This commit makes sure the RRSet didn't have TTL 0 before marking the
entry in the database as "stale".

5 years agoAdd stale-cache-enable option and disable serve-stable by default
Ondřej Surý [Tue, 21 Jul 2020 08:38:55 +0000 (10:38 +0200)] 
Add stale-cache-enable option and disable serve-stable by default

The current serve-stale implementation in BIND 9 stores all received
records in the cache for a max-stale-ttl interval (default 12 hours).

This allows DNS operators to turn the serve-stale answers in an event of
large authoritative DNS outage.  The caching of the stale answers needs
to be enabled before the outage happens or the feature would be
otherwise useless.

The negative consequence of the default setting is the inevitable
cache-bloat that happens for every and each DNS operator running named.

In this MR, a new configuration option `stale-cache-enable` is
introduced that allows the operators to selectively enable or disable
the serve-stale feature of BIND 9 based on their decision.

The newly introduced option has been disabled by default,
e.g. serve-stale is disabled in the default configuration and has to be
enabled if required.

5 years agoMerge branch '2026-readme-md-typo' into 'main'
Mark Andrews [Tue, 4 Aug 2020 02:23:54 +0000 (02:23 +0000)] 
Merge branch '2026-readme-md-typo' into 'main'

Resolve "README.md -- typo"

Closes #2026

See merge request isc-projects/bind9!3912

5 years agoFixup typo in 'xcode-select --install'
Mark Andrews [Tue, 4 Aug 2020 02:19:15 +0000 (12:19 +1000)] 
Fixup typo in 'xcode-select --install'

5 years agoMerge branch 'michal/restore-placeholder-entry-at-sequence-number-5481' into 'main'
Michał Kępień [Mon, 3 Aug 2020 20:13:12 +0000 (20:13 +0000)] 
Merge branch 'michal/restore-placeholder-entry-at-sequence-number-5481' into 'main'

Restore placeholder entry at sequence number 5481

See merge request isc-projects/bind9!3910

5 years agoRestore placeholder entry at sequence number 5481
Michał Kępień [Mon, 3 Aug 2020 20:09:47 +0000 (22:09 +0200)] 
Restore placeholder entry at sequence number 5481

5 years agoMerge branch 'ondrej/add-isc_lex-fuzzing-test' into 'main'
Ondřej Surý [Fri, 31 Jul 2020 15:55:58 +0000 (15:55 +0000)] 
Merge branch 'ondrej/add-isc_lex-fuzzing-test' into 'main'

Re-enable tests in fuzz directory and add isc_lex_gettoken() and isc_lex_getmastertoken() tests

See merge request isc-projects/bind9!3908

5 years agoAdd fuzzing for the isc_lex (isc_lex_gettoken,isc_lex_getmastertoken) API
Ondřej Surý [Fri, 31 Jul 2020 11:53:38 +0000 (13:53 +0200)] 
Add fuzzing for the isc_lex (isc_lex_gettoken,isc_lex_getmastertoken) API

In this commit, the simple fuzzing tests for the isc_lex_gettoken() and
isc_lex_getmastertoken() functions have been added.

As part of this commit, the initialization has been moved from fuzz.h
constructor/destructor to LLVMFuzzerInitialize() in each fuzz test.  The
main.c of no-fuzzing and AFL modes have been modified to run the
LLVMFuzzerInitialize() at the start of the main() function mimicking
the libfuzzer mode of operation.

5 years agoRe-enable the fuzzing tests
Ondřej Surý [Fri, 31 Jul 2020 13:20:56 +0000 (15:20 +0200)] 
Re-enable the fuzzing tests

The fuzzing tests were temporarily disabled when the build system has been
converted to automake.  This commit restores the functionality to run the
fuzzing tests as part of the `make check`.  When the afl or libfuzzer
is enabled via ./configure, it uses a custom LOG_DRIVER (fuzz/<fuzzer.sh>).

Currently only libfuzzer.sh has been implemented that runs each fuzz
test for 5 seconds each.

5 years agoMerge branch '2038-use-freebind-when-bind-fails' into 'main'
Ondřej Surý [Fri, 31 Jul 2020 11:32:40 +0000 (11:32 +0000)] 
Merge branch '2038-use-freebind-when-bind-fails' into 'main'

Resolve "Bind not handling interfaces changes correctly when listen-on-v6  any  specified"

Closes #2038

See merge request isc-projects/bind9!3873

5 years agoAdd CHANGES and release note for GL #2038
Witold Kręcicki [Tue, 21 Jul 2020 12:56:45 +0000 (14:56 +0200)] 
Add CHANGES and release note for GL #2038

5 years agonetmgr: retry binding with IP_FREEBIND when EADDRNOTAVAIL is returned.
Witold Kręcicki [Tue, 21 Jul 2020 11:29:14 +0000 (13:29 +0200)] 
netmgr: retry binding with IP_FREEBIND when EADDRNOTAVAIL is returned.

When a new IPv6 interface/address appears it's first in a tentative
state - in which we cannot bind to it, yet it's already being reported
by the route socket. Because of that BIND9 is unable to listen on any
newly detected IPv6 addresses. Fix it by setting IP_FREEBIND option (or
equivalent option on other OSes) and then retrying bind() call.