2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

38684 Commits

Author SHA1 Message Date
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
Tom Krizek
0874708bbf Merge branch '3917-named-should-log-uv-version-when-starting-up' into 'main'
Resolve "Named should log UV version when starting up"

Closes #3917

See merge request isc-projects/bind9!7642
2023-03-03 08:30:14 +00:00
Mark Andrews
5fd2cd8018 Now logs UV versions when starting up
Named now logs both compile time and run time UV versions when
starting up.  This is useful information to have when debugging
network issues involving named.
2023-03-03 14:04:34 +11:00
Arаm Sаrgsyаn
c3a159e080 Merge branch '3907-data-race-in-rbtdb' into 'main'
Resolve "ThreadSanitizer: data race lib/dns/rbtdb.c:1365 in newversion"

Closes #3907

See merge request isc-projects/bind9!7637
2023-03-02 18:36:01 +00:00
Aram Sargsyan
6980e3b354 Check if catz is active in dns__catz_update_cb()
A reconfiguration can deactivate the catalog zone, while the
offloaded update process was preparing to run.
2023-03-02 17:40:10 +00:00
Aram Sargsyan
67c77aba38 Check if catz is active in dns__catz_timer_cb()
A reconfiguration can deactivate the catalog zone, while the
update process was deferred using a timer.
2023-03-02 17:40:10 +00:00
Aram Sargsyan
3973724d67 Use catzs->lock in dns_catz_prereconfig()
There can be an update running in another thread, so use a lock,
like it's done in dns_catz_postreconfig().
2023-03-02 17:40:10 +00:00
Aram Sargsyan
cb0d6393a7 Add a CHANGES note for [GL #3907] 2023-03-02 17:40:10 +00:00
Aram Sargsyan
a87859f1fa catz: protect db_registered and db callback (un)registration with a lock
Doing this to avoid a race between the 'dns__catz_update_cb()' and
'dns_catz_dbupdate_callback()' functions.
2023-03-02 17:40:10 +00:00
Aram Sargsyan
d2ecff3c4a catz: use two pairs of dns_db_t and dns_dbversion_t in a catalog zone
As it is done in the RPZ module, use 'db' and 'dbversion' for the
database we are going to update to, and 'updb' and 'updbversion' for
the database we are working on.

Doing this should avoid a race between the 'dns__catz_update_cb()' and
'dns_catz_dbupdate_callback()' functions.
2023-03-02 17:39:43 +00:00
Aram Sargsyan
e1627e1289 Update the CHANGES note for [GL #3777]
Remove the part which is no longer true after reverting the commit
in question.

The CHANGES entry was never part of a released BIND 9 version.
2023-03-02 09:43:37 +00:00
Aram Sargsyan
593dea871a Revert "Process db callbacks in zone_loaddone() after zone_postload()"
This reverts commit ed268b46f11706bde3da68bd2a4b45752350f736.

The commit introduced a data race, because dns_db_endload() is called
after unfreezing the zone.
2023-03-01 17:26:41 +00:00
Arаm Sаrgsyаn
0eb6657c21 Merge branch 'aram/catz-add-lock-for-dns_catz_zone_t' into 'main'
Add a lock for dns_catz_zone_t

See merge request isc-projects/bind9!7633
2023-03-01 16:59:37 +00:00
Aram Sargsyan
2ae3bc6e1d Add a lock for dns_catz_zone_t
Use a lock for the catalog zones during dns__catz_zones_merge() to
avoid races between 'catz' and 'parentcatz'.
2023-03-01 15:36:36 +00:00
Arаm Sаrgsyаn
ad5b8fff05 Merge branch '3911-reconfig-zone-view-revert-bugfix' into 'main'
Fix view's zones reverting bug during reconfiguration

Closes #3911

See merge request isc-projects/bind9!7632
2023-03-01 15:35:27 +00:00
Aram Sargsyan
e1036253db Add CHANGES and release notes for [GL #3911] 2023-03-01 14:10:31 +00:00
Aram Sargsyan
84c235a4b0 Fix view's zones reverting bug during reconfiguration
During reconfiguration, the configure_view() function reverts the
configured zones to the previous view in case if there is an error.

It uses the 'zones_configured' boolean variable to decide whether
it is required to revert the zones, i.e. the error happened after
all the zones were successfully configured.

The problem is that it does not account for the case when an error
happens during the configuration of one of the zones (not the first),
in which case there are zones that are already configured for the
new view (and they need to be reverted), and there are zones that
are not (starting from the failed one).

Since 'zones_configured' remains 'false', the configured zones are
not reverted.

Replace the 'zones_configured' variable with a pointer to the latest
successfully configured zone configuration element, and when reverting,
revert up to and including that zone.
2023-03-01 14:10:31 +00:00
Aram Sargsyan
93c4f382f4 Add a catz system test check for [GL #3911]
The trick is to configure a duplicate zone, which comes after the
catalog zone, where the duplicate zone is an existing member zone.

In that scenario, all the zones which come before the "faulty" zone
in the configuration file will fail to be reverted to the previous
version of the view after a reconfiguration error, and in this
particular case that will result in an assertion failure when the
catalog zone update is initiated, because it will be still tied to
the new version of the view, which was dismissed.
2023-03-01 13:47:56 +00:00
Mark Andrews
f6f525132b Merge branch '3894-emit-coverage-summary-for-the-coverage-badge' into 'main'
Resolve "Emit coverage summary for the coverage badge"

Closes #3894

See merge request isc-projects/bind9!7587
2023-02-28 22:43:14 +00:00
Mark Andrews
db7af9fcc1 Extract test coverage statistics from the gcov job
In older GitLab versions, the regular expression used for extracting
test coverage statistics from the output of GitLab CI jobs was
configured in the project's settings, using GitLab's web interface.
That changed in recent GitLab versions [1]; the previous configuration
method was removed from the web interface altogether as of GitLab 15.0.
The relevant regular expression is now supposed to be set in the
relevant job's definition in .gitlab-ci.yml.

Set the regular expression used for extracting test coverage
statistics in the definition of the "gcov" GitLab CI job.  Use the
regular expression suggested in GitLab's documentation [2].

[1] https://docs.gitlab.com/ee/update/deprecations.html#test-coverage-project-cicd-setting
[2] https://docs.gitlab.com/ee/ci/pipelines/settings.html#test-coverage-examples
2023-02-28 22:23:13 +00:00