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

42258 Commits

Author SHA1 Message Date
Aydın Mercan
069c6c2265 chg: usr: use deterministic ecdsa for openssl >= 3.2
OpenSSL has added support for deterministic ECDSA (RFC 6979) with
version 3.2.

Use it by default as it removes arguably its most fragile side of ECDSA.
The derandomization doesn't pose a risk for DNS usecases and is allowed by FIPS 186-5.

Closes https://gitlab.isc.org/isc-projects/bind9/-/issues/299

Merge branch '299-change-ecdsa-to-deterministic-usage-elliptic-curve-digital-signature-algorithm-rfc-6979' into 'main'

Closes #299

See merge request isc-projects/bind9!9128
2024-08-14 12:47:06 +00:00
Aydın Mercan
596903a6b7 use deterministic ecdsa for openssl >= 3.2
OpenSSL has added support for deterministic ECDSA (RFC 6979) with
version 3.2.

Use it by default as derandomization doesn't pose a risk for DNS
usecases and is allowed by FIPS 186-5.
2024-08-14 14:34:44 +03:00
Petr Špaček
b732da695e Update BIND version for release v9.21.0 2024-08-13 16:27:17 +02:00
Petr Špaček
8efe101742 Add changelog entry for last-minute regression fix 2024-08-13 16:27:17 +02:00
Petr Špaček
3e86c3190d Prepare documentation for BIND 9.21.0
Merge branch 'michal/prepare-documentation-for-bind-9.21.0' into 'v9.21.0-release'

See merge request isc-private/bind9!728
2024-08-13 16:22:58 +02:00
Michał Kępień
507824e524 fix: usr: reconfigure catz member zones during named reconfiguration
During a reconfiguration named wasn't reconfiguring catalog zones'
member zones. This has been fixed.

Closes isc-projects/bind9#4733

Merge branch '4733-fix-catz-member-zones-reconfigure' into 'v9.21.0-release'

See merge request isc-private/bind9!695
2024-08-13 16:22:58 +02:00
Petr Špaček
713f430349 Tweak and reword release notes some more
Co-authored-by: Greg Choules <greg@isc.org>
2024-08-13 16:22:58 +02:00
Aram Sargsyan
d197c583dd Non empty 'catalog-zones' implies that 'allow-new-zones' is true
This condition in catalog zone processing functions is checked only
for sanity, so there is no meaning for a log message that normally
shouldn't be ever logged.
2024-08-13 16:22:58 +02:00
Michał Kępień
4301d90ca2 Prepare documentation for BIND 9.21.0 2024-08-13 16:22:58 +02:00
Aram Sargsyan
730fd32ee6 Reconfigure catz member zones during named reconfiguration
During a reconfiguration named doesn't reconfigure catalog zones
member zones. Implement the necessary code to reconfigure catz
member zones.
2024-08-13 16:22:58 +02:00
Michał Kępień
c9b23221c4 Reorder release notes 2024-08-13 16:22:58 +02:00
Aram Sargsyan
f6dd701b83 Test that 'rndc reconfig' reconfigures catz member zones
Catalog zone member zones should be reconfigured as all the other
zones during a reconfiguration. Test it by checking whether the newly
added allow-query setting affects a member zone.
2024-08-13 16:22:58 +02:00
Michał Kępień
e4e9616a14 Fix "make doc" for the changelog 2024-08-13 16:22:58 +02:00
Michał Kępień
a47707c59d Tweak and reword release notes 2024-08-13 16:22:58 +02:00
Michał Kępień
53cdd247bb Generate release documentation 2024-08-13 16:22:58 +02:00
Ondřej Surý
8b70722fcb fix: dev: Don't skip the counting if fcount_incr() is called with force==true (v2)
The fcount_incr() was not increasing counter->count when force was set
to true, but fcount_decr() would try to decrease the counter leading to
underflow and assertion failure.  Swap the order of the arguments in the
condition, so the !force is evaluated after incrementing the .count.

Closes #4846

Merge branch '4786-forced-fcount_incr-should-still-increment-count-and-allowed-fix' into 'main'

Closes #4846

See merge request isc-projects/bind9!9298
2024-08-13 13:53:13 +00:00
Ondřej Surý
c2c9d8f01b Add fetches-per-zone 40 to qmin/ns5 configuration
The simple change causes assertion failure fixed in the previous commit.
2024-08-13 14:56:48 +02:00
Ondřej Surý
8e86e55af1 Don't skip the counting if fcount_incr() is called with force==true (v2)
The fcount_incr() was not increasing counter->count when force was set
to true, but fcount_decr() would try to decrease the counter leading to
underflow and assertion failure.  Swap the order of the arguments in the
condition, so the !force is evaluated after incrementing the .count.
2024-08-13 12:51:22 +02:00
Michal Nowak
f6fb9a4969 chg: Make every changelog entry a separate code block
LaTeX in CI and on ReadTheDocs [fails][1] to render a PDF version of ARM if
the Changelog section is included. The running theory is that the
verbatim section of more than twenty thousand lines is too big to meet
LaTeX self-imposed constraints, and it fails with:

    ! TeX capacity exceeded, sorry [main memory size=5000000].

Or it just hangs if extra_mem_bot=30000000 is set in
/etc/texmf/texmf.d/01main_memory_bump.cnf:

    ! Dimension too large.
    \fb@put@frame ...p \ifdim \dimen@ >\ht \@tempboxa

    \fb@putboxa #1\fb@afterfra...
    l.56913 \end{sphinxVerbatim}

Make each BIND 9 release a separate code block to work around the issue.
Further split up the sections for some exceptionally large releases, for
the same reason.

[1]: https://gitlab.isc.org/isc-projects/bind9/-/jobs/4584011

Merge branch 'mnowak/fix-arm-changelog-section' into 'main'

See merge request isc-projects/bind9!9266
2024-08-08 14:25:12 +00:00
Michal Nowak
bc802359b0 Split up changelog into per-release code blocks
LaTeX in CI and on ReadTheDocs fails to render a PDF version of ARM if
the Changelog section is included. The running theory is that the
verbatim section of more than twenty thousand lines is too big to meet
LaTeX self-imposed constraints, and it fails with:

    ! TeX capacity exceeded, sorry [main memory size=5000000].

Or it just hangs if extra_mem_bot=30000000 is set in
/etc/texmf/texmf.d/01main_memory_bump.cnf:

    ! Dimension too large.
    \fb@put@frame ...p \ifdim \dimen@ >\ht \@tempboxa

    \fb@putboxa #1\fb@afterfra...
    l.56913 \end{sphinxVerbatim}

Make each BIND 9 release a separate code block to work around the issue.
Further split up the sections for some exceptionally large releases, for
the same reason.
2024-08-08 14:52:02 +02:00
Michał Kępień
9e7cd68d9f fix: dev: Move the dst__openssl_toresult to isc_tls unit
Since the enable_fips_mode() now resides inside the isc_tls unit, BIND 9
would fail to compile when FIPS mode was enabled as the DST subsystem
logging functions were missing.

Move the crypto library logging functions from the openssl_link unit to
isc_tls unit and enhance it, so it can now be used from both places
keeping the old dst__openssl_toresult* macros alive.

Merge branch 'ondrej/move-openssl-logging-to-isc_tls-unit' into 'main'

See merge request isc-projects/bind9!9286
2024-08-08 11:01:21 +00:00
Ondřej Surý
39aef50b9b Move the dst__openssl_toresult to isc_tls unit
Since the enable_fips_mode() now resides inside the isc_tls unit, BIND 9
would fail to compile when FIPS mode was enabled as the DST subsystem
logging functions were missing.

Move the crypto library logging functions from the openssl_link unit to
isc_tls unit and enhance it, so it can now be used from both places
keeping the old dst__openssl_toresult* macros alive.
2024-08-08 11:59:41 +02:00
Evan Hunt
f202937078 new: usr: Tighten 'max-recursion-queries' and add 'max-query-restarts' option
There were cases in resolver.c when the `max-recursion-queries` quota was ineffective. It was possible to craft zones that would cause a resolver to waste resources by sending excessive queries while attempting to resolve a name. This has been addressed by correcting errors in the implementation of `max-recursion-queries`, and by reducing the default value from 100 to 32.

In addition, a new `max-query-restarts` option has been added which limits the number of times a recursive server will follow CNAME or DNAME records before terminating resolution. This was previously a hard-coded limit of 16, and now defaults to 11.
 
Closes #4741

Merge branch '4741-reclimit-restarts' into 'main'

Closes #4741

See merge request isc-projects/bind9!9281
2024-08-07 21:12:07 +00:00
Evan Hunt
0d010ddebe add +restarts and +maxqueries options to delv
max-query-restarts and max-recursion-queries values can now be set
on the command line in delv for testing purposes.
2024-08-07 13:20:05 -07:00
Evan Hunt
104f3b82fb implement 'max-query-restarts'
implement, document, and test the 'max-query-restarts' option
which specifies the query restart limit - the number of times
we can follow CNAMEs before terminating resolution.
2024-08-07 13:20:05 -07:00
Evan Hunt
7e3b425dc2 reduce the max-recursion-queries default to 32
the number of iterative queries that can be sent to resolve a
name now defaults to 32 rather than 100.
2024-08-07 13:19:57 -07:00
Evan Hunt
c5588babaf make "max_restarts" a configurable value
MAX_RESTARTS is no longer hard-coded; ns_server_setmaxrestarts()
and dns_client_setmaxrestarts() can now be used to modify the
max-restarts value at runtime. in both cases, the default is 11.
2024-08-07 13:03:08 -07:00
Evan Hunt
05d78671bb reduce MAX_RESTARTS to 11
the number of steps that can be followed in a CNAME chain
before terminating the lookup has been reduced from 16 to 11.
(this is a hard-coded value, but will be made configurable later.)
2024-08-07 13:00:42 -07:00
Evan Hunt
825f3d68c5 add debug logging when creating or attaching to a query counter
fctx_create() now logs at debug level 9 when the fctx attaches
to an existing counter or creates a new one.
2024-08-07 11:21:44 -07:00
Evan Hunt
af7db89513 apply max-recursion-queries quota to validator queries
previously, validator queries for DNSKEY and DS records were
not counted toward the quota for max-recursion-queries; they
are now.
2024-08-07 11:21:44 -07:00
Evan Hunt
d3b7e92783 attach query counter to NS fetches
there were cases in resolver.c when queries for NS records were
started without passing a pointer to the parent fetch's query counter;
as a result, the max-recursion-queries quota for those queries started
counting from zero, instead of sharing the limit for the parent fetch,
making the quota ineffective in some cases.
2024-08-07 11:21:44 -07:00
Aydın Mercan
cd92a145a3 chg: dev: use only c23 or c11 noreturn specifiers
Use `[[noreturn]]` when compiling with C23 or greater.

The attribute macro name has been capitalized as `NORETURN` as defining it as `noreturn` breaks external headers.
`#define noreturn __attribute__((noreturn))` wasn't used as C11's `stdnoreturn.h`/`_Noreturn` is required to build BIND9 in the first place.

Merge branch 'aydin/noreturn-c23' into 'main'

See merge request isc-projects/bind9!9149
2024-08-07 15:42:57 +00:00
Aydın Mercan
f58ed932d8 use only c23 or c11 noreturn specifiers
Since we require C11 or greater, we can depend on using either _Noreturn
or [[noreturn]].
2024-08-07 18:27:40 +03:00
Ondřej Surý
7f2513a5aa chg: dev: Initialize the DST subsystem implicitly
Instead of calling dst_lib_init() and dst_lib_destroy() explicitly by
all the programs, create a separate memory context for the DST subsystem
and use the library constructor and destructor to initialize the DST
internals.

Merge branch 'ondrej/move-dst_lib_init-and-destroy-to-lib-ctor-dtor' into 'main'

See merge request isc-projects/bind9!9254
2024-08-07 15:05:13 +00:00
Ondřej Surý
e6f2f2a5e6 Initialize the DST subsystem implicitly
Instead of calling dst_lib_init() and dst_lib_destroy() explicitly by
all the programs, create a separate memory context for the DST subsystem
and use the library constructor and destructor to initialize the DST
internals.
2024-08-07 17:03:27 +02:00
Ondřej Surý
ab2abfc8b0 chg: test: Use new images with TSAN-enabled libraries
The new Fedora 40 TSAN images use libuv, urcu and OpenSSL libraries compiled with ThreadSanitizer.  This (in theory) should enable better detection of memory races in those (most important) libraries.

Merge branch 'ondrej/test-new-tsan-images' into 'main'

See merge request isc-projects/bind9!9264
2024-08-07 14:28:13 +00:00
Ondřej Surý
ed766efc15 Add configure for libraries in /usr/local for the gcc:tsan job
The TSAN-enabled libraries are installed to /usr/local, pass the
PKG_CONFIG_PATH and few other options to CFLAGS to the configure
arguments.
2024-08-07 14:27:06 +00:00
Ondřej Surý
1d1bc3a148 fix: dev: Disassociate the SSL object from the cached SSL_SESSION
When the SSL object was destroyed, it would invalidate all SSL_SESSION
objects including the cached, but not yet used, TLS session objects.

Properly disassociate the SSL object from the SSL_SESSION before we
store it in the TLS session cache, so we can later destroy it without
invalidating the cached TLS sessions.

Closes #4834

Merge branch '4834-detach-SSL-from-cached-SSL_SESSION' into 'main'

Closes #4834

See merge request isc-projects/bind9!9271
2024-08-07 14:26:22 +00:00
Ondřej Surý
c11b736e44 Disassociate the SSL object from the cached SSL_SESSION
When the SSL object was destroyed, it would invalidate all SSL_SESSION
objects including the cached, but not yet used, TLS session objects.

Properly disassociate the SSL object from the SSL_SESSION before we
store it in the TLS session cache, so we can later destroy it without
invalidating the cached TLS sessions.

Co-authored-by: Ondřej Surý <ondrej@isc.org>
Co-authored-by: Artem Boldariev <artem@isc.org>
Co-authored-by: Aram Sargsyan <aram@isc.org>
2024-08-07 14:25:11 +00:00
Ondřej Surý
ee00bddf94 fix: dev: Attach/detach to the listening child socket when accepting TLS
When TLS connection (TLSstream) connection was accepted, the children
listening socket was not attached to sock->server and thus it could have
been freed before all the accepted connections were actually closed.

In turn, this would cause us to call isc_tls_free() too soon - causing
cascade errors in pending SSL_read_ex() in the accepted connections.

Properly attach and detach the children listening socket when accepting
and closing the server connections.

Closes #4833

Merge branch '4833-tlssock-needs-to-attach-to-child-tlslistener' into 'main'

Closes #4833

See merge request isc-projects/bind9!9270
2024-08-07 14:17:50 +00:00
Ondřej Surý
684f3eb8e6 Attach/detach to the listening child socket when accepting TLS
When TLS connection (TLSstream) connection was accepted, the children
listening socket was not attached to sock->server and thus it could have
been freed before all the accepted connections were actually closed.

In turn, this would cause us to call isc_tls_free() too soon - causing
cascade errors in pending SSL_read_ex() in the accepted connections.

Properly attach and detach the children listening socket when accepting
and closing the server connections.
2024-08-07 14:17:43 +00:00
Petr Špaček
ced1eb358d fix: pkg: Fix --enable-tracing build on systems without dtrace
Missing file util/dtrace.sh prevented builds on system without dtrace utility.
This has been corrected.

Fixes: #4835

Merge branch 'pspacek/gitattribute-fixes' into 'main'

Closes #4835

See merge request isc-projects/bind9!9262
2024-08-07 13:53:29 +00:00
Petr Špaček
9abedb7757 Include util/dtrace.sh in tarballs 2024-08-07 15:51:34 +02:00
Petr Špaček
50b8d9b674 Remove obsolete reference to mksymtbl.pl
This was a leftover from commit c463808992
2024-08-07 15:51:28 +02:00
Petr Špaček
5dd3c41676 fix: dev: Make hypothesis optional for system tests
Ensure that system tests can be executed without Python hypothesis
package.

Closes #4831

Merge branch '4831-isctest-make-hypothesis-optional' into 'main'

Closes #4831

See merge request isc-projects/bind9!9265
2024-08-07 10:55:21 +00:00
Nicki Křížek
e6a7695600 Make hypothesis optional for system tests
Ensure that system tests can be executed without Python hypothesis
package.
2024-08-07 10:55:06 +00:00
Mark Andrews
7facf967ac fix: usr: Dig now reports missing query section for opcode QUERY
Query responses should contain the question section with some exceptions.  Dig was not reporting this.

Closes #4808

Merge branch '4808-have-dig-report-missing-question-section-in-axfr-response' into 'main'

Closes #4808

See merge request isc-projects/bind9!9233
2024-08-07 02:20:22 +00:00
Mark Andrews
327e890910 Dig now reports a missing question section
The question section should be present in the first AXFR/IXFR
response and in other QUERY responses unless no question was sent.
Issue a warning if the question section is not present.
2024-08-07 00:49:08 +00:00
Ondřej Surý
b620b7e911 chg: usr: Remove OpenSSL 1.x Engine support
The OpenSSL 1.x Engines support has been deprecated in the OpenSSL 3.x
and is going to be removed from the upstream OpenSSL.  Remove the OpenSSL
Engine support from BIND 9 in favor of OpenSSL 3.x Providers.

Closes #4828

Merge branch '4828-remove-OpenSSL-engine-support' into 'main'

Closes #4828

See merge request isc-projects/bind9!9252
2024-08-06 14:04:56 +00:00
Ondřej Surý
cd54f9d4b9 Always use OpenSSL_version() to print OpenSSL version
OpenSSL_version() first appeared in OpenSSL 1.1.0 and have been
available since LibreSSL 2.7.1 and OpenBSD 6.3, thus we can remove the
compatibility shims with older versions that are not supported anymore.
2024-08-06 15:17:48 +02:00