Commit Graph

40561 Commits

Author SHA1 Message Date
Mark Andrews
a60a259180 Merge branch '4541-values-of-ruletype-field-for-update-policy-statement' into 'main'
Resolve "values of ruletype field for update-policy statement"

Closes #4541

See merge request isc-projects/bind9!8663
2024-01-19 05:18:33 +00:00
Mark Andrews
81f9bcefaf Fix rule count, should be 18 2024-01-19 15:35:54 +11:00
Tom Krizek
64b8ab0845 Merge branch '4445-stop-leaking-queries-to-root-in-tests' into 'main'
Ensure no test queries leak to root server

Closes #4445

See merge request isc-projects/bind9!8521
2024-01-18 16:21:08 +00:00
Tom Krizek
f69df830c6 Delete unused config file in dnssec system test 2024-01-18 17:19:39 +01:00
Tom Krizek
088fcf9a61 Ensure tests use mock root server if configured
These tests have ns1 configured as a mock root server. Make sure it is
used in all config files of those tests, otherwise some queries could
leak to root nameservers.
2024-01-18 17:19:39 +01:00
Tom Krizek
8434e5abfc Blackhole queries to root servers in tests
Some tests don't have a mock root server configured, because they don't
need one. However, these tests might still leak queries to actual name
servers. Add a shared root hints file which can serve as a blackhole for
these queries.
2024-01-18 17:19:39 +01:00
Tom Krizek
7037eb96d4 Don't use root server in addzone test 2024-01-18 17:19:37 +01:00
Tom Krizek
19ccf59eeb Merge branch 'tkrizek/split-up-dnsrps-test-cases' into 'main'
Split up the dnsrps and native variants of rpz system tests

See merge request isc-projects/bind9!8420
2024-01-18 15:09:06 +00:00
Tom Krizek
b1d71c4d26 Remove obsolete ckdnsrps.sh script
As dnsrps and native test cases have been properly split up, the
ckdnsrps.sh script is no longer used anywhere, as the logic for
selecting these test cases is handled by pytest.
2024-01-18 15:28:28 +01:00
Tom Krizek
cb55fb2cae Split up the dnsrps and native variants of rpz system tests
Previously, dnsrps test was executed as an optional part of the rpz and
rpzrecurse system tests. This was conceptually problematic, as the test
took the responsibility of running parts of the test framework -
cleaning files and setting up servers again.

Instead, allow these tests to execute either the native variant, or the
dnsrps one. To ensure the same test coverage, trigger both of these
variants as separate test cases from pytest.
2024-01-18 15:28:28 +01:00
Ondřej Surý
1fb6e5cb97 Merge branch '4404-add-workaround-to-force-jemalloc-linking-order' into 'main'
Add workaround for jemalloc linking order

Closes #4404

See merge request isc-projects/bind9!8609
2024-01-18 09:20:21 +00:00
Ondřej Surý
ec12682933 Add CHANGES note for [GL #4404] 2024-01-18 09:35:10 +01:00
Aydın Mercan
6215206801 Link jemalloc again for testing unit build order 2024-01-18 09:34:36 +01:00
Aydın Mercan
197de93bdc Forward declare mallocx in isc/mem.h
cmocka.h and jemalloc.h/malloc_np.h has conflicting macro definitions.
While fixing them with push_macro for only malloc is done below, we only
need the non-standard mallocx interface which is easy to just define by
ourselves.
2024-01-18 09:34:36 +01:00
Ondřej Surý
41a0ee1071 Add workaround for jemalloc linking order
Because we don't use jemalloc functions directly, but only via the
libisc library, the dynamic linker might pull the jemalloc library
too late when memory has been already allocated via standard libc
allocator.

Add a workaround round isc_mem_create() that makes the dynamic linker
to pull jemalloc earlier than libc.
2024-01-18 09:34:36 +01:00
Artem Boldariev
2ff908026d Merge branch '4527-improve-tls-framing-for-dot' into 'main'
TLS: improve framing by assembling DNS message in one buffer

Closes #4527

See merge request isc-projects/bind9!8646
2024-01-17 16:32:34 +00:00
Artem Boldariev
20d5a805e2 TLS: improve framing by assembling DNS message in one buffer
This commit improves TLS messages framing by avoiding an extra call to
SSL_write_ex(). Before that we would use an extra SSL_write_ex() call
to pass DNS message length to OpenSSL. That could create an extra TLS
frame, increasing number of bytes sent due to frame header and
padding.

This commit fixes that by making the code pass both DNS message length
and data at once, just like old TLS code did.

It should improve compatibility with some buggy clients that expect
both DNS message length and data to be in one TLS frame.

Older TLS DNS code worked like this, too.
2024-01-17 17:09:41 +02:00
Aydın Mercan
5670d8e11c Merge branch '4425-current-level-of-tcp-clients-missing-from-statistics-channel' into 'main'
Expose the TCP client count in statistics channel

Closes #4425

See merge request isc-projects/bind9!8616
2024-01-17 08:45:11 +00:00
Aydın Mercan
cc2713700a Add CHANGES and release note for [GL #4425] 2024-01-17 11:11:12 +03:00
Aydın Mercan
2690dc48d3 Expose the TCP client count in statistics channel
The statistics channel does not expose the current number of TCP clients
connected, only the highwater. Therefore, users did not have an easy
means to collect statistics about TCP clients served over time. This
information could only be measured as a seperate mechanism via rndc by
looking at the TCP quota filled.

In order to expose the exact current count of connected TCP clients
(tracked by the "tcp-clients" quota) as a statistics counter, an
extra, dedicated Network Manager callback would need to be
implemented for that purpose (a counterpart of ns__client_tcpconn()
that would be run when a TCP connection is torn down), which is
inefficient. Instead, track the number of currently-connected TCP
clients separately for IPv4 and IPv6, as Network Manager statistics.
2024-01-17 11:11:12 +03:00
Artem Boldariev
8ce0956117 Merge branch '4536-remove-wrong-INSIST-fix-cipher-suites-test' into 'main'
TCP: remove wrong INSIST(csock->recv_cb != NULL), disable the "cipher-suites" test in FIPS mode

Closes #4536

See merge request isc-projects/bind9!8655
2024-01-16 13:44:00 +00:00
Artem Boldariev
dbcdd868f9 Skipping portions of cipher-suites test in FIPS mode
We need to skip some portions the system test in FIPS mode as some of
the algorithms used in the test are not available when using the FIPS
mode (e.g. TLS_CHACHA20_POLY1305_SHA256)
2024-01-16 15:01:39 +02:00
Artem Boldariev
dffb11f2c0 TCP: remove wrong INSIST(csock->recv_cb != NULL)
This commit removes wrong INSIST() condition as the assumption that if
'csock->recv_cb != NULL' iff 'csock->statichandle != NULL' is wrong.

There is no direct relation between 'csock->statichandle' and
'csock->recv_cb', as 'csock->statichandle' gets set when allocating a
handle regardless of 'csock->recv_cb' not being NULL, as it is
possible to attach to the handle without starting a read operation (at
the very least, it is correct to start writing before reading).

That condition made `cipher-suites` system test fail with crash on
some platforms in FIPS mode (namely, Oracle Linux 9) despite not being
related to FIPS at all.
2024-01-16 15:01:26 +02:00
Michał Kępień
84e7e5d5df Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.19.22' into 'main'
Set up version and release notes for BIND 9.19.22

See merge request isc-projects/bind9!8651
2024-01-15 14:41:19 +00:00
Michał Kępień
c5eae03d0c Reduce duplication between checklists 2024-01-15 15:39:46 +01:00
Michał Kępień
a298880d8f Account for February 2024 releases in CHANGES 2024-01-15 15:39:46 +01:00
Michał Kępień
69ca33314e Set up release notes for BIND 9.19.22 2024-01-15 15:39:46 +01:00
Michał Kępień
055802e77e Update BIND version to 9.19.22-dev 2024-01-15 15:39:46 +01:00
Artem Boldariev
4245e8e72a Merge branch '4528-honor-listen-on-changes-logic-fixup' into 'main'
Fix flawed logic when detecting same listener type

See merge request isc-projects/bind9!8648
2024-01-15 10:25:16 +00:00
Artem Boldariev
8ae661048d Fix flawed logic when detecting same listener type
The older version of the code was reporting that listeners are going
to be of the same type after reconfiguration when switching from DoT
to HTTPS listener, making BIND abort its executions.

That was happening due to the flaw in logic due to which the code
could consider a current listener and a configuration for the new one
to be of the same type (DoT) even when the new listener entry is
explicitly marked as HTTP.

The checks for PROXY in between the configuration were masking that
behaviour, but when porting it to 9.18 (when there is no PROXY
support), the behaviour was exposed.

Now the code mirrors the logic in 'interface_setup()' closely (as it
was meant to).
2024-01-12 17:59:53 +02:00
Mark Andrews
1f9f8fc568 Merge branch '4520-log-message-in-lib-ns-update-c-needs-updating' into 'main'
Resolve "Log message in lib/ns/update.c needs updating"

Closes #4520

See merge request isc-projects/bind9!8622
2024-01-12 14:53:39 +00:00
Mark Andrews
2cf6cf967d Report the type being filtered from an UPDATE
When processing UPDATE request DNSKEY, CDNSKEY and CDS record that
are managed by named are filtered out.  The log message has been
updated to report the actual type rather that just DNSKEY.
2024-01-12 14:06:58 +00:00
Artem Boldariev
b75ba71f33 Merge branch '4528-honor-listen-on-changes' into 'main'
Recreate listeners on DNS transport change when editing listen-on statements before reconfiguration

Closes #4528 and #4518

See merge request isc-projects/bind9!8644
2024-01-12 13:48:39 +00:00
Artem Boldariev
ad5378fad7 Update release notes [GL #4518] [GL #4528]
Mentioned that all changes to listen-on statements are now applied on
reconfiguration.
2024-01-12 14:56:14 +02:00
Artem Boldariev
d1a2ad0f44 Update CHANGES [GL #4518] [GL #4528]
Mentioned that all changes to listen-on statements are now applied on
reconfiguration.
2024-01-12 14:56:00 +02:00
Artem Boldariev
211f12ff85 Add a system test to verify listener transport change functionality
This commit adds a system test that helps to verify that changing a
listener transport by editing "listen-on" statements before
reconfiguration works as expected.
2024-01-12 14:55:12 +02:00
Artem Boldariev
d59cf5e0ce Recreate listeners on DNS transport change
This commit ensures that listeners are recreated on reconfiguration in
the case when their type changes (or when PROXY protocol type changes,
too).

Previously, if a "listen-on" statement was modified to represent a
different transport, BIND would not pick-up the change on
reconfiguration if listener type changes (e.g. DoH -> DoT) for a given
interface address and port combination. This commit fixes that by
recreating the listener.

Initially, that worked for most of the new transports as we would
recreate listeners on each reconfiguration for DoH and DoT. But at
some point we changed that in such a way that listeners were not
recreated to avoid rebinding a port as on some platforms only root can
do that for port numbers <1000, making some ports binding possible
only on start-up. We chose to asynchronously update listener socket
settings (like TLS contexts, HTTP settings) instead.

Now, we both avoid recreating the sockets if unnecessary and recreate
listeners when listener type changes.
2024-01-12 14:55:12 +02:00
Artem Boldariev
fa2b8b0adf Merge branch '3504-tls-cipher-suites' into 'main'
Add "cipher-suites" option to the "tls" block

Closes #3504

See merge request isc-projects/bind9!8576
2024-01-12 12:35:21 +00:00
Artem Boldariev
59a57451e6 Update the release notes [GL #3504]
Mention that the 'tls' block was extended with a new 'cipher-suites'
option.
2024-01-12 13:29:14 +02:00
Artem Boldariev
ac55d818c2 Update CHANGES [GL #3504]
Mention that the 'tls' block was extended with a new 'cipher-suites'
option.
2024-01-12 13:28:53 +02:00
Artem Boldariev
0867e2ea30 Update the options reference to document 'cipher-suites'
This commit documents the new 'cipher-suites' options of the 'tls'
statement.
2024-01-12 13:27:59 +02:00
Artem Boldariev
3b2b170c0e Update the documentation for the 'ciphers' option
We need to mention that the 'ciphers' option works only for TLSv1.2
because that is known to cause confusion for some of our users.
2024-01-12 13:27:59 +02:00
Artem Boldariev
ed546007c9 Add TLS 'cipher-suites' checkconf test
This commit adds a set of valid and invalid configuration files
samples that use the new 'cipher-suites' option of the 'tls'
statement.
2024-01-12 13:27:59 +02:00
Artem Boldariev
53f53e9b02 Add a 'cipher-suites' option system test
This commit adds a new system test which verifies that using the
'cipher-suites' option actually works as expected (as well as adds
first TLSv1.3 specific tests).
2024-01-12 13:27:59 +02:00
Artem Boldariev
eb924e460b Integrate TLS cipher suites support into BIND
This commit makes BIND use the new 'cipher-suites' option from the
'tls' statement.
2024-01-12 13:27:59 +02:00
Artem Boldariev
3818c58bf6 Add TLS cipher suites configuration option to BIND
This commit extends the 'tls' statement with 'cipher-suites' option.
2024-01-12 13:27:59 +02:00
Artem Boldariev
9d052522a0 Add TLS cipher-suites related low-level functionality
This commits adds low-level wrappers on top of
'SSL_CTX_set_ciphersuites()'. These are going to be a foundation
behind the 'cipher-suites' option of the 'tls' statement.
2024-01-12 13:27:59 +02:00
Arаm Sаrgsyаn
a6fb918454 Merge branch '4508-crash-in-host' into 'main'
Fix a possible dig/host crash in "NS search" mode

Closes #4508

See merge request isc-projects/bind9!8635
2024-01-11 09:54:01 +00:00
Aram Sargsyan
1246d982a2 Add a CHANGES note for [GL #4508] 2024-01-10 21:54:39 +00:00
Aram Sargsyan
913b20abf8 Print a dig comment about the failed query consistently
Dig failed to print a comment about the reason of the unacceptable
query reply got from a server when there was no other query to
start in the lookup's chain.

Add an "else" block to print out the comment even when not starting
up the next query.
2024-01-10 21:54:39 +00:00