2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00
Commit Graph

32283 Commits

Author SHA1 Message Date
Mark Andrews
73dd849655 NXT: fix fromwire bitmap checks 2020-08-13 23:06:55 +10:00
Mark Andrews
7dc8e720ff NSEC3PARAM: check that saltlen is consistent with the rdata length 2020-08-13 23:06:55 +10:00
Mark Andrews
031ee9e279 NSEC3: reject records with a zero length hash field 2020-08-13 23:06:55 +10:00
Mark Andrews
d7f7014803 IPSECKEY: require non-zero length public keys 2020-08-13 23:06:55 +10:00
Mark Andrews
a238f37239 CERT: reject records with a empty certificate field 2020-08-13 23:06:55 +10:00
Mark Andrews
3c492b3ef1 Get rid of type 'RESERVED0'. 2020-08-13 23:06:55 +10:00
Mark Andrews
a92d973430 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.
2020-08-13 23:06:55 +10:00
Mark Andrews
6c7e50c267 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.
2020-08-13 23:06:55 +10:00
Matthijs Mekking
9bb966d579 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
2020-08-13 10:04:10 +00:00
Matthijs Mekking
262b52a154 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.
2020-08-13 10:30:31 +02:00
Ondřej Surý
eeb8b80547 Merge branch 'marka-handle-eof' into 'main'
Address infinite loop on EOF.

See merge request isc-projects/bind9!3954
2020-08-13 07:21:19 +00:00
Mark Andrews
c59ab04f6f Address infinite loop on EOF. 2020-08-13 16:42:40 +10:00
Ondřej Surý
191887ef2b 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
2020-08-12 20:56:50 +00:00
Ondřej Surý
f9aba90342 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).
2020-08-12 21:58:45 +02:00
Ondřej Surý
eb0d5a9526 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.
2020-08-12 21:56:37 +02:00
Ondřej Surý
c8538c50b4 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
2020-08-12 19:53:49 +00:00
Ondřej Surý
790476332e 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.
2020-08-12 21:49:31 +02:00
Michal Nowak
88ad7b85e6 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
2020-08-12 07:48:05 +00:00
Michal Nowak
c2dcd95966 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'.
2020-08-12 09:45:56 +02:00
Mark Andrews
852a2d834f 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
2020-08-11 23:34:55 +00:00
Mark Andrews
fd126553d4 Ensure rl_message() gets prototype. 2020-08-11 23:21:17 +00:00
Mark Andrews
1532a34658 Stop deprecated functions being defined 2020-08-11 23:21:17 +00:00
Michal Nowak
a53a0a8df1 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
2020-08-11 14:59:35 +00:00
Michal Nowak
439fe9bc3c 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.
2020-08-11 16:58:28 +02:00
Mark Andrews
ba6af6d507 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
2020-08-11 01:45:43 +00:00
Mark Andrews
0b2555e8cf 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.
2020-08-11 11:00:49 +10:00
Mark Andrews
f9537a6f2a 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
2020-08-11 00:54:39 +00:00
Mark Andrews
c9f019c931 Update managed keys log messages to be less confusing. 2020-08-11 00:10:10 +00:00
Evan Hunt
fec73c7e79 Merge branch 'each-fix-typo' into 'main'
fix ARM typo

See merge request isc-projects/bind9!3938
2020-08-10 19:38:49 +00:00
Evan Hunt
a69afb37e0 fix ARM typo 2020-08-10 12:36:29 -07:00
Michał Kępień
e151eb3aa3 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
2020-08-10 09:29:16 +00:00
Ondřej Surý
1e043a011b 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.
2020-08-10 10:31:19 +02:00
Michal Nowak
cde7f982eb 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
2020-08-07 14:38:38 +00:00
Michał Kępień
5a4076fc40 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.
2020-08-07 14:35:05 +02:00
Matthijs Mekking
82e9287459 Merge branch '1613-rndc-dnssec-checkds' into 'main'
Resolve "Signal DS submitting via rndc"

Closes #1613

See merge request isc-projects/bind9!3906
2020-08-07 11:19:09 +00:00
Matthijs Mekking
46fcd927e7 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'.
2020-08-07 11:26:09 +02:00
Matthijs Mekking
e4c82fc7ae Add notes for #1613 (rndc dnssec -checkds)
This is a new feature that should be mentioned in the notes.
2020-08-07 11:26:09 +02:00
Matthijs Mekking
a43bb41909 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.
2020-08-07 11:26:09 +02:00
Matthijs Mekking
a25f49f153 Make 'parent-registration-delay' obsolete
With the introduction of 'checkds', the 'parent-registration-delay'
option becomes obsolete.
2020-08-07 11:26:09 +02:00
Matthijs Mekking
38cb43bc86 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.
2020-08-07 11:26:09 +02:00
Matthijs Mekking
e3eb55fd1c 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.
2020-08-07 11:26:09 +02:00
Matthijs Mekking
04d8fc0143 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'.
2020-08-07 11:26:09 +02:00
Michał Kępień
f0fa6f0245 Merge branch 'michal/remove-arm64-jobs-from-gitlab-ci' into 'main'
Remove arm64 jobs from GitLab CI

See merge request isc-projects/bind9!3920
2020-08-05 10:07:20 +00:00
Michał Kępień
49f245f7c0 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.
2020-08-05 12:04:59 +02:00
Michał Kępień
72786a27c7 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
2020-08-05 09:07:52 +00:00
Michał Kępień
4292d5bdfe 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 e24bc324b4 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.
2020-08-05 10:38:06 +02:00
Michał Kępień
550b82e27b 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
2020-08-04 19:44:27 +00:00
Suzanne Goldlust
30e126ad02 Update description of forwarding behavior in ARM 2020-08-04 21:39:31 +02:00
Michał Kępień
500527b4da Merge branch 'michal/add-placeholder-for-1475' into 'main'
Add placeholder for #1475

See merge request isc-projects/bind9!3916
2020-08-04 13:49:37 +00:00
Michał Kępień
232297142d Add placeholder for #1475 2020-08-04 15:46:34 +02:00