Commit Graph

31942 Commits

Author SHA1 Message Date
Michal Nowak
a1227c3376 Broaden scope of abi-check
For abi-check we should use as broad 'configure' options as possible.

(cherry picked from commit 8e43f5e860)
2020-08-17 15:10:48 +02:00
Mark Andrews
156df0f808 Merge branch 'patch-3-v9_16' into 'v9_16'
Option -s is not supported in tsig-keygen

See merge request isc-projects/bind9!3968
2020-08-17 04:02:06 +00:00
JP Mens
d2e1c8c75e Option -s is not supported in tsig-keygen
(cherry picked from commit b01d26c608)
2020-08-17 12:39:50 +10:00
Mark Andrews
5a4c7a8015 Merge branch 'marka-fuzz-fixes-v9_16' into 'v9_16'
Marka fuzz fixes v9 16

See merge request isc-projects/bind9!3957
2020-08-13 15:51:43 +00:00
Mark Andrews
9af25fbc26 Add CHANGES note
(cherry picked from commit 80d69ba04c)
2020-08-14 00:38:45 +10:00
Mark Andrews
96096adc46 Add previously detected dns_rdata_fromwire_text failures
(cherry picked from commit 7ae055cef1)
2020-08-14 00:38:45 +10:00
Mark Andrews
9675d83b96 X25: Check that record is all ASCII digits
(cherry picked from commit 7e49689746)
2020-08-14 00:38:45 +10:00
Mark Andrews
ee10a93cbc WKS: reject records with zero octets at the end of the bitmap
(cherry picked from commit 9d446142d8)
2020-08-14 00:38:45 +10:00
Mark Andrews
e44da35092 TLSA: fix fromwire length checks
(cherry picked from commit 3429c35f52)
2020-08-14 00:38:45 +10:00
Mark Andrews
b4a66cffa8 SIG: reject records with a zero length signature
(cherry picked from commit 9b93e5d684)
2020-08-14 00:38:45 +10:00
Mark Andrews
10e8ad22c5 NXT: fix fromwire bitmap checks
(cherry picked from commit 73dd849655)
2020-08-14 00:38:45 +10:00
Mark Andrews
c712394b34 NSEC3PARAM: check that saltlen is consistent with the rdata length
(cherry picked from commit 7dc8e720ff)
2020-08-14 00:38:45 +10:00
Mark Andrews
26be6c817b NSEC3: reject records with a zero length hash field
(cherry picked from commit 031ee9e279)
2020-08-14 00:38:45 +10:00
Mark Andrews
ebd8033a96 IPSECKEY: require non-zero length public keys
(cherry picked from commit d7f7014803)
2020-08-14 00:38:45 +10:00
Mark Andrews
baf7d114af CERT: reject records with a empty certificate field
(cherry picked from commit a238f37239)
2020-08-14 00:38:45 +10:00
Mark Andrews
f09691feff Get rid of type 'RESERVED0'.
(cherry picked from commit 3c492b3ef1)
2020-08-14 00:38:45 +10:00
Mark Andrews
0c95100f98 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.

(cherry picked from commit a92d973430)
2020-08-14 00:38:45 +10:00
Mark Andrews
5806d856cf 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.

(cherry picked from commit 6c7e50c267)
2020-08-14 00:11:06 +10:00
Matthijs Mekking
5d6d138b9e Merge branch 'matthijs-fix-kasp-test-next-key-event-v9_16' into 'v9_16'
Fix check next key event check in kasp test

See merge request isc-projects/bind9!3956
2020-08-13 10:33:28 +00:00
Matthijs Mekking
9b69ab4c38 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.

(cherry picked from commit 262b52a154)
2020-08-13 12:07:08 +02:00
Michal Nowak
571b73260c Merge branch 'mnowak/fix-core-dumps-were-found-line-v9_16' into 'v9_16'
[v9_16] Make sure .txt files are not identified as crashed test

See merge request isc-projects/bind9!3947
2020-08-12 10:54:50 +00:00
Michal Nowak
01119ac4f9 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'.

(cherry picked from commit c2dcd95966)
2020-08-12 09:52:07 +02:00
Mark Andrews
174c588958 Merge branch '2045-readline-rltypedefs-h-35-22-error-this-function-declaration-is-not-a-prototype-on-netbsd-9-v9_16' into 'v9_16'
Resolve "readline/rltypedefs.h:35:22: error: this function declaration is not a prototype on NetBSD 9"

See merge request isc-projects/bind9!3945
2020-08-12 00:21:56 +00:00
Mark Andrews
cbcb265a5b Ensure rl_message() gets prototype.
(cherry picked from commit fd126553d4)
2020-08-12 09:40:39 +10:00
Mark Andrews
ea4457be88 Stop deprecated functions being defined
(cherry picked from commit 1532a34658)
2020-08-12 09:40:39 +10:00
Michal Nowak
291b565c0e Merge branch 'mnowak/run-tarball-tests-in-schedule-v9_16' into 'v9_16'
[v9_16] Run unit and system tarball tests on schedules

See merge request isc-projects/bind9!3943
2020-08-11 15:02:41 +00:00
Michal Nowak
f57684c6a3 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.

(cherry picked from commit 439fe9bc3c)
2020-08-11 17:00:41 +02:00
Mark Andrews
6761143221 Merge branch '2067-nta-related-crash-in-checkbogus-after-an-rndc-reload-v9_16' into 'v9_16'
Address use after free between view, resolver and nta.

See merge request isc-projects/bind9!3940
2020-08-11 02:17:44 +00:00
Mark Andrews
f3b25f1ffb 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.

(cherry picked from commit 0b2555e8cf)
2020-08-11 11:55:44 +10:00
Evan Hunt
7dd51f8d57 Merge branch 'each-fix-typo-v9_16' into 'v9_16'
fix typo

See merge request isc-projects/bind9!3939
2020-08-10 19:43:21 +00:00
Evan Hunt
a69b8e9b85 fix ARM typo 2020-08-10 12:39:18 -07:00
Michał Kępień
b8dcd6eb65 Merge branch '1775-pick-smaller-default-rbt-hash-table-size-v9_16' into 'v9_16'
Reduce the default rbt hashtable size to 16 entries (4 bits) (v9.16)

See merge request isc-projects/bind9!3936
2020-08-10 09:29:18 +00:00
Ondřej Surý
f0ccc17f30 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.

(cherry picked from commit 1e043a011b)
2020-08-10 10:32:26 +02:00
Mark Andrews
de1b12e8db Merge branch '2068-spnego-c-1430-2-error-len-may-be-used-uninitialized-in-this-function-on-arm' into 'v9_16'
Resolve "spnego.c:1430:2: error: ‘len’ may be used uninitialized in this function on ARM"

See merge request isc-projects/bind9!3929
2020-08-08 06:45:16 +00:00
Mark Andrews
8a4dd25562 Silence 'may be used uninitialized' 2020-08-08 16:12:12 +10:00
Matthijs Mekking
f9d392b4e0 Merge branch '1613-rndc-dnssec-checkds-v9_16' into 'v9_16'
Resolve "Signal DS submitting via rndc"

See merge request isc-projects/bind9!3931
2020-08-07 13:32:40 +00:00
Matthijs Mekking
624f1b9531 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'.

(cherry picked from commit 46fcd927e7)
2020-08-07 13:34:10 +02:00
Matthijs Mekking
06bc3f2210 Add notes for #1613 (rndc dnssec -checkds)
This is a new feature that should be mentioned in the notes.

(cherry picked from commit e4c82fc7ae)
2020-08-07 13:33:59 +02:00
Matthijs Mekking
ad0752bc22 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.

(cherry picked from commit a43bb41909)
2020-08-07 13:30:59 +02:00
Matthijs Mekking
4892006a92 Make 'parent-registration-delay' obsolete
With the introduction of 'checkds', the 'parent-registration-delay'
option becomes obsolete.

(cherry picked from commit a25f49f153)
2020-08-07 13:30:50 +02:00
Matthijs Mekking
0475646ebb 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.

(cherry picked from commit 38cb43bc86)
2020-08-07 13:30:40 +02:00
Matthijs Mekking
5dcf56f216 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.

(cherry picked from commit e3eb55fd1c)
2020-08-07 13:30:30 +02:00
Matthijs Mekking
81d0c63ecb 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'.

(cherry picked from commit 04d8fc0143)
2020-08-07 13:30:19 +02:00
Michał Kępień
c01e643715 Merge branch 'michal/remove-arm64-jobs-from-gitlab-ci-v9_16' into 'v9_16'
[v9_16] Remove arm64 jobs from GitLab CI

See merge request isc-projects/bind9!3922
2020-08-05 10:09:29 +00:00
Michał Kępień
3ab00a11eb 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.

(cherry picked from commit 49f245f7c0)
2020-08-05 12:07:37 +02:00
Michał Kępień
2798a4443d Merge branch '2065-set-max-cache-size-in-the-geoip2-system-test-v9_16' into 'v9_16'
[v9_16] Set "max-cache-size" in the "geoip2" system test

See merge request isc-projects/bind9!3921
2020-08-05 09:43:19 +00:00
Michał Kępień
fec4664ab0 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 aa72c31422 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.

(cherry picked from commit 4292d5bdfe)
2020-08-05 11:08:24 +02:00
Matthijs Mekking
71cd1a1d5c Merge branch 'ondrej-serve-stale-improvements-v9_16' into 'v9_16'
Serve stale improvements (9.16)

See merge request isc-projects/bind9!3913
2020-08-05 08:16:10 +00:00
Matthijs Mekking
f3103660d0 keyword 'primaries' is unknown in 9.16
In 9.17 we introduced 'primaries' as a synonym for 'masters' in the
configuration file. This synonym has not been backported so change
the serve-stale test to make use of the 'masters' keyword.
2020-08-05 09:09:16 +02:00
Matthijs Mekking
c92de6cb44 stale-cache-enable is enabled by default
Because this is a backport, the option should default to keep the
serve-stale caching enabled.
2020-08-05 09:09:16 +02:00