]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
2 years agoRefactor findmatchingkeys and keylistfromrdataset
Matthijs Mekking [Wed, 9 Mar 2022 09:55:48 +0000 (10:55 +0100)] 
Refactor findmatchingkeys and keylistfromrdataset

Refactor dns_dnssec_findmatchingkeys and dns_dnssec_keylistfromrdataset
to take into account the key store directories in case the zone is using
dnssec-policy (kasp). Add 'kasp' and 'keystores' parameters.

This requires the keystorelist to be stored inside the zone structure.

The calls to these functions in the DNSSEC tools can use NULL as the
kasp value, as dnssec-signzone does not (yet) support dnssec-policy,
and key collision is checked inside the directory where it is created.

2 years agoAdd tests for key-store with engine_pkcs11
Matthijs Mekking [Mon, 28 Feb 2022 12:51:47 +0000 (13:51 +0100)] 
Add tests for key-store with engine_pkcs11

Add cases for each algorithm to test the interaction between
dnssec-policy and engine_pkcs11. Ensure that named creates keys on
startup.

Also test dnssec-keygen when using a dnssec-policy with a PKCS#11
based key-store.

2 years agoCreate private keys with PKCS#11 object
Matthijs Mekking [Mon, 28 Feb 2022 10:50:43 +0000 (11:50 +0100)] 
Create private keys with PKCS#11 object

If there is a keystore configured with a PKCS#11 URI, zones that
are using a dnssec-policy that uses such a keystore should create keys
via the PKCS#11 interface. Those keys are generally stored inside an
HSM.

Some changes to the code are required, to store the engine reference
into the keystore.

2 years agoAdd object parameter to dst_key_generate()
Matthijs Mekking [Wed, 30 Aug 2023 12:59:44 +0000 (14:59 +0200)] 
Add object parameter to dst_key_generate()

Add a parameter to store a possible PKCS#11 object that can later be used to
identify a key with a PKCS#11 URI string (RFC 7512).

2 years agoStore key store reference instead of name
Matthijs Mekking [Fri, 18 Feb 2022 14:03:49 +0000 (15:03 +0100)] 
Store key store reference instead of name

When creating the kasp structure, instead of storing the name of the
key store on keys, store a reference to the key store object instead.

This requires to build the keystore list prior to creating the kasp
structures, in the dnssec tools, the check code and the server code.

We will create a builtin keystore called "key-directory" which means
use the zone's key-directory as the key store.

The check code changes, because now the keystore is looked up before
creating the kasp structure (and if the keystore is not found, this
is an error). Instead of looking up the keystore after all
'dnssec-policy' clauses have been read.

2 years agoFix a checkconf bug
Matthijs Mekking [Thu, 10 Feb 2022 15:56:00 +0000 (16:56 +0100)] 
Fix a checkconf bug

The check for printing zone list failed because of these additional
lines in the output:

good.conf:22: dnssec-policy: key algorithm 13 has predefined length; \
  ignoring length value 256

I am not sure why this failure hasn't happened before already.

2 years agoCheck if key-store directory is not reused
Matthijs Mekking [Thu, 10 Feb 2022 15:51:32 +0000 (16:51 +0100)] 
Check if key-store directory is not reused

Similar to key-directory, check for zones in different views and
different key and signing policies. Zones must be using different key
directories to store key files on disk.

Now that a key directory can be linked with a dnssec-policy key, the
'keydirexist' checking needs to be reshuffled.

Add tests for bad configuration examples, named-checkconf should catch
those. Also add test cases for a mix of key-directory and key-store
directory.

2 years agoCheck if key-store directory exists
Matthijs Mekking [Wed, 9 Feb 2022 11:19:06 +0000 (12:19 +0100)] 
Check if key-store directory exists

Similar to key-directory, check if the key-store directory exists and
if it is an actual directory.

This commit fixes an accidental test bug in checkconf where if
the "warn key-dir" test failed, the result was ignored.

2 years agoCheck if key-store exists
Matthijs Mekking [Wed, 9 Feb 2022 10:19:21 +0000 (11:19 +0100)] 
Check if key-store exists

Add checkconf check to ensure that the used key-store in the keys
section exists. Error if that is not the case. We also don't allow
the special keyword 'key-directory' as that is internally used to
signal that the zone's key-directory should be used.

2 years agoParse key-store config
Matthijs Mekking [Tue, 25 Jan 2022 09:30:04 +0000 (10:30 +0100)] 
Parse key-store config

Add the code that actually stores the key-store configuration into
structures, also store the reference into the kasp key.

2 years agoAdd code for creating keystore from config
Matthijs Mekking [Tue, 25 Jan 2022 09:08:43 +0000 (10:08 +0100)] 
Add code for creating keystore from config

Add code for configuring keystore objects. Add this to the "kaspconf"
code, as it is related to 'dnssec-policy' and it is too small to create
a separate file for it.

2 years agoAdd code to store key-stores
Matthijs Mekking [Tue, 25 Jan 2022 08:25:03 +0000 (09:25 +0100)] 
Add code to store key-stores

New files to define a structure and functions for dealing with
key-stores.

2 years agoAdd configuration for key-store
Matthijs Mekking [Thu, 20 Jan 2022 13:00:27 +0000 (14:00 +0100)] 
Add configuration for key-store

Add new configuration for setting key stores. The new 'key-store'
statement allows users to configure key store backends. These can be
of type 'file' (that works the same as 'key-directory') or of type
'pkcs11'. In the latter case, keys should be stored in a HSM that is
accessible through a PKCS#11 interface.

Keys configured within 'dnssec-policy' can now also use the 'key-store'
option to set a specific key store.

Update the checkconf test to accomodate for the new configuration.

2 years agoMerge branch '4510-doc-key-lifetime-too-short' into 'main'
Matthijs Mekking [Thu, 25 Jan 2024 13:30:45 +0000 (13:30 +0000)] 
Merge branch '4510-doc-key-lifetime-too-short' into 'main'

Fix ZSK lifetime minimum constraints documentation

Closes #4510

See merge request isc-projects/bind9!8621

2 years agoAdd CHANGES for #4510
Matthijs Mekking [Thu, 4 Jan 2024 09:31:18 +0000 (10:31 +0100)] 
Add CHANGES for #4510

2 years agoFix ZSK lifetime minimum constraints documentation
Matthijs Mekking [Thu, 4 Jan 2024 09:27:26 +0000 (10:27 +0100)] 
Fix ZSK lifetime minimum constraints documentation

The ARM failed to mention that the ZSK lifetime minimum also depends
on the signing delay.

2 years agoMerge branch 'mnowak/pytest_rewrite_dialup' into 'main'
Michal Nowak [Wed, 24 Jan 2024 12:54:38 +0000 (12:54 +0000)] 
Merge branch 'mnowak/pytest_rewrite_dialup' into 'main'

Rewrite dialup system test to pytest

See merge request isc-projects/bind9!8668

2 years agoRewrite dialup system test to pytest
Michal Nowak [Tue, 23 Jan 2024 18:55:31 +0000 (19:55 +0100)] 
Rewrite dialup system test to pytest

2 years agoSpeed up test by lowering "heartbeat-interval" to 1
Michal Nowak [Tue, 23 Jan 2024 18:47:23 +0000 (19:47 +0100)] 
Speed up test by lowering "heartbeat-interval" to 1

2 years agoMerge branch '4419-add-the-ability-to-add-the-ul-edns-option-to-update-messages'...
Mark Andrews [Tue, 23 Jan 2024 01:17:02 +0000 (01:17 +0000)] 
Merge branch '4419-add-the-ability-to-add-the-ul-edns-option-to-update-messages' into 'main'

Resolve "Add the ability to add the UL EDNS option to UPDATE messages"

Closes #4419

See merge request isc-projects/bind9!8469

2 years agoAdd CHANGES note for [GL #4419]
Mark Andrews [Mon, 6 Nov 2023 16:45:54 +0000 (03:45 +1100)] 
Add CHANGES note for [GL #4419]

2 years agoAdd support to set the UL EDNS option in nsupdate
Mark Andrews [Mon, 6 Nov 2023 15:10:45 +0000 (02:10 +1100)] 
Add support to set the UL EDNS option in nsupdate

This adds a 'lease' command to nsupdate which sets the UL EDNS
option to the desired values.  The values are visible via show.

2 years agoExtend dns_message_setopt to clear the opt record
Mark Andrews [Mon, 6 Nov 2023 15:10:45 +0000 (02:10 +1100)] 
Extend dns_message_setopt to clear the opt record

Use NULL to signal that the opt record, if any, set on the
message be removed.

2 years agocheck ednsopt UL prints as expected
Mark Andrews [Tue, 14 Nov 2023 07:32:35 +0000 (18:32 +1100)] 
check ednsopt UL prints as expected

2 years agoAdd minimal EDNS UL option support
Mark Andrews [Mon, 6 Nov 2023 13:50:11 +0000 (00:50 +1100)] 
Add minimal EDNS UL option support

This is defined in draft-ietf-dnssd-update-lease.  This adds the
ability to display the option and teaches dig about the name 'UL'.

2 years agoMerge branch 'mnowak/rpz-drop-queryperf-support' into 'main'
Michal Nowak [Fri, 19 Jan 2024 11:04:13 +0000 (11:04 +0000)] 
Merge branch 'mnowak/rpz-drop-queryperf-support' into 'main'

Drop queryperf support from rpz system test

See merge request isc-projects/bind9!8649

2 years agoDrop queryperf support from rpz system test
Michal Nowak [Fri, 12 Jan 2024 16:06:19 +0000 (17:06 +0100)] 
Drop queryperf support from rpz system test

The queryperf support in the rpz system test is not utilized in the CI,
is likely not unused at all, and should be dropped.

2 years agoMerge branch '4541-values-of-ruletype-field-for-update-policy-statement' into 'main'
Mark Andrews [Fri, 19 Jan 2024 05:18:33 +0000 (05:18 +0000)] 
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

2 years agoFix rule count, should be 18
Mark Andrews [Fri, 19 Jan 2024 04:35:54 +0000 (15:35 +1100)] 
Fix rule count, should be 18

2 years agoMerge branch '4445-stop-leaking-queries-to-root-in-tests' into 'main'
Tom Krizek [Thu, 18 Jan 2024 16:21:08 +0000 (16:21 +0000)] 
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

2 years agoDelete unused config file in dnssec system test
Tom Krizek [Mon, 27 Nov 2023 16:22:19 +0000 (17:22 +0100)] 
Delete unused config file in dnssec system test

2 years agoEnsure tests use mock root server if configured
Tom Krizek [Mon, 27 Nov 2023 16:20:10 +0000 (17:20 +0100)] 
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.

2 years agoBlackhole queries to root servers in tests
Tom Krizek [Mon, 27 Nov 2023 14:39:37 +0000 (15:39 +0100)] 
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.

2 years agoDon't use root server in addzone test
Tom Krizek [Mon, 27 Nov 2023 14:18:17 +0000 (15:18 +0100)] 
Don't use root server in addzone test

2 years agoMerge branch 'tkrizek/split-up-dnsrps-test-cases' into 'main'
Tom Krizek [Thu, 18 Jan 2024 15:09:06 +0000 (15:09 +0000)] 
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

2 years agoRemove obsolete ckdnsrps.sh script
Tom Krizek [Wed, 25 Oct 2023 12:10:18 +0000 (14:10 +0200)] 
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.

2 years agoSplit up the dnsrps and native variants of rpz system tests
Tom Krizek [Tue, 24 Oct 2023 08:36:48 +0000 (10:36 +0200)] 
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.

2 years agoMerge branch '4404-add-workaround-to-force-jemalloc-linking-order' into 'main'
Ondřej Surý [Thu, 18 Jan 2024 09:20:21 +0000 (09:20 +0000)] 
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

2 years agoAdd CHANGES note for [GL #4404]
Ondřej Surý [Thu, 21 Dec 2023 10:16:29 +0000 (11:16 +0100)] 
Add CHANGES note for [GL #4404]

2 years agoLink jemalloc again for testing unit build order
Aydın Mercan [Thu, 11 Jan 2024 10:59:11 +0000 (13:59 +0300)] 
Link jemalloc again for testing unit build order

2 years agoForward declare mallocx in isc/mem.h
Aydın Mercan [Thu, 4 Jan 2024 07:40:54 +0000 (10:40 +0300)] 
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.

2 years agoAdd workaround for jemalloc linking order
Ondřej Surý [Thu, 21 Dec 2023 10:12:54 +0000 (11:12 +0100)] 
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.

2 years agoMerge branch '4527-improve-tls-framing-for-dot' into 'main'
Artem Boldariev [Wed, 17 Jan 2024 16:32:34 +0000 (16:32 +0000)] 
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

2 years agoTLS: improve framing by assembling DNS message in one buffer
Artem Boldariev [Thu, 11 Jan 2024 21:48:38 +0000 (23:48 +0200)] 
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.

2 years agoMerge branch '4425-current-level-of-tcp-clients-missing-from-statistics-channel'...
Aydın Mercan [Wed, 17 Jan 2024 08:45:11 +0000 (08:45 +0000)] 
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

2 years agoAdd CHANGES and release note for [GL #4425]
Aydın Mercan [Tue, 16 Jan 2024 11:38:21 +0000 (14:38 +0300)] 
Add CHANGES and release note for [GL #4425]

2 years agoExpose the TCP client count in statistics channel
Aydın Mercan [Tue, 2 Jan 2024 13:28:46 +0000 (16:28 +0300)] 
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.

2 years agoMerge branch '4536-remove-wrong-INSIST-fix-cipher-suites-test' into 'main'
Artem Boldariev [Tue, 16 Jan 2024 13:44:00 +0000 (13:44 +0000)] 
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

2 years agoSkipping portions of cipher-suites test in FIPS mode
Artem Boldariev [Mon, 15 Jan 2024 15:21:45 +0000 (17:21 +0200)] 
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)

2 years agoTCP: remove wrong INSIST(csock->recv_cb != NULL)
Artem Boldariev [Mon, 15 Jan 2024 15:03:50 +0000 (17:03 +0200)] 
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.

2 years agoMerge branch 'michal/set-up-version-and-release-notes-for-bind-9.19.22' into 'main'
Michał Kępień [Mon, 15 Jan 2024 14:41:19 +0000 (14:41 +0000)] 
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

2 years agoReduce duplication between checklists
Michał Kępień [Mon, 15 Jan 2024 14:39:46 +0000 (15:39 +0100)] 
Reduce duplication between checklists

2 years agoAccount for February 2024 releases in CHANGES
Michał Kępień [Mon, 15 Jan 2024 14:39:46 +0000 (15:39 +0100)] 
Account for February 2024 releases in CHANGES

2 years agoSet up release notes for BIND 9.19.22
Michał Kępień [Mon, 15 Jan 2024 14:39:46 +0000 (15:39 +0100)] 
Set up release notes for BIND 9.19.22

2 years agoUpdate BIND version to 9.19.22-dev
Michał Kępień [Mon, 15 Jan 2024 14:39:46 +0000 (15:39 +0100)] 
Update BIND version to 9.19.22-dev

2 years agoMerge branch '4528-honor-listen-on-changes-logic-fixup' into 'main'
Artem Boldariev [Mon, 15 Jan 2024 10:25:16 +0000 (10:25 +0000)] 
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

2 years agoFix flawed logic when detecting same listener type
Artem Boldariev [Fri, 12 Jan 2024 15:50:12 +0000 (17:50 +0200)] 
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).

2 years agoMerge branch '4520-log-message-in-lib-ns-update-c-needs-updating' into 'main'
Mark Andrews [Fri, 12 Jan 2024 14:53:39 +0000 (14:53 +0000)] 
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

2 years agoReport the type being filtered from an UPDATE
Mark Andrews [Fri, 5 Jan 2024 00:08:33 +0000 (11:08 +1100)] 
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.

2 years agoMerge branch '4528-honor-listen-on-changes' into 'main'
Artem Boldariev [Fri, 12 Jan 2024 13:48:39 +0000 (13:48 +0000)] 
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

2 years agoUpdate release notes [GL #4518] [GL #4528]
Artem Boldariev [Thu, 11 Jan 2024 14:39:59 +0000 (16:39 +0200)] 
Update release notes [GL #4518] [GL #4528]

Mentioned that all changes to listen-on statements are now applied on
reconfiguration.

2 years agoUpdate CHANGES [GL #4518] [GL #4528]
Artem Boldariev [Thu, 11 Jan 2024 14:30:17 +0000 (16:30 +0200)] 
Update CHANGES [GL #4518] [GL #4528]

Mentioned that all changes to listen-on statements are now applied on
reconfiguration.

2 years agoAdd a system test to verify listener transport change functionality
Artem Boldariev [Wed, 10 Jan 2024 17:24:46 +0000 (19:24 +0200)] 
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.

2 years agoRecreate listeners on DNS transport change
Artem Boldariev [Tue, 9 Jan 2024 17:16:26 +0000 (19:16 +0200)] 
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.

2 years agoMerge branch '3504-tls-cipher-suites' into 'main'
Artem Boldariev [Fri, 12 Jan 2024 12:35:21 +0000 (12:35 +0000)] 
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

2 years agoUpdate the release notes [GL #3504]
Artem Boldariev [Thu, 14 Dec 2023 13:57:55 +0000 (15:57 +0200)] 
Update the release notes [GL #3504]

Mention that the 'tls' block was extended with a new 'cipher-suites'
option.

2 years agoUpdate CHANGES [GL #3504]
Artem Boldariev [Thu, 14 Dec 2023 13:34:30 +0000 (15:34 +0200)] 
Update CHANGES [GL #3504]

Mention that the 'tls' block was extended with a new 'cipher-suites'
option.

2 years agoUpdate the options reference to document 'cipher-suites'
Artem Boldariev [Wed, 13 Dec 2023 16:14:32 +0000 (18:14 +0200)] 
Update the options reference to document 'cipher-suites'

This commit documents the new 'cipher-suites' options of the 'tls'
statement.

2 years agoUpdate the documentation for the 'ciphers' option
Artem Boldariev [Wed, 13 Dec 2023 15:29:47 +0000 (17:29 +0200)] 
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.

2 years agoAdd TLS 'cipher-suites' checkconf test
Artem Boldariev [Tue, 12 Dec 2023 16:37:30 +0000 (18:37 +0200)] 
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.

2 years agoAdd a 'cipher-suites' option system test
Artem Boldariev [Fri, 1 Dec 2023 19:11:22 +0000 (21:11 +0200)] 
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).

2 years agoIntegrate TLS cipher suites support into BIND
Artem Boldariev [Thu, 30 Nov 2023 20:26:53 +0000 (22:26 +0200)] 
Integrate TLS cipher suites support into BIND

This commit makes BIND use the new 'cipher-suites' option from the
'tls' statement.

2 years agoAdd TLS cipher suites configuration option to BIND
Artem Boldariev [Thu, 30 Nov 2023 19:35:20 +0000 (21:35 +0200)] 
Add TLS cipher suites configuration option to BIND

This commit extends the 'tls' statement with 'cipher-suites' option.

2 years agoAdd TLS cipher-suites related low-level functionality
Artem Boldariev [Thu, 30 Nov 2023 18:57:07 +0000 (20:57 +0200)] 
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.

2 years agoMerge branch '4508-crash-in-host' into 'main'
Arаm Sаrgsyаn [Thu, 11 Jan 2024 09:54:01 +0000 (09:54 +0000)] 
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

2 years agoAdd a CHANGES note for [GL #4508]
Aram Sargsyan [Tue, 9 Jan 2024 12:01:14 +0000 (12:01 +0000)] 
Add a CHANGES note for [GL #4508]

2 years agoPrint a dig comment about the failed query consistently
Aram Sargsyan [Tue, 9 Jan 2024 11:51:34 +0000 (11:51 +0000)] 
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.

2 years agoFix a possible dig/host crash in "NS search" mode
Aram Sargsyan [Tue, 9 Jan 2024 11:35:11 +0000 (11:35 +0000)] 
Fix a possible dig/host crash in "NS search" mode

When getting a SERVFAIL reply from a query, 'host' tries to start
the next query in the lookup's list (also true for 'dig  +nofail').
However, when running with the '-C' switch (or +nssearch for 'dig'),
all the queries in the lookup start from the beginning, so that logic
brings to a crash because of the attempted start of the query which
was already started.

Don't start the next query in the affected code path when in +nssearch
mode.

2 years agoMerge branch '4501-defer-control-channel-message-invalidation' into 'main'
Mark Andrews [Wed, 10 Jan 2024 21:52:03 +0000 (21:52 +0000)] 
Merge branch '4501-defer-control-channel-message-invalidation' into 'main'

Defer control channel message invalidation

Closes #4501

See merge request isc-projects/bind9!8641

2 years agoDefer control channel message invalidation
Mark Andrews [Wed, 10 Jan 2024 03:35:36 +0000 (14:35 +1100)] 
Defer control channel message invalidation

The conn_shutdown() function is called whenever a control channel
connection is supposed to be closed, e.g. after a response to the client
is sent or when named is being shut down.  That function calls
isccc_ccmsg_invalidate(), which resets the magic number in the structure
holding the messages exchanged over a given control channel connection
(isccc_ccmsg_t).  The expectation here is that all operations related to
the given control channel connection will have been completed by the
time the connection needs to be shut down.

However, if named shutdown is initiated while a control channel message
is still in flight, some netmgr callbacks might still be pending when
conn_shutdown() is called and isccc_ccmsg_t invalidated.  This causes
the REQUIRE assertion checking the magic number in ccmsg_senddone() to
fail when the latter function is eventually called, resulting in a
crash.

Fix by splitting up isccc_ccmsg_invalidate() into two separate
functions:

  - isccc_ccmsg_disconnect(), which initiates TCP connection shutdown,
  - isccc_ccmsg_invalidate(), which cleans up magic number and buffer,

and then:

  - replacing all existing uses of isccc_ccmsg_invalidate() with calls
    to isccc_ccmsg_disconnect(),

  - only calling isccc_ccmsg_invalidate() when all netmgr callbacks are
    guaranteed to have been run.

Adjust function comments accordingly.

2 years agoMerge branch '3535-fetchlimit-test-flaky' into 'main'
Tom Krizek [Wed, 10 Jan 2024 14:44:05 +0000 (14:44 +0000)] 
Merge branch '3535-fetchlimit-test-flaky' into 'main'

Allow the fetchlimit test to be re-run

Closes #3535

See merge request isc-projects/bind9!8612

2 years agoAllow the fetchlimit test to be re-run
Tom Krizek [Fri, 22 Dec 2023 14:58:27 +0000 (15:58 +0100)] 
Allow the fetchlimit test to be re-run

The test is known to be unstable due to timing issues. Prevent frequent
false positives by allowing the test to be re-run by the flaky pytest
plugin.

2 years agoDon't type-check the flaky plugin with mypy
Tom Krizek [Fri, 22 Dec 2023 15:11:21 +0000 (16:11 +0100)] 
Don't type-check the flaky plugin with mypy

Since we execute mypy for bin/tests/system/isctest package, this is now
needed because the flaky package doesn't have type hints.

2 years agoMove custom pytest markers into isctest module
Tom Krizek [Fri, 22 Dec 2023 14:56:58 +0000 (15:56 +0100)] 
Move custom pytest markers into isctest module

Keep our pytest code more organized by moving the shared code for custom
pytest markers into a dedicated isctest/mark.py module.

2 years agoMerge branch 'tkrizek/nsupdate-test-flaky-on-freebsd' into 'main'
Tom Krizek [Wed, 10 Jan 2024 13:43:08 +0000 (13:43 +0000)] 
Merge branch 'tkrizek/nsupdate-test-flaky-on-freebsd' into 'main'

Allow nsupdate test rerun on FreeBSD

See merge request isc-projects/bind9!8638

2 years agoAllow nsupdate test rerun on FreeBSD
Tom Krizek [Wed, 10 Jan 2024 09:53:18 +0000 (10:53 +0100)] 
Allow nsupdate test rerun on FreeBSD

The "exceeded time limit waiting for literal 'too many DNS UPDATEs
queued' in ns1/named.run" is prone to fail due to a timing issue.
Despite out efforts to stabilize it, the check still often fails on
FreeBSD in our CI. Allow the test to be re-run on this platform.

2 years agoMerge branch '4522-dig-in-9-19-19-accept-weird-source-and-destination-ports-within...
Mark Andrews [Wed, 10 Jan 2024 00:05:24 +0000 (00:05 +0000)] 
Merge branch '4522-dig-in-9-19-19-accept-weird-source-and-destination-ports-within-the-proxy-statement' into 'main'

Resolve "Dig in 9.19.19 accept weird source- and destination-ports within the "proxy"-statement"

Closes #4522

See merge request isc-projects/bind9!8626

2 years agoError if proxy ports are too big
Mark Andrews [Mon, 8 Jan 2024 02:03:58 +0000 (13:03 +1100)] 
Error if proxy ports are too big

2 years agoMerge branch 'aram/tests-dighost-fix-intermittent-failure' into 'main'
Arаm Sаrgsyаn [Tue, 9 Jan 2024 14:33:22 +0000 (14:33 +0000)] 
Merge branch 'aram/tests-dighost-fix-intermittent-failure' into 'main'

Make digdelv test work in different network envs (continued)

See merge request isc-projects/bind9!8636

2 years agoMake digdelv test work in different network envs (continued)
Aram Sargsyan [Tue, 9 Jan 2024 13:29:32 +0000 (13:29 +0000)] 
Make digdelv test work in different network envs (continued)

This commit complements the 1e7d832342aa2aaaeb8ef1710ec095dfcade4c6d
commit.

2 years agoMerge branch 'tkrizek/xfer-test-dnssec-validation-no' into 'main'
Tom Krizek [Mon, 8 Jan 2024 18:49:17 +0000 (18:49 +0000)] 
Merge branch 'tkrizek/xfer-test-dnssec-validation-no' into 'main'

Add missing dnssec-validation to ns4 in xfer test

See merge request isc-projects/bind9!8630

2 years agoAdd missing dnssec-validation to ns4 in xfer test
Tom Krizek [Mon, 8 Jan 2024 17:30:47 +0000 (18:30 +0100)] 
Add missing dnssec-validation to ns4 in xfer test

This file was missing explicit dnssec-validation. Seems like it was
missed in our previous efforts, probably because of the different
filename / extension. Rename it to end with *.in to reflect that it is a
template file used by copy_setports.

2 years agoMerge branch '4521-timeout-in-dig-not-handled-in-rndc-system-test' into 'main'
Tom Krizek [Mon, 8 Jan 2024 17:39:03 +0000 (17:39 +0000)] 
Merge branch '4521-timeout-in-dig-not-handled-in-rndc-system-test' into 'main'

Resolve "Timeout in dig not handled in system tests"

Closes #4521

See merge request isc-projects/bind9!8623

2 years agoHandle dig timing out gracefully in upforwd
Tom Krizek [Fri, 5 Jan 2024 14:14:26 +0000 (15:14 +0100)] 
Handle dig timing out gracefully in upforwd

2 years agoHandle dig timing out gracefully in staticstub
Tom Krizek [Fri, 5 Jan 2024 14:13:56 +0000 (15:13 +0100)] 
Handle dig timing out gracefully in staticstub

2 years agoHandle dig timing out gracefully in sortlist
Tom Krizek [Fri, 5 Jan 2024 14:13:34 +0000 (15:13 +0100)] 
Handle dig timing out gracefully in sortlist

2 years agoHandle dig timing out gracefully in rpz
Tom Krizek [Fri, 5 Jan 2024 14:13:12 +0000 (15:13 +0100)] 
Handle dig timing out gracefully in rpz

2 years agoHandle dig timing out gracefully in rootkeysentinel
Tom Krizek [Fri, 5 Jan 2024 14:12:30 +0000 (15:12 +0100)] 
Handle dig timing out gracefully in rootkeysentinel

2 years agoHandle dig timing out gracefully in qmin
Tom Krizek [Fri, 5 Jan 2024 14:11:39 +0000 (15:11 +0100)] 
Handle dig timing out gracefully in qmin

2 years agoHandle dig timing out gracefully in padding
Tom Krizek [Fri, 5 Jan 2024 14:11:10 +0000 (15:11 +0100)] 
Handle dig timing out gracefully in padding