]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
2 years agoMerge branch '4551-dnssec-keygen-does-not-generate-tsig-keys' into 'main'
Matthijs Mekking [Thu, 1 Feb 2024 10:53:41 +0000 (10:53 +0000)] 
Merge branch '4551-dnssec-keygen-does-not-generate-tsig-keys' into 'main'

dnssec-keygen man page still says it can do TSIG

Closes #4551

See merge request isc-projects/bind9!8678

2 years agoPut reference to RFC 2845 in tsig-keygen man page
Matthijs Mekking [Thu, 1 Feb 2024 10:20:33 +0000 (11:20 +0100)] 
Put reference to RFC 2845 in tsig-keygen man page

2 years agodnssec-keygen man page still says it can do TSIG
Matthijs Mekking [Wed, 31 Jan 2024 08:33:17 +0000 (09:33 +0100)] 
dnssec-keygen man page still says it can do TSIG

Remove text in man page that says the program can also be used for
generate TSIG keys, this was removed in 9.13.0 but this text was still
not yet removed.

2 years agoMerge branch '362-check-fetch-quota-param' into 'main'
Evan Hunt [Thu, 1 Feb 2024 02:54:02 +0000 (02:54 +0000)] 
Merge branch '362-check-fetch-quota-param' into 'main'

check range of fetch-quota-param parameters

Closes #362

See merge request isc-projects/bind9!8444

2 years agoCHANGES for [GL #362]
Evan Hunt [Tue, 31 Oct 2023 10:25:37 +0000 (11:25 +0100)] 
CHANGES for [GL #362]

2 years agocheck range of fetch-quota-param parameters
Evan Hunt [Tue, 31 Oct 2023 10:21:33 +0000 (11:21 +0100)] 
check range of fetch-quota-param parameters

the 'low', 'high' and 'discount' parameters to 'fetch-quota-param'
are meant to be ratios with values between zero and one, but higher
values can be assigned. this could potentially lead to an assertion
in maybe_adjust_quota().

2 years agoAdd a CHANGES entry
Michał Kępień [Wed, 31 Jan 2024 10:52:19 +0000 (11:52 +0100)] 
Add a CHANGES entry

2 years agofix another message parsing regression
Aram Sargsyan [Fri, 19 Jan 2024 14:26:17 +0000 (14:26 +0000)] 
fix another message parsing regression

The fix for CVE-2023-4408 introduced a regression in the message
parser, which could cause a crash if an rdata type that can only
occur in the question was found in another section.

Use 'dns__message_putassociatedrdataset()' instead of
'dns__message_puttemprdataset()', because after calling the
'dns_rdatalist_tordataset()' function earlier the 'rdataset'
is associated.

2 years agofix a message parsing regression
Evan Hunt [Tue, 16 Jan 2024 23:58:53 +0000 (15:58 -0800)] 
fix a message parsing regression

the fix for CVE-2023-4408 introduced a regression in the message
parser, which could cause a crash if duplicate rdatasets were found
in the question section. this commit ensures that rdatasets are
correctly disassociated and freed when this occurs.

2 years agoMerge branch 'michal/shift-CHANGES-entries' into 'main'
Michał Kępień [Wed, 31 Jan 2024 10:19:29 +0000 (10:19 +0000)] 
Merge branch 'michal/shift-CHANGES-entries' into 'main'

Shift CHANGES entries by two

See merge request isc-projects/bind9!8679

2 years agoShift CHANGES entries by two
Michał Kępień [Wed, 31 Jan 2024 10:11:11 +0000 (11:11 +0100)] 
Shift CHANGES entries by two

Account for additional entries that will be included in February 2024
releases.

2 years agoMerge branch 'matthijs-fix-kasp-test' into 'main'
Matthijs Mekking [Mon, 29 Jan 2024 08:46:57 +0000 (08:46 +0000)] 
Merge branch 'matthijs-fix-kasp-test' into 'main'

Make max search depth variable in kasp system test

See merge request isc-projects/bind9!8674

2 years agoMake max search depth variable in kasp system test
Matthijs Mekking [Fri, 26 Jan 2024 10:57:25 +0000 (11:57 +0100)] 
Make max search depth variable in kasp system test

In the second test we are looking for key files and extract the key
id numbers. Because keys can be in different directories, we needed
to change the maxdepth when searching for keys.

For the second kasp system test, check that 'dnssec-keygen -k' (default
policy) creates valid files, the 'get_keyids' returned more than one
keytag, namely the ones that are inside the keys/ directory, that were
created for the predecessor test, check that 'dnssec-keygen -k'
(configuredd policy) creates valid files.

This caused the system test to spew out errors that key files were
missing (we were looking for key files in the current directory, but
when looking for key id numbers we included the keys/ directory). It
could also cause the next test to fail, check that 'dnssec-settime' by
default does not edit key state file, because the STATE_FILE environment
variable was overwritten with the key file path of one of the keys that
were created with the configured policy.

We fix this by adjusting the maxdepth for the test in question. Other
tests don't need adjusting because they use unique zone names.

2 years agoMerge branch 'mnowak/drop-freebsd-12' into 'main'
Michal Nowak [Fri, 26 Jan 2024 09:44:17 +0000 (09:44 +0000)] 
Merge branch 'mnowak/drop-freebsd-12' into 'main'

Drop FreeBSD 12

See merge request isc-projects/bind9!8670

2 years agoDrop FreeBSD 12
Michal Nowak [Thu, 25 Jan 2024 12:46:57 +0000 (13:46 +0100)] 
Drop FreeBSD 12

Support for FreeBSD 12.4, the last FreeBSD 12.x release, ended on
December 31, 2023.

Link: https://www.freebsd.org/security/unsupported/
Move the --with-readline=editline ./configure option to FreeBSD 14.

2 years agoMerge branch '1129-hsm-kasp' into 'main'
Matthijs Mekking [Thu, 25 Jan 2024 16:31:59 +0000 (16:31 +0000)] 
Merge branch '1129-hsm-kasp' into 'main'

HSM support for dnssec-policy

Closes #1129

See merge request isc-projects/bind9!5924

2 years agoReplace keystore attach/detach with ISC_REFCOUNT_IMPL/ISC_REFCOUNT_DECL
Matthijs Mekking [Wed, 3 Jan 2024 15:24:53 +0000 (16:24 +0100)] 
Replace keystore attach/detach with ISC_REFCOUNT_IMPL/ISC_REFCOUNT_DECL

This is now the default way to implement attaching to/detaching from
a pointer.

Also update cfg_keystore_fromconfig() to allow NULL value for the
keystore pointer. In most cases we detach it immediately after the
function call.

2 years agoUpdate pkcs11 documentation
Matthijs Mekking [Mon, 27 Nov 2023 10:54:35 +0000 (11:54 +0100)] 
Update pkcs11 documentation

Update the minimum required version of pkcs11-provider that contains the
fixes needed in order to make it work with dnssec-policy.

Update documentation to not recommend using engine_pkcs11 in conjunction
with dnssec-policy.

2 years agoRefactor dns_keystore_directory()
Matthijs Mekking [Fri, 17 Nov 2023 16:09:00 +0000 (17:09 +0100)] 
Refactor dns_keystore_directory()

Add a default key-directory parameter to the function that can
be returned if there is no keystore, or if the keystore directory
is NULL (the latter is also true for the built-in keystore).

2 years agoRename "uri" to "pkcs11-uri"
Matthijs Mekking [Fri, 17 Nov 2023 15:28:01 +0000 (16:28 +0100)] 
Rename "uri" to "pkcs11-uri"

The name "uri" was considered to be too generic and could potentially
clash with a future URI configuration option. Renamed to "pkcs11-uri".

Note that this option name was also preferred over "pkcs11uri", the
dash is considered to be the more clearer form.

2 years agoAdd test case with special characters in zone name
Matthijs Mekking [Fri, 17 Nov 2023 09:55:00 +0000 (10:55 +0100)] 
Add test case with special characters in zone name

Add a zone to the system test that has special characters to
ensure it does not mess up PKCS#11 labels when creating keys.

2 years agoBetter PKCS#11 label creation
Matthijs Mekking [Fri, 17 Nov 2023 09:45:05 +0000 (10:45 +0100)] 
Better PKCS#11 label creation

When using the same PKCS#11 URI for a zone that uses different
DNSSEC policies, the PKCS#11 label could collide, i.e. the same
label could be used for different keys. Add the policy name to
the label to make it more unique.

Also, the zone name could contain characters that are interpreted
as special characters when parsing the PKCS#11 URI string. Mangle
the zone name through 'dns_name_tofilenametext()' to make it
PKCS#11 safe.

Move the creation to a separate function for clarity.

Furthermore, add a log message whenever a PKCS#11 object has been
successfully created.

2 years agoTest dnssec-policy/hsm with multiple views
Matthijs Mekking [Thu, 16 Nov 2023 14:37:34 +0000 (15:37 +0100)] 
Test dnssec-policy/hsm with multiple views

Add test cases for zones in different views that are using PKCS#11
tokens to store its keys.

If it is using the same DNSSEC policy, only one PKCS#11 token should be
created and the same key should be used for the zone in both views.

If it is using a different DNSSEC policy, multiple PKCS#11 token should
be created and each view should use their respective key.

2 years agoRemove "error reading" grep from kasp system test
Matthijs Mekking [Thu, 16 Nov 2023 14:24:19 +0000 (15:24 +0100)] 
Remove "error reading" grep from kasp system test

This log may still occur if there is a DNSKEY in the unsigned zone.
This may happen in a multi-signer setup for example.

Ideally this should not log a warning, but that requires looking up
keys a different way (by searching for key files only). However, that
requires adapting a bunch of system tests, and is out of scope for now.

2 years agoMinor fixes in enginepkcs11 system test
Matthijs Mekking [Thu, 16 Nov 2023 11:10:50 +0000 (12:10 +0100)] 
Minor fixes in enginepkcs11 system test

- Shell function body should be in between curly braces.
- Some erroneous '|| return 1' are replaced with '|| ret=1'.
- Fix a variable name (was 'ret', should be '_ret').
- Clean up when setting up a new test.

2 years agoThe use of isc_dir_t in keymgr is not needed
Matthijs Mekking [Mon, 13 Nov 2023 13:40:59 +0000 (14:40 +0100)] 
The use of isc_dir_t in keymgr is not needed

The internal keymgr used 'isc_dir_open(&dir)' and 'isc_dir_close(&dir)',
but was not using the variable 'dir`, other than checking if the
directory can be opened. Errors like these will be be caught already
in the dst_api function calls.

2 years agoNo longer need to get generated key from label
Matthijs Mekking [Mon, 16 Oct 2023 11:24:10 +0000 (13:24 +0200)] 
No longer need to get generated key from label

The pkcs11-provider did not yet support getting X/Y coordinates
on newly generated EC PKEY keys, thus we attempted to get the
key from the label after it was generated in the keystore.

This has been fixed in:

  https://github.com/latchset/pkcs11-provider/pull/293

Thus now we should be able to use the generated key structure
immediately.

2 years agoOnly run pkcs11engine test if pkcs11-provider is available
Matthijs Mekking [Tue, 10 Oct 2023 13:21:58 +0000 (15:21 +0200)] 
Only run pkcs11engine test if pkcs11-provider is available

The bullseye and bookworm images are not set up with pkcs11-provider,
so we need to add an additional prerequisite for running the
pkcs11engine test. Check the path of OPENSSL_CONF.

2 years agoSpecify key usage to be digital signature
Matthijs Mekking [Tue, 10 Oct 2023 13:18:11 +0000 (15:18 +0200)] 
Specify key usage to be digital signature

If not set, the created keys allows signing plus decrypt which is bad
practice. Setting the key usage explicitly will generate keys that
allow only signing.

2 years agoCreate keys with PKCS#11 URI instead of object
Matthijs Mekking [Wed, 6 Sep 2023 12:09:46 +0000 (14:09 +0200)] 
Create keys with PKCS#11 URI instead of object

The pkcs11-provider has changed to take a PKCS#11 URI instead of an
object identifier. Change the BIND 9 code accordingly to pass through
the label instead of just the object identifier.

See: https://github.com/latchset/pkcs11-provider/pull/284

2 years agoFix tsan errors
Matthijs Mekking [Tue, 29 Aug 2023 13:13:22 +0000 (15:13 +0200)] 
Fix tsan errors

When working internally on the zone, we can access the zone's
variables directly.

2 years agoRefactor findzonekeys
Matthijs Mekking [Tue, 20 Jun 2023 13:44:17 +0000 (15:44 +0200)] 
Refactor findzonekeys

Move dns_dnssec_findzonekeys from the dnssec.{c,h} source code to
zone.{c,h} (the header file already commented that this should be done
inside dns_zone_t).

Alter the function in such a way, that keys are searched for in the
key stores if a 'dnssec-policy' (kasp) is attached to the zone,
otherwise keep using the zone's key-directory.

2 years agodnssec-keygen: -K keydir takes priority
Matthijs Mekking [Thu, 13 Apr 2023 09:17:43 +0000 (11:17 +0200)] 
dnssec-keygen: -K keydir takes priority

When using dnssec-policy with dnssec-keygen in combination with setting
the key-directory on the command line, the commandline argument takes
priority over the key-directory from the default named.conf.

2 years agoAdd documentation for key-store
Matthijs Mekking [Thu, 17 Mar 2022 09:31:03 +0000 (10:31 +0100)] 
Add documentation for key-store

Add grammar and statement sections to the ARM. Add a note about
when changing dnssec-policy you should take into account the key
directory paths.

2 years agoAdd CHANGES and release note for #1129
Matthijs Mekking [Thu, 17 Mar 2022 09:03:02 +0000 (10:03 +0100)] 
Add CHANGES and release note for #1129

Newsworthy.

2 years agoTest dnssec-policy with multiple key stores
Matthijs Mekking [Tue, 15 Mar 2022 15:10:34 +0000 (16:10 +0100)] 
Test dnssec-policy with multiple key stores

Make sure that if a dnssec-policy uses multiple key stores, the keys
have the right attributes and are stored in their appropriate directory.

2 years agoAdd support for key-store to dnssec-keygen
Matthijs Mekking [Tue, 15 Mar 2022 14:54:56 +0000 (15:54 +0100)] 
Add support for key-store to dnssec-keygen

If the provided policy in the configuration file uses a key-store,
use that to generate the key, instead of 'dst_key_generate()'.

2 years agoTest key-store with non-default directory
Matthijs Mekking [Fri, 11 Mar 2022 14:33:08 +0000 (15:33 +0100)] 
Test key-store with non-default directory

Add a test case where dnssec-policy uses key stores with a directory
other than the zone's key-directory.

This requires changing the kasp shell script to take into account that
keys can be in different directories. When looking for keys, the
'find' command now takes a maxdepth of 3 to also look for keys in
subdirectories. Note this maxdepth value is arbitrary, the added
'keystore.kasp' test only requires a maxdepth of 2.

Because of this change, the dnssec-keygen tests no longer work because
they are for the same zone (although different directories). Change
the test to use a different zone ('kasp2' instead of 'kasp').

2 years agoUse dst_key's directory when writing key files
Matthijs Mekking [Wed, 9 Mar 2022 10:33:03 +0000 (11:33 +0100)] 
Use dst_key's directory when writing key files

When writing key files to disk, use the internally stored directory.

Add an access function 'dst_key_directory()'.

Most calls to keymgr functions no longer need to provide the
key-directory value. Only 'dns_keymgr_run' still needs access to
the zone's key-directory in case the key-store is set to the built-in
key-directory.

2 years agoAdd directory to dst_key structure
Matthijs Mekking [Wed, 9 Mar 2022 10:27:03 +0000 (11:27 +0100)] 
Add directory to dst_key structure

Store key directory when reading the key from file. This is the
directory it was read from and can be used when saving the key back
to disk.

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