Commit Graph

37995 Commits

Author SHA1 Message Date
Michał Kępień
dbdc70cbe0 Convert setup.pl into static configurations
The setup.pl script has been replaced with static BIND configurations,
and in the course of this change, the unused ns1 server was removed.
This enhancement has greatly improved the overall test's readability.

(cherry picked from commit 08a8906cfc)
2023-08-08 14:30:34 +02:00
Michal Nowak
624c20b191 Rewrite stress test to pytest
The shell version of the test was completed only after all DNS zone
updates were sent, even if the BIND server crashed while processing
them, leading to prolonged execution and potential hang in the CI
environment. The Python rewrite of the test ensures that DNS update
tasks finish within five minutes of starting, irrespective of a BIND
crash possibility or DNS zone updates not finishing in time.

(cherry picked from commit ecd7b30d0a)
2023-08-08 14:30:27 +02:00
Michał Kępień
300f0230e1 Merge branch '4240-dnstap-system-test-fixes-9.18' into 'bind-9.18'
[9.18] "dnstap" system test fixes

See merge request isc-projects/bind9!8178
2023-08-07 12:59:41 +00:00
Michał Kępień
a1800c23a0 Wait until fstrm_capture is ready
The fstrm_capture utility is started in the background during the
"dnstap" system test.  Consequently, "rndc dnstap-reopen" and similar
commands may be executed before fstrm_capture starts listening on the
Unix domain socket it is configured to receive dnstap data on.  This
results in the dnstap data sent to that socket in the meantime to be
lost; while the fstrm writer thread is able to recover from such a
scenario within a couple of seconds (by reopening the configured dnstap
destination itself), only one write attempt is made for data
successfully queued to the writer thread, so dnstap frames can still be
lost in the process.  This may happen during the "dnstap" system test,
leading to the dnstap output file being empty, which in turn causes the
test to fail.

Fix by waiting until fstrm_capture starts listening on the Unix domain
socket it is configured to use before asking named to reopen the
configured dnstap destination.  Since various fstrm_capture versions log
different messages when the listening socket is set up, wait for a
common string that works for all fstrm_capture versions released to
date.  Add a few extra debug messages indicating test progress and make
the test fail if the expected fstrm_capture log message is not generated
within 10 seconds.

(cherry picked from commit 26d3d97f12)
2023-08-07 13:59:35 +02:00
Michał Kępień
7db6129f62 Capture all fstrm_capture output
The fstrm_capture.out file is overwritten when the fstrm_capture utility
is restarted during the "dnstap" system test.  Use a separate output
file for each fstrm_capture instance to ensure all output produced by
that tool during the "dnstap" system test is preserved for forensic
purposes.

(cherry picked from commit bd2941fc72)
2023-08-07 13:59:35 +02:00
Mark Andrews
edad2eb2b9 Merge branch '4243-_wait_for_stats-errors-not-detected-in-ixfr-system-test-bind-9.18' into 'bind-9.18'
[9.18] Resolve "_wait_for_stats errors not detected in ixfr system test"

See merge request isc-projects/bind9!8176
2023-08-07 09:47:39 +00:00
Mark Andrews
4e8b3f9893 Set ret=1 if _wait_for_stats does not succeed
Errors getting transfer statistics from named.run where not detected
as ret was not set to one if there hadn't been a success after looping
for a while.

(cherry picked from commit 287a1ac09b)
2023-08-07 19:20:13 +10:00
Michał Kępień
6c930b8db5 Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.18.19' into 'bind-9.18'
Set up version and release notes for BIND 9.18.19

See merge request isc-projects/bind9!8174
2023-08-07 08:27:23 +00:00
Michał Kępień
6c7c302cbc Set up release notes for BIND 9.18.19 2023-08-07 10:26:29 +02:00
Michał Kępień
bda09d3602 Update BIND version to 9.18.19-dev 2023-08-07 10:26:29 +02:00
Matthijs Mekking
f80b95bd97 Merge branch 'matthijs-followup-4032-v9_18' into 'bind-9.18'
[9.18] Change default TTLsig to one week

See merge request isc-projects/bind9!8165
2023-08-02 12:03:46 +00:00
Matthijs Mekking
dab43f84dd Change default TTLsig to one week
Commit dc6dafdad1 allows larger TTL values
in zones that go insecure, and ignores the maximum zone TTL.

This means that if you use TTL values larger than 1 day in your zone,
your zone runs the risk of going bogus before it moves safely to
insecure.

Most resolvers by default cap the maximum TTL that they cache RRsets,
at one day (Unbound, Knot, PowerDNS) so that is fine. However, BIND 9's
default is one week.

Change the default TTLsig to one week, so that also for BIND 9
resolvers in the default cases responses for zones that are going
insecure will not be evaluated as bogus.

This change does mean that when unsigning your zone, it will take six
days longer to safely go insecure, regardless of what TTL values you
use in the zone.

(cherry picked from commit 32686beabc)
2023-08-02 12:19:25 +02:00
Evan Hunt
668e1f613f Merge branch '3700-deprecate-dialup-bind-9.18' into 'bind-9.18'
[9.18] deprecate "dialup" and "heartbeat-interval"

See merge request isc-projects/bind9!8159
2023-08-02 02:10:29 +00:00
Evan Hunt
aa4e3e0994 CHANGES and release note for [GL #3700]
(cherry picked from commit d10b6a4b39)
2023-08-01 18:42:19 -07:00
Evan Hunt
3cc1e5e12a deprecate "dialup" and "heartbeat-interval"
these options concentrate zone maintenance actions into
bursts for the benefit of servers with intermittent connections.
that's no longer something we really need to optimize.

(cherry picked from commit eeeccec67c)
2023-08-01 18:41:49 -07:00
Mark Andrews
c17cbc371c Merge branch '4229-nextpart-failed-set-e-fallout-bind-9.18' into 'bind-9.18'
[9.18] Resolve "nextpart failed, set -e fallout?"

See merge request isc-projects/bind9!8158
2023-08-02 01:09:22 +00:00
Mark Andrews
0e4872a12a Use $() instead of backticks
(cherry picked from commit 162db75e2b)
2023-08-02 00:31:30 +00:00
Mark Andrews
ad69f979c6 Merge branch '4059-oracle-linux-8-shell-doesn-t-always-restore-environment-variable-correctly-bind-9.18' into 'bind-9.18'
[9.18] Resolve "Oracle Linux 8 shell doesn't always restore environment variable correctly"

See merge request isc-projects/bind9!8157
2023-08-02 00:24:17 +00:00
Mark Andrews
b1a9077011 Use sub shell to isolate enviroment changes
'HOME=value command' should only change HOME for command but on
some platforms this occasionally sets HOME for the rest of the
test. Explicitly isolate the enviroment change using a sub shell.

(cherry picked from commit 96f75bba18)
2023-08-02 09:56:27 +10:00
Arаm Sаrgsyаn
c2957ad386 Merge branch '4226-dig-help-message-https-plain-get-vs-http-plain-get-9.18' into 'bind-9.18'
[9.18] Fix dig help message typo in the http-plain-get option

See merge request isc-projects/bind9!8156
2023-08-01 12:03:41 +00:00
Aram Sargsyan
18ba295abe Fix dig help message typo in the http-plain-get option
The option name is misspelled as 'https-plain-get'. Fix the error.

(cherry picked from commit 77d1476c46)
2023-08-01 11:22:10 +00:00
Matthijs Mekking
6fbbfe9018 Merge branch '4032-ignore-max-zone-ttl-dnssec-policy-insecure-v9_18' into 'bind-9.18'
[9.18] Ignore max-zone-ttl on dnssec-policy insecure

See merge request isc-projects/bind9!8155
2023-08-01 09:37:38 +00:00
Matthijs Mekking
803e95dc00 Add CHANGES and release note for #4032
(cherry picked from commit 0bdf1980c4)
2023-08-01 09:53:03 +02:00
Matthijs Mekking
a21407d062 Ignore max-zone-ttl on dnssec-policy insecure
Allow larger TTL values in zones that go insecure. This is necessary
because otherwise the zone will not be loaded due to the max-zone-ttl
of P1D that is part of the current insecure policy.

In the keymgr.c code, default back to P1D if the max-zone-ttl is set
to zero.

(cherry picked from commit dc6dafdad1)
2023-08-01 09:53:03 +02:00
Mark Andrews
dea6db53bc Merge branch '4225-return-refused-if-gssapi-not-configured-bind-9.18' into 'bind-9.18'
[9.18] Resolve "SERVFAIL response to TKEY query"

See merge request isc-projects/bind9!8154
2023-08-01 01:45:15 +00:00
Mark Andrews
26ff230be2 Add CHANGES for [GL #4225]
(cherry picked from commit ccaefce7ca)
2023-07-29 05:47:14 +10:00
Mark Andrews
022397a2c7 Check GSS-API TKEY against non configured server
Check for the expected error message which includes rcode REFUSED
then reload the server to specify the keytab for the rest of the
GSSAPI tests.

(cherry picked from commit 3a2a24903c)
2023-07-29 05:46:32 +10:00
Mark Andrews
aeab068adc Report TKEY query errors in nsupdate
(cherry picked from commit f244619680)
2023-07-29 05:46:32 +10:00
Mark Andrews
b64aa2d7a2 Return REFUSED if GSSAPI is not configured
Return REFUSED if neither a keytab nor a gssapi credential is
configured to GSSAPI/TKEY requests.

(cherry picked from commit b5076014b9)
2023-07-29 05:46:32 +10:00
Ondřej Surý
465923efff Merge branch 'stepan/fix-check-in-ecdsa-system-test-9.18' into 'bind-9.18'
[9.18] Fix ecdsa256 check in ecdsa system test setup

See merge request isc-projects/bind9!8150
2023-07-28 08:12:33 +00:00
Štěpán Balážik
ffe0cb4bb0 Fix ecdsa256 check in ecdsa system test setup
Probably by copy-paste mistake, ecdsa384 was checked twice.

(cherry picked from commit 10194baa07)
2023-07-28 09:15:06 +02:00
Tom Krizek
49dcee5b19 Merge branch '4055-improve-the-overmem-cache-cleaning-test-9.18' into 'bind-9.18'
[9.18] [CVE-2023-2828] Add test for dns_rbtdb overmem purging

See merge request isc-projects/bind9!8143
2023-07-26 12:15:23 +00:00
Ondřej Surý
a2c5503bba Add test for dns_rbtdb overmem purging
Add a unit test to check if the overmem purging in the RBTDB is
effective when mixed size RR data is inserted into the database.

Co-authored-by: Ondřej Surý <ondrej@isc.org>
Co-authored-by: Jinmei Tatuya <jtatuya@infoblox.com>

(manually picked from 269c03831f)
2023-07-26 13:39:24 +02:00
Tom Krizek
3a837951fe Merge branch 'tkrizek/disable-resolve-in-tsan' into 'bind-9.18'
[9.18] Disable resolve checks under TSAN

See merge request isc-projects/bind9!8138
2023-07-26 08:06:58 +00:00
Tom Krizek
774b9bc629 Disable resolve checks under TSAN
The resolve binary is affected by GL#4119 which occassionally makes it
hand during system tests when running with TSAN. This is a workaround to
avoid wasting resources caused by a CI timeout for the system test tsan
jobs.
2023-07-25 14:05:28 +02:00
Tom Krizek
5c98308987 Merge branch '4089-stale-query-loop-test-9.18' into 'bind-9.18'
[9.18] Reproducer for CVE-2023-2911

See merge request isc-projects/bind9!8135
2023-07-25 11:25:13 +00:00
Tom Krizek
0d88cd444b Reproducer for CVE-2023-2911
The conditions that trigger the crash:
- a stale record is in cache
- stale-answer-client-timeout is 0
- multiple clients query for the stale record, enough of them to exceed
  the recursive-clients quota
- the response from the authoritative is sufficiently delayed so that
  recursive-clients quota is exceeded first

The reproducer attempts to simulate this situation. However, it hasn't
proven to be 100 % reproducible, especially in CI. When reproducing
locally, the priming query also seems to sometimes interfere and prevent
the crash. When the reproducer is ran twice, it appears to be more
reliable in reproducing the issue.

(cherry picked from commit f617512d37)
2023-07-25 10:34:33 +02:00
Tom Krizek
a9b4552db2 Merge branch 'tkrizek/checkconf-keys-dir-set-e-9.18' into 'bind-9.18'
[9.18] Clean up keys directory in checkconf test

See merge request isc-projects/bind9!8134
2023-07-25 08:11:12 +00:00
Tom Krizek
744185f524 Clean up keys directory in checkconf test
The keys directory should be cleaned up in clean.sh. Doing that in the
test itself isn't reliable which may lead to failing mkdir which causes
the test to fail with set -e.

(cherry picked from commit 062dfac28e)
2023-07-25 09:21:50 +02:00
Mark Andrews
e927dd4609 Merge branch '4215-add-isc_r_timedout-to-the-reasons-to-call-dns_zonemgr_unreachableadd-in-xfrin-bind-9.18' into 'bind-9.18'
[9.18] Resolve "Add ISC_R_TIMEDOUT to the reasons to call dns_zonemgr_unreachableadd in xfrin"

See merge request isc-projects/bind9!8128
2023-07-21 23:38:58 +00:00
Mark Andrews
85173c2bf5 Add CHANGES note for [GL #4215]
(cherry picked from commit fefc273eb0)
2023-07-22 09:01:02 +10:00
Mark Andrews
c36d41d39c Mark a primary as unreachable on timed out in xfin
When a primary server is not responding, mark it as temporarialy
unreachable.  This will prevent too many zones queuing up on a
unreachable server and allow the refresh process to move onto
the next primary sooner once it has been so marked.

(cherry picked from commit 621c117101)
2023-07-22 09:00:08 +10:00
Ondřej Surý
4e12fb257e Merge branch '4200-dont-process-next-TCP-packet-when-paused-9.18' into 'bind-9.18'
[9.18] Don't process detach and close as priority netmgr events

See merge request isc-projects/bind9!8094
2023-07-20 17:20:48 +00:00
Ondřej Surý
7cd1ac2fa7 Add CHANGES and release note for [GL #4200] 2023-07-20 18:41:01 +02:00
Ondřej Surý
c2c2ec0c96 Don't process detach and close as priority netmgr events
The detach (and possibly close) netmgr events can cause additional
callbacks to be called when under exclusive mode.  The detach can
trigger next queued TCP query to be processed and close will call
configured close callback.

Move the detach and close netmgr events from the priority queue to the
normal queue as the detaching and closing the sockets can wait for the
exclusive mode to be over.
2023-07-20 18:37:48 +02:00
Arаm Sаrgsyаn
13151c3515 Merge branch 'aram/tests-statschannel-fetch.pl-typo-9.18' into 'bind-9.18'
[9.18] Fix a bug in an utility script for the statschannel system test

See merge request isc-projects/bind9!8120
2023-07-19 15:47:24 +00:00
Aram Sargsyan
67f4b9d2a6 Fix a bug in an utility script for the statschannel system test
Because of a typo, the fetch.pl script tries to extract the server
address from the input parameter 'a' instead of 's'. Fix the typo.

(cherry picked from commit aa7538fd38)
2023-07-19 13:25:17 +00:00
Tom Krizek
42d7c0e92a Merge tag 'v9.18.17' into bind-9.18 2023-07-19 14:36:57 +02:00
Mark Andrews
5e6628f3ab Merge branch '4203-run-gdb-not-found-bind-9.18' into 'bind-9.18'
[9.18] Resolve "run.gdb not found"

See merge request isc-projects/bind9!8112
2023-07-19 03:14:01 +00:00
Mark Andrews
d865ca788f Use absolute path to locate run.gdb
(cherry picked from commit 3f7723cdff)
2023-07-19 12:37:48 +10:00