2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00
Commit Graph

38653 Commits

Author SHA1 Message Date
Aram Sargsyan
fa686fcea5 Improve dnstap system test reliability
The dnstap system test fails intermittently, and it appears to be
a timing issue - adding a short delay after running 'fstrm_capture',
and before running 'dnstap -reopen' improves the situation from
50% failures (5 out of 10 times) to 0% failures (0 out of 20 times),
tested locally.

The reason is that 'fstrm_capture' is executed in the background,
and due to OS scheduling and other factors, the listener socket
may not be ready when the following command runs and tells 'named'
to (re)open it.
2023-03-13 10:25:01 +00:00
Ondřej Surý
b3029d31c0 Merge branch 'ondrej-userspace-rcu-github-actions' into 'main'
Install liburcu-dev to GitHub Actions

See merge request isc-projects/bind9!7675
2023-03-11 04:05:57 +00:00
Ondřej Surý
def02029c0 Install liburcu-dev to GitHub Actions
The CodeQL and SonarCloud GitHub Actions would FTBFS because of missing
liburcu-dev package resulting.  Install the required package to both
GitHub Action files.
2023-03-11 05:03:54 +01:00
Ondřej Surý
f7ae0eb544 Merge branch 'fanf-urcu' into 'main'
Build with liburcu, userspace RCU

Closes #3935

See merge request isc-projects/bind9!7662
2023-03-10 19:21:45 +00:00
Tony Finch
37c4f7f349 CHANGES and release notes for [GL #3935]
[func]		BIND now requires liburcu for lock-free data structures
		and concurrent safe memory reclamation. It replaces the
		home-grown lock-free linked list and QSBR machinery
		added in changes 6108 and 6109. The qp-trie code has
		been adjusted to use liburcu.
2023-03-10 17:31:28 +01:00
Tony Finch
7e565a87a7 Apply adjusted clang-format
The headers were slightly reordered when liburcu was added.
2023-03-10 17:31:28 +01:00
Ondřej Surý
2532b558b4 Build with liburcu, Userspace RCU
BIND needs a collection of standard lock-free data structures,
which we can find in liburcu, along with its RCU safe memory
reclamation machinery. We will use liburcu's QSBR variant instead
of the home-grown isc_qsbr.
2023-03-10 17:31:28 +01:00
Arаm Sаrgsyаn
d96ff69b84 Merge branch 'aram/fix-ISC_REFCOUNT_TRACE_IMPL-usage' into 'main'
Fix ISC_REFCOUNT_TRACE_IMPL usage

See merge request isc-projects/bind9!7673
2023-03-09 22:40:44 +00:00
Aram Sargsyan
fce68da460 Fix ISC_REFCOUNT_TRACE_IMPL usage
ISC_REFCOUNT_TRACE_IMPL uses isc_tid(), but the corresponding header
file is not included, which breaks, for example, compiling BIND with
DNS_CATZ_TRACE defined in lib/dns/include/dns/catz.h.

Add '#include <isc/tid.h>' in lib/isc/include/isc/refcount.h.
2023-03-09 21:38:04 +00:00
Michal Nowak
0663efc209 Merge branch 'mnowak/stress-test-drop-parallel-build' into 'main'
Drop parallel build from stress tests

See merge request isc-projects/bind9!7669
2023-03-09 17:31:33 +00:00
Michal Nowak
3fd7e7c81f Drop parallel build from stress tests
BUILD_PARALLEL_JOBS environmental variable is set to 6, which does not
align well with 4 and 8 CPU core systems dedicated to CI "stress" tests.
When multiple parallel jobs run on the host, they compete for resources
with an undesirable result: 6 compiler processes of one job may starve
named, resulting in lower-than-expected throughput and minutes-long
query response latency spikes.

Better drop the build parallelism of BIND-under-test. About 1-2 minutes
are added to the 60-65 minutes long job duration.
2023-03-09 18:24:03 +01:00
Michal Nowak
ce49dccf40 Merge branch 'mnowak/update-release-tarball-comparison.sh' into 'main'
Adapt tarball comparison to dropped pregenerated man pages

See merge request isc-projects/bind9!7661
2023-03-09 16:05:20 +00:00
Michal Nowak
0bc4fad065 Adapt tarball comparison to dropped pregenerated man pages
Since pregenerated manual pages were removed from the BIND 9 repository,
Sphinx must be present in the build environment for manual pages to be
created and placed to release tarball. release-tarball-comparison.sh
script needs to be adapted to keep up with how to release tarballs are
prepared.
2023-03-09 16:55:46 +01:00
Arаm Sаrgsyаn
9c304714e3 Merge branch '3923-doth-system-test-timing-issue' into 'main'
Resolve "timing issue with incoming XoT check in `doth` system test"

Closes #3923

See merge request isc-projects/bind9!7653
2023-03-09 10:39:14 +00:00
Aram Sargsyan
5d5d4b523b Retry multiple times in doth test when checking if the zone file exists
Dumping of the freshly transferred zone file can take some time.

Retry 5 times before failing.

The log excerpt below shows such a case, when dumping lasted more than
two seconds.

    06-Mar-2023 09:32:09.973 zone example6/IN: Transfer started.
    06-Mar-2023 09:32:10.301 zone example6/IN: zone transfer finished: success
    06-Mar-2023 09:32:10.301 zone_dump: zone example6/IN: enter
    06-Mar-2023 09:32:11.789 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): AXFR request
    06-Mar-2023 09:32:11.801 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): transfer of 'example6/IN': AXFR ended: 5 messages, 2676 records, 55815 bytes, 0.011 secs (5074090 bytes/sec) (serial 1397051952)
    06-Mar-2023 09:32:12.409 zone_gotwritehandle: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 dump_done: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 zone_journal_compact: zone example6/IN: target journal size 53044
2023-03-09 10:03:19 +00:00
Aram Sargsyan
9672b6be57 Fix the placement of printing dig output comments in doth system test
There can be comments in dig output for a zone transfer only in case
of an error, so we should print those errors not when wait_for_tls_xfer
succeeds, but when it fails.

Also, there is no point in printing those comments when a failure was
indeed expected.
2023-03-09 10:03:19 +00:00
Aram Sargsyan
2fdf01573c Fail early in doth system test when the expected failure doesn't happen
If wait_for_tls_xfer succeeds, while a failure was being expected,
set ret=1 to fail without further checking if the zone file exists.
2023-03-09 10:03:19 +00:00
Michal Nowak
e6af4a1030 Merge branch 'mnowak/stress-test-build-with-default-CFLAGS' into 'main'
Build BIND in stress test jobs with common CFLAGS

See merge request isc-projects/bind9!7627
2023-03-09 09:58:05 +00:00
Michal Nowak
d33bdd36b4 Build BIND in stress test jobs with common CFLAGS
By omission, BIND was not built with common CFLAGS in the stress test
jobs. Building with common CFLAGS and -Og should help GDB produce a
backtrace with more information.
2023-03-09 10:24:50 +01:00
Mark Andrews
96d2651e83 Merge branch '3929-gcc-12-static-analyzer-use-of-uninitialized-value-ctx-val-1-in-base32-c' into 'main'
Resolve "GCC 12 static analyzer: use of uninitialized value '*ctx.val[1]' in base32.c"

Closes #3929

See merge request isc-projects/bind9!7655
2023-03-08 23:01:12 +00:00
Mark Andrews
0045b24500 Silence uninitialized value false positives
In base32_decode_char the GCC 12 static analyser fails to determine
that ctx->val[1], ctx->val[3], ctx->val[4] and ctx->val[6] are
assigned values by the previous call to base32_decode_char.  Initialise
ctx->val to zeros when initalising the rest of ctx to silence the
false positive.
2023-03-08 22:40:03 +00:00
Mark Andrews
700d5f6b0b Merge branch '3932-gcc-12-static-analyzer-warning-use-of-null-_frm-where-non-null-expected-in-cc-c' into 'main'
Resolve "GCC 12 static analyzer: warning: use of NULL '_frm' where non-null expected in cc.c"

Closes #3932

See merge request isc-projects/bind9!7658
2023-03-08 22:36:19 +00:00
Mark Andrews
2b18f6699b Silence GCC 12 NULL pointer dereference warnings
When isccc_cc_lookupstring returns ISC_R_SUCCESS the returned pointer
is non NULL.  Add INSISTS do that GCC 12 can determine this.
2023-03-08 22:14:59 +00:00
Mark Andrews
07bf332170 Merge branch '3931-gcc-12-static-analyzer-warning-use-of-uninitialized-value-svcb-svclen-in-rdata-c' into 'main'
Resolve "GCC 12 static analyzer: warning: use of uninitialized value 'svcb.svclen' in rdata.c"

Closes #3931

See merge request isc-projects/bind9!7657
2023-03-08 22:07:46 +00:00
Mark Andrews
e37c9702ae Add additional contraints to dns_rdata_checksvcb
REQUIRE that rdata->type is dns_rdatatype_svcb to detect when
dns_rdata_checksvcb is called with the wrong rdata type.  There are
no code paths that currently pass the wrong rdata to dns_rdata_checksvcb.

This was found by GCC 12 static analysis.
2023-03-08 21:47:14 +00:00
Matthijs Mekking
f0c8da6d31 Merge branch '3925-serve-stale-system-test-failure' into 'main'
Lower chance of intermittent serve-stale system test failure

Closes #3925

See merge request isc-projects/bind9!7659
2023-03-08 16:34:46 +00:00
Matthijs Mekking
0bf36da305 Update serve-stale system test
The serve-stale system test was intermittently failing due to a timing
issue:

    I:serve-stale:check stale data.example TXT was refreshed...
    I:serve-stale:failed

The RRset is refreshed, however, it first checks for an expected log
line, prior checking that the stale data.example TXT was refreshed
(using dig). This log line is there to ensure the record is actually
refreshed before we start querying again. Alternatively we could just
retry_quiet 10 <wait for dig output matches expectations>. It would
lower the chances for intermittent test failures, since there is no
longer a "check for log line, sleep one second if check fails, check
for log line, ...", prior to the check.
2023-03-08 17:14:59 +01:00
Ondřej Surý
1c8255efea Merge branch 'tt-openssl-dh-refactoring' into 'main'
Refactor OpenSSL EDDSA code

See merge request isc-projects/bind9!7429
2023-03-08 15:13:20 +00:00
Timo Teräs
20b4d7146b Convert OpenSSL EDDSA glue to pkeypair
Finish the OpenSSL EDSSA glue refactoring to use pkeypair - this is the
same change that has been already applied to RSA and ECDSA glues.
2023-03-08 13:50:46 +01:00
Timo Teräs
28da7670b6 OpenSSL EDDSA introduce and use openssleddsa_alg_info()
Move the common code into a helper function that returns the EDDSA
parameters (pkey type, nid, keysize, sigsize).
2023-03-08 13:50:46 +01:00
Timo Teräs
c0b1ac97bf Remove redundant NULL checks in OpenSSL RSA glue
The OpenSSL free functions are no-op when called with NULL argument,
thus remove the extra checks around *_free() calls in the OpenSSL RSA
glue.
2023-03-08 13:50:46 +01:00
Timo Teräs
fa8343e9c9 Introduce dst__openssl_keypair_{compare,isprivate,destroy}
Rename and simplify dst__openssl_compare_keypair() to
dst__openssl_keypair_compare(), and introduce two additional functions
dst__openssl_keypair_isprivate and dst__openssl_keypair_destroy.

Use those to de-duplicated openssl{rsa,ecdsa}_isprivate, and
openssl{rsa,ecdsa}_destroy.
2023-03-08 13:50:46 +01:00
Tony Finch
61598b0cd1 Merge branch 'fanf-libbind9-remnants' into 'main'
Remove some lingering references to libbind9

See merge request isc-projects/bind9!7660
2023-03-08 12:04:35 +00:00
Tony Finch
c43668f031 Remove some lingering references to libbind9
Clean up the `.clang-format` #include priority list and
the `\file` declaration in `isc/getaddresses.h`.
2023-03-08 10:06:22 +00:00
Ondřej Surý
d3764f0759 Merge branch '3905-remove-TKEY-Diffie-Hellman-exchange' into 'main'
Remove TKEY Mode 2 (Diffie-Hellman)

Closes #3905

See merge request isc-projects/bind9!7626
2023-03-08 07:57:52 +00:00
Ondřej Surý
cf21e05313 Add CHANGES and release note for [GL #3905] 2023-03-08 08:36:25 +01:00
Evan Hunt
f030831481 further cleanup after removing diffie-hellman TKEY mode
without diffie-hellman TKEY negotiation, some other code is
now effectively dead or unnecessary, and can be cleaned up:

- the rndc tsig-list and tsig-delete commands.
- a nonoperational command-line option to dnssec-keygen that
  was documented as being specific to DH.
- the section of the ARM that discussed TKEY/DH.
- the functions dns_tkey_builddeletequery(), processdeleteresponse(),
  and tkey_processgssresponse(), which are unused.
2023-03-08 08:36:25 +01:00
Ondřej Surý
bd4576b3ce Remove TKEY Mode 2 (Diffie-Hellman)
Completely remove the TKEY Mode 2 (Diffie-Hellman Exchanged Keying) from
BIND 9 (from named, named.conf and all the tools).  The TKEY usage is
fringe at best and in all known cases, GSSAPI is being used as it should.

The draft-eastlake-dnsop-rfc2930bis-tkey specifies that:

    4.2 Diffie-Hellman Exchanged Keying (Deprecated)

       The use of this mode (#2) is NOT RECOMMENDED for the following two
       reasons but the specification is still included in Appendix A in case
       an implementation is needed for compatibility with old TKEY
       implementations. See Section 4.6 on ECDH Exchanged Keying.

          The mixing function used does not meet current cryptographic
          standards because it uses MD5 [RFC6151].

          RSA keys must be excessively long to achieve levels of security
          required by current standards.

We might optionally implement Elliptic Curve Diffie-Hellman (ECDH) key
exchange mode 6 if the draft ever reaches the RFC status.  Meanwhile the
insecure DH mode needs to be removed.
2023-03-08 08:36:25 +01:00
Tom Krizek
584eb79400 Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.19.12' into 'main'
Set up version and release notes for BIND 9.19.12

See merge request isc-projects/bind9!7650
2023-03-07 16:35:33 +00:00
Tom Krizek
7f0cb47044 Set up release notes for BIND 9.19.12 2023-03-07 14:10:26 +01:00
Tom Krizek
ddd337f541 Update BIND version to 9.19.12-dev 2023-03-07 14:09:54 +01:00
Tom Krizek
5e3e7a262b Update BIND version for release v9.19.11 2023-03-03 15:10:56 +01:00
Tom Krizek
f14d8ad78c Add a CHANGES marker 2023-03-03 15:10:10 +01:00
Tom Krizek
5fa00c7ce1 Merge branch 'tkrizek/prepare-documentation-for-bind-9.19.11' into 'v9_19_11-release'
Prepare documentation for BIND 9.19.11

See merge request isc-private/bind9!500
2023-03-03 14:05:21 +00:00
Tom Krizek
8f315605ba Add release note for GL #3673 2023-03-03 10:54:00 +01:00
Tom Krizek
86bd0c719e Reorder release notes 2023-03-03 10:53:14 +01:00
Tom Krizek
3838c56ed8 Tweak and reword release notes 2023-03-03 10:53:08 +01:00
Tom Krizek
d4ab5a476c Prepare release notes for BIND 9.19.11 2023-03-03 10:11:16 +01:00
Tom Krizek
9b944eb8a5 Add release metadata update to release checklist
The release engineering automation we have relies on up-to-date
information about our upcoming release plans. Ensure these are updated
at the end of each release cycle.
2023-03-03 10:11:16 +01:00
Michal Nowak
b08e54a0d2 Move "disallow merging to maintained branches" closer to tagging
Updating GitLab settings for all maintained branches to disallow merging
to them has an unfortunate consequence: daily scheduled pipelines won't
be executed anymore. This is a problem because we need the pipelines to
ensure no new bugs were introduced just before a code freeze.

The "Announce (on Mattermost) that the code freeze is in effect" item is
still in place but is now more of a social "disallow merging to
maintained branches".
2023-03-03 10:11:13 +01:00