]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
16 months agoUse CMM_{STORE,LOAD}_SHARED to store/load glue in gluelist
Ondřej Surý [Wed, 25 Dec 2024 14:14:10 +0000 (15:14 +0100)] 
Use CMM_{STORE,LOAD}_SHARED to store/load glue in gluelist

ThreadSanitizer has trouble understanding that gluelist->glue is
constant after it is assigned to the slabheader with cmpxchg.  Help
ThreadSanitizer to understand the code by using CMM_STORE_SHARED and
CMM_LOAD_SHARED on gluelist->glue.

The ThreadSanitizer report:

    WARNING: ThreadSanitizer: data race
      Read of size 8 at 0x000000000001 by thread T0001:
#0 addglue lib/dns/qpzone.c:5304 (BuildId: 62aa74b0423f77cc56d705f02c2412b4762577cb)
#1 dns_db_addglue lib/dns/db.c:1119 (BuildId: 62aa74b0423f77cc56d705f02c2412b4762577cb)
#2 query_additional lib/ns/query.c:2230 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#3 query_addrrset lib/ns/query.c:2324
#4 query_prepare_delegation_response lib/ns/query.c:8595 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#5 query_delegation lib/ns/query.c:8780 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#6 query_notfound lib/ns/query.c:8552 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#7 query_gotanswer lib/ns/query.c:7553 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#8 query_lookup lib/ns/query.c:6020 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#9 ns__query_start lib/ns/query.c:5690 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#10 query_setup lib/ns/query.c:5239 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#11 ns_query_start lib/ns/query.c:11979 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#12 ns_client_request_continue lib/ns/client.c:2466 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#13 ns_client_request lib/ns/client.c:2142 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#14 isc___nm_readcb netmgr/netmgr.c:1859 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#15 isc__nm_readcb netmgr/netmgr.c:1874
#16 isc__nm_udp_read_cb netmgr/udp.c:589 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#17 uv__udp_recvmmsg src/unix/udp.c:202 (BuildId: 355edf0d38120d6761c51ee8cab2c162dff57b0a)
#18 uv__udp_recvmsg src/unix/udp.c:245 (BuildId: 355edf0d38120d6761c51ee8cab2c162dff57b0a)
#19 uv__udp_io src/unix/udp.c:142
#20 uv__io_poll src/unix/linux.c:1564 (BuildId: 355edf0d38120d6761c51ee8cab2c162dff57b0a)
#21 uv_run src/unix/core.c:458 (BuildId: 355edf0d38120d6761c51ee8cab2c162dff57b0a)
#22 loop_thread lib/isc/loop.c:328 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#23 thread_body lib/isc/thread.c:85 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#24 thread_run lib/isc/thread.c:100

      Previous write of size 8 at 0x000000000001 by thread T0002:
#0 create_gluelist lib/dns/qpzone.c:5253 (BuildId: 62aa74b0423f77cc56d705f02c2412b4762577cb)
#1 addglue lib/dns/qpzone.c:5281
#2 dns_db_addglue lib/dns/db.c:1119 (BuildId: 62aa74b0423f77cc56d705f02c2412b4762577cb)
#3 query_additional lib/ns/query.c:2230 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#4 query_addrrset lib/ns/query.c:2324
#5 query_prepare_delegation_response lib/ns/query.c:8595 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#6 query_delegation lib/ns/query.c:8780 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#7 query_notfound lib/ns/query.c:8552 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#8 query_gotanswer lib/ns/query.c:7553 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#9 query_lookup lib/ns/query.c:6020 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#10 ns__query_start lib/ns/query.c:5690 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#11 query_setup lib/ns/query.c:5239 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#12 ns_query_start lib/ns/query.c:11979 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#13 ns_client_request_continue lib/ns/client.c:2466 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#14 ns_client_request lib/ns/client.c:2142 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#15 isc___nm_readcb netmgr/netmgr.c:1859 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#16 isc__nm_readcb netmgr/netmgr.c:1874
#17 isc__nm_udp_read_cb netmgr/udp.c:589 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#18 uv__udp_recvmmsg src/unix/udp.c:202 (BuildId: 355edf0d38120d6761c51ee8cab2c162dff57b0a)
#19 uv__udp_recvmsg src/unix/udp.c:245 (BuildId: 355edf0d38120d6761c51ee8cab2c162dff57b0a)
#20 uv__udp_io src/unix/udp.c:142
#21 uv__io_poll src/unix/linux.c:1564 (BuildId: 355edf0d38120d6761c51ee8cab2c162dff57b0a)
#22 uv_run src/unix/core.c:458 (BuildId: 355edf0d38120d6761c51ee8cab2c162dff57b0a)
#23 loop_thread lib/isc/loop.c:328 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#24 thread_body lib/isc/thread.c:85 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#25 thread_run lib/isc/thread.c:100

      Location is heap block of size 88 at 0x000000000024 allocated by thread T0002:
#0 malloc <null> (BuildId: c08afb1c60772d9b4e4d4be38d0c0434c5b41990)
#1 mallocx lib/isc/jemalloc_shim.h:41 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#2 mem_get lib/isc/mem.c:303
#3 isc__mem_get lib/isc/mem.c:654
#4 new_gluelist lib/dns/qpzone.c:5012 (BuildId: 62aa74b0423f77cc56d705f02c2412b4762577cb)
#5 create_gluelist lib/dns/qpzone.c:5241
#6 addglue lib/dns/qpzone.c:5281
#7 dns_db_addglue lib/dns/db.c:1119 (BuildId: 62aa74b0423f77cc56d705f02c2412b4762577cb)
#8 query_additional lib/ns/query.c:2230 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#9 query_addrrset lib/ns/query.c:2324
#10 query_prepare_delegation_response lib/ns/query.c:8595 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#11 query_delegation lib/ns/query.c:8780 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#12 query_notfound lib/ns/query.c:8552 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#13 query_gotanswer lib/ns/query.c:7553 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#14 query_lookup lib/ns/query.c:6020 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#15 ns__query_start lib/ns/query.c:5690 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#16 query_setup lib/ns/query.c:5239 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#17 ns_query_start lib/ns/query.c:11979 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#18 ns_client_request_continue lib/ns/client.c:2466 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#19 ns_client_request lib/ns/client.c:2142 (BuildId: 9cc0711aeddfa6164f4f6fd94b0187f7bfa13ff2)
#20 isc___nm_readcb netmgr/netmgr.c:1859 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#21 isc__nm_readcb netmgr/netmgr.c:1874
#22 isc__nm_udp_read_cb netmgr/udp.c:589 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#23 uv__udp_recvmmsg src/unix/udp.c:202 (BuildId: 355edf0d38120d6761c51ee8cab2c162dff57b0a)
#24 uv__udp_recvmsg src/unix/udp.c:245 (BuildId: 355edf0d38120d6761c51ee8cab2c162dff57b0a)
#25 uv__udp_io src/unix/udp.c:142
#26 uv__io_poll src/unix/linux.c:1564 (BuildId: 355edf0d38120d6761c51ee8cab2c162dff57b0a)
#27 uv_run src/unix/core.c:458 (BuildId: 355edf0d38120d6761c51ee8cab2c162dff57b0a)
#28 loop_thread lib/isc/loop.c:328 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#29 thread_body lib/isc/thread.c:85 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#30 thread_run lib/isc/thread.c:100

      Thread T0001 'isc-loop-0002' (running) created by main thread at:
#0 pthread_create <null> (BuildId: c08afb1c60772d9b4e4d4be38d0c0434c5b41990)
#1 isc_thread_create lib/isc/thread.c:139 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#2 isc_loopmgr_run lib/isc/loop.c:508 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#3 main bin/named/main.c:1532 (BuildId: d03d7837520674921fd1fe7c353cb790cab69b3b)

      Thread T0002 'isc-loop-0003' (running) created by main thread at:
#0 pthread_create <null> (BuildId: c08afb1c60772d9b4e4d4be38d0c0434c5b41990)
#1 isc_thread_create lib/isc/thread.c:139 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#2 isc_loopmgr_run lib/isc/loop.c:508 (BuildId: de1ebc9b2642ead6bbd0f4553c7144c016b01ffc)
#3 main bin/named/main.c:1532 (BuildId: d03d7837520674921fd1fe7c353cb790cab69b3b)

    SUMMARY: ThreadSanitizer: data race lib/dns/qpzone.c:5304 in addglue

16 months agochg: dev: Detect and possibly define constexpr using Autoconf
Ondřej Surý [Wed, 25 Dec 2024 14:22:27 +0000 (14:22 +0000)] 
chg: dev: Detect and possibly define constexpr using Autoconf

Previously, we had an ISC_CONSTEXPR macro that was expanded to either
`constexpr` or `static const`, depending on compiler support.  To make
the code cleaner, move `constexpr` support detection to Autoconf; if
`constexpr` support is missing from the compiler, define `constexpr` as
`static const` in config.h.

Merge branch 'ondrej/rename-ISC_CONSTEXPR-to-constexpr-shim' into 'main'

See merge request isc-projects/bind9!9924

16 months agoDetect and possibly define constexpr using Autoconf
Ondřej Surý [Wed, 18 Dec 2024 10:53:48 +0000 (11:53 +0100)] 
Detect and possibly define constexpr using Autoconf

Previously, we had an ISC_CONSTEXPR macro that was expanded to either
`constexpr` or `static const`, depending on compiler support.  To make
the code cleaner, move `constexpr` support detection to Autoconf; if
`constexpr` support is missing from the compiler, define `constexpr` as
`static const` in config.h.

17 months agorem: dev: Remove C++ support from the public header
Ondřej Surý [Wed, 18 Dec 2024 16:34:37 +0000 (16:34 +0000)] 
rem: dev: Remove C++ support from the public header

Since BIND 9 headers are not longer public, there's no reason to keep
the ISC_LANG_BEGINDECL and ISC_LANG_ENDDECL macros to support including
them from C++ projects.

Merge branch 'ondrej/remove-C++-header-support' into 'main'

See merge request isc-projects/bind9!9925

17 months agoRemove C++ support from the public header
Ondřej Surý [Wed, 18 Dec 2024 11:00:54 +0000 (12:00 +0100)] 
Remove C++ support from the public header

Since BIND 9 headers are not longer public, there's no reason to keep
the ISC_LANG_BEGINDECL and ISC_LANG_ENDDECL macros to support including
them from C++ projects.

17 months agofix: usr: Resolve the spurious drops in performance due GLUE cache
Ondřej Surý [Fri, 13 Dec 2024 23:11:04 +0000 (23:11 +0000)] 
fix: usr: Resolve the spurious drops in performance due GLUE cache

For performance reasons, the returned GLUE records are cached on the first use.  The current implementation could randomly cause a performance drop and increased memory use.  This has been fixed.

Closes #5064

Merge branch '5064-rewrite-glue-cache-in-qpzone' into 'main'

See merge request isc-projects/bind9!9831

17 months agoRewrite the GLUE cache in QP zone database
Ondřej Surý [Thu, 5 Dec 2024 12:45:24 +0000 (13:45 +0100)] 
Rewrite the GLUE cache in QP zone database

This is a second attempt to rewrite the GLUE cache to not use per
database version hash table.  Instead of keeping a hash table indexed by
the node, use a directly linked list of GLUE records for each
slabheader.  This was attempted before, but there was a data race caused
by the fact that the thread cleaning the GLUE records could be slower
than accessing the slab headers again and reinitializing the wait-free
stack.

The improved design builds on the previous design, but adds a new
dns_gluelist structure that has a pointer to the database version.

If a dns_gluelist belonging to a different (old) version is detected, it
is just detached from the slabheader and left for the closeversion() to
clean it up later.

17 months agoRevert "Fix the glue table in the QP and RBT zone databases"
Ondřej Surý [Tue, 3 Dec 2024 14:07:30 +0000 (15:07 +0100)] 
Revert "Fix the glue table in the QP and RBT zone databases"

This reverts commit 5beae5faf9c6b46f4cee23e4ea2557bef6afa711.

17 months agofix: test: Various coccinelle fixes
Michal Nowak [Fri, 13 Dec 2024 13:48:20 +0000 (13:48 +0000)] 
fix: test: Various coccinelle fixes

Merge branch 'mnowak/cocci-more-set-if-not-null-changes' into 'main'

See merge request isc-projects/bind9!9836

17 months agoDrop superfluous isc_mem_get() NULL check
Michal Nowak [Thu, 12 Dec 2024 16:42:50 +0000 (17:42 +0100)] 
Drop superfluous isc_mem_get() NULL check

coccinelle v1.1 trips over a superfluous isc_mem_get() NULL check in
tests/libtest/ns.c and reports the following failure in CI:

    EXN: Failure("rule starting on line 26: already tagged token:\nC code context\nFile \"./tests/libtest/ns.c\", line 350, column 1, charpos = 7939\n  around = 'if',\n  whole content = \tif (qctx != NULL) {") in ./tests/libtest/ns.c

17 months agoMove coccinelle job to "sid" image
Michal Nowak [Thu, 5 Dec 2024 16:15:34 +0000 (17:15 +0100)] 
Move coccinelle job to "sid" image

The "sid" image has newer coccinelle 1.2 that identifies more issues.

17 months agoDisable unsigned-int spatch in models.c and sdlz.c
Michal Nowak [Thu, 5 Dec 2024 16:10:25 +0000 (17:10 +0100)] 
Disable unsigned-int spatch in models.c and sdlz.c

coccinelle v1.1 reports the following failure:

    EXN: Failure("./lib/dns/sdlz.c: 172: try to delete an expanded token: unsigned") in ./lib/dns/sdlz.c

coccinelle v1.2 reports the following failure:

    EXN: Failure("./util/models.c: 21: try to delete an expanded token: unsigned") in ./util/models.c

17 months agoApply more SET_IF_NOT_NULL() changes
Michal Nowak [Thu, 5 Dec 2024 15:15:50 +0000 (16:15 +0100)] 
Apply more SET_IF_NOT_NULL() changes

coccinelle v1.2 found more cases where the SET_IF_NOT_NULL macro
applies.

17 months agorem: dev: Remove DLV remnants
Matthijs Mekking [Fri, 13 Dec 2024 11:00:54 +0000 (11:00 +0000)] 
rem: dev: Remove DLV remnants

DLV is long gone, so we can remove design documentation around DLV, related command line options (that were already a hard failure), and some DLV related test remnants.

Merge branch 'matthijs-remove-dlv-remnants' into 'main'

See merge request isc-projects/bind9!9888

17 months agoRemove DLV remnants
Matthijs Mekking [Tue, 10 Dec 2024 10:10:02 +0000 (11:10 +0100)] 
Remove DLV remnants

DLV is long gone, so we can remove design documentation around DLV,
related command line options (that were already a hard failure),
and some DLV related test remnants.

17 months agoMerge tag 'v9.21.3'
Andoni Duarte Pintado [Fri, 13 Dec 2024 09:53:33 +0000 (10:53 +0100)] 
Merge tag 'v9.21.3'

17 months agochg: usr: The configuration clauses parental-agents and primaries are renamed to...
Matthijs Mekking [Fri, 13 Dec 2024 09:10:56 +0000 (09:10 +0000)] 
chg: usr: The configuration clauses parental-agents and primaries are renamed to remote-servers

The top blocks 'primaries' and 'parental-agents' are no longer preferred and should be renamed to 'remote-servers'. The zone statements 'parental-agents' and 'primaries' are still used, and may refer to any 'remote-servers' top block.

Closes #4544

Merge branch '4544-primaries-block-documentation-issues' into 'main'

See merge request isc-projects/bind9!9822

17 months agoRename remote-servers standard term to server-list
Matthijs Mekking [Fri, 6 Dec 2024 13:39:35 +0000 (14:39 +0100)] 
Rename remote-servers standard term to server-list

The 'remote-servers' named.conf reference conflicts with the standard
term from the glossary. Rename the standard term to server-list to
make the docs build.

17 months agoAdd primaries, parental-agents as synonyms
Matthijs Mekking [Fri, 6 Dec 2024 11:50:09 +0000 (12:50 +0100)] 
Add primaries, parental-agents as synonyms

Add back the top blocks 'parental-agents', 'primaries', and 'masters'
to the configuration. Do not document them as so many names for the
same clause is confusing.

This has a slight negative side effect that a top block 'primaries'
can be referred to with a zone statement 'parental-agents' for example,
but that shouldn't be a big issue.

17 months agoUnify parental-agents, primaries to remote-servers
Matthijs Mekking [Thu, 5 Dec 2024 07:52:03 +0000 (08:52 +0100)] 
Unify parental-agents, primaries to remote-servers

Having zone statements that are also top blocks is confusing, and if
we want to add more in the future (which I suspect will be for
generalized notifications, multi-signer), we need to duplicate a lot
of code.

Remove top blocks 'parental-agents' and 'primaries' and just have one
top block 'remote-servers' that you can refer to with zone statements.

17 months agofix: test: Fix "checking startup notify rate limit" failure
Mark Andrews [Fri, 13 Dec 2024 00:07:23 +0000 (00:07 +0000)] 
fix: test:  Fix "checking startup notify rate limit" failure

Fix the loop terminating condition to get consistent sample sizes and increase the minimum number of samples from 20 to 40.

Closes #5091

Merge branch '5091-investigate-checking-startup-notify-rate-limit-failure' into 'main'

See merge request isc-projects/bind9!9894

17 months agoFix startup notify rate test
Mark Andrews [Wed, 11 Dec 2024 02:32:18 +0000 (13:32 +1100)] 
Fix startup notify rate test

The terminating conditions for the startup notify test would
occasionally get ~20 records or get +10 seconds of records due to
a bad terminating condition.  Additionally 20 samples lead to test
failures.  Fix the terminating condition to use the correct conditional
(-eq -> -ge) and increase the minimum number of log entries to
average over to 40.

17 months agofix: test: tests/irs/resconf_test.c is missing check callbacks
Mark Andrews [Thu, 12 Dec 2024 22:49:50 +0000 (22:49 +0000)] 
fix: test: tests/irs/resconf_test.c is missing check callbacks

Closes #5088

Merge branch '5088-tests-irs-resconf_test-c-is-missing-check-callbacks' into 'main'

See merge request isc-projects/bind9!9884

17 months agoMove resconf_test.c to tests/dns and cleanup
Mark Andrews [Wed, 11 Dec 2024 01:28:40 +0000 (12:28 +1100)] 
Move resconf_test.c to tests/dns and cleanup

17 months agoCheck that nameservers are parsed correctly
Mark Andrews [Tue, 10 Dec 2024 06:35:16 +0000 (17:35 +1100)] 
Check that nameservers are parsed correctly

Add checks that the expected nameservers where actuall addes when
parsing resolv.conf.

17 months agofix: ci: Disable tracing otherwise gcovr fails
Michal Nowak [Thu, 12 Dec 2024 14:51:52 +0000 (14:51 +0000)] 
fix: ci: Disable tracing otherwise gcovr fails

Merge branch 'mnowak/gcovr-disable-tracing' into 'main'

See merge request isc-projects/bind9!9809

17 months agoDisable tracing for gcovr-enabled builds
Michal Nowak [Tue, 26 Nov 2024 14:49:15 +0000 (15:49 +0100)] 
Disable tracing for gcovr-enabled builds

gcovr has issues with processing files produced as part of a BIND 9
build with tracing support enabled (--enable-tracing).  Depending on the
gcovr version used, these issues may result in either warnings or
failures being reported by that tool.  Disable tracing support for
gcovr-enabled builds to work around these issues.

17 months agochg: doc: Update CONTRIBUTING.md and developer docs
Nicki Křížek [Thu, 12 Dec 2024 12:45:40 +0000 (12:45 +0000)] 
chg: doc: Update CONTRIBUTING.md and developer docs

Include the recent changes such as:
- changes to running system tests
- gitlab development workflow
- changelog and release note process

Closes #5045

Merge branch '5045-update-contributing' into 'main'

See merge request isc-projects/bind9!9784

17 months agoUpdate CONTRIBUTING.md and developer doc
Nicki Křížek [Tue, 26 Nov 2024 15:33:33 +0000 (16:33 +0100)] 
Update CONTRIBUTING.md and developer doc

Include the recent changes such as:
- changes to running system tests
- gitlab development workflow
- changelog and release note process

17 months agofix: test: Wait for "all zones loaded" after rndc reload in "database" test
Michal Nowak [Thu, 12 Dec 2024 12:08:13 +0000 (12:08 +0000)] 
fix: test: Wait for "all zones loaded" after rndc reload in "database" test

After the rndc reload command finished, we might have queried the
database zone sooner than it was reloaded because rndc reloads zones
asynchronously if no specific zone was provided. We should wait for "all
zones loaded" in the ns1 log to be sure.

Closes #5075

Merge branch '5075-database-rndc-reload-ensure-all-zones-loaded' into 'main'

See merge request isc-projects/bind9!9829

17 months agoWait for "all zones loaded" after rndc reload in "database" test
Michal Nowak [Thu, 5 Dec 2024 10:58:12 +0000 (11:58 +0100)] 
Wait for "all zones loaded" after rndc reload in "database" test

After the rndc reload command finished, we might have queried the
database zone sooner than it was reloaded because rndc reloads zones
asynchronously if no specific zone was provided. We should wait for "all
zones loaded" in the ns1 log to be sure.

17 months agorem: usr: Remove 'sortlist' option
Evan Hunt [Thu, 12 Dec 2024 02:35:18 +0000 (02:35 +0000)] 
rem: usr: Remove 'sortlist' option

The `sortlist` option, which was deprecated in BIND 9.20, has now been removed.

Closes #4665

Merge branch '4665-remove-sortlist' into 'main'

See merge request isc-projects/bind9!9839

17 months agoremove "sortlist"
Evan Hunt [Thu, 5 Dec 2024 21:16:02 +0000 (13:16 -0800)] 
remove "sortlist"

this commit removes the deprecated "sortlist" option. the option
is now marked as ancient; it is a fatal error to use it in
named.conf.

the sortlist system test has been removed, and other tests that
referenced the option have been modified.

the enabling functions, dns_message_setsortorder() and
dns_rdataset_towiresorted(), have also been removed.

17 months agonew: usr: Add "Zone has [AAAA/A] records but is not served by IPv[6/4]" warnings
Mark Andrews [Wed, 11 Dec 2024 22:06:34 +0000 (22:06 +0000)] 
new: usr: Add "Zone has [AAAA/A] records but is not served by IPv[6/4]" warnings

Check that zones with AAAA records are served by IPv6 servers and that zones with A records are served by IPv4 servers.
Sometimes, IPv6 services are accidentally misconfigured and zones with IPv6 (AAAA) address records are not served by DNS servers with IPv6 addresses, which means they need to use translation devices to look up those IPv6 addresses. The reverse is also sometimes true: zones with A records are not resolvable over IPv4 when they should be.
To prevent this, BIND now looks for these misconfigured zones and issues a warning if they are found.

Closes #4370

Merge branch '4370-check-that-a-zone-is-served-by-ipv6-servers-if-it-has-aaaa-records' into 'main'

See merge request isc-projects/bind9!8393

17 months agoCheck "records but is not served by" warnings
Mark Andrews [Tue, 17 Oct 2023 04:28:22 +0000 (15:28 +1100)] 
Check "records but is not served by" warnings

This checks that "zone has A records but is not served by IPv4
servers" and "zone has AAAA records but is not served by IPv6
servers" are emitted when they should be and not when they shouldn't
be.

17 months agoCheck that a zone that serves A/AAAA is served over IPv4/IPv6
Mark Andrews [Tue, 17 Oct 2023 03:49:14 +0000 (14:49 +1100)] 
Check that a zone that serves A/AAAA is served over IPv4/IPv6

named-checkzone will now, as part of the zone's integrity checks,
look to see if there are A or AAAA records being served and if so
check that the nameservers have A or AAAA records respectively.

These are a sometimes overlooked checks that, if not met, can mean
that a service that is supposed to reachable over IPv6 will not be
resolvable when the recursive resolver is IPv6 only.  Similarly for
IPv4 servers when there are IPv4 only resolvers.

17 months agofix: dev: clean up incorrect logging module names
Evan Hunt [Wed, 11 Dec 2024 17:12:18 +0000 (17:12 +0000)] 
fix: dev: clean up incorrect logging module names

Some files used logmodule names that had been copied in from elsewhere; these have now been given module names of their own. Also, the RBT and RBTDB logmodules have been removed, since they are now unused.

Merge branch 'each-cleanup-logmodules' into 'main'

See merge request isc-projects/bind9!9895

17 months agoclean up log module names
Evan Hunt [Wed, 11 Dec 2024 03:11:26 +0000 (19:11 -0800)] 
clean up log module names

- remove obsolete DNS_LOGMODULE_RBT and DNS_LOGMODULE_RBTDB
- correct the misuse of the wrong log modules in dns/rpz.c and
  dns/catz.c, and add DNS_LOGMODULE_RPZ and DNS_LOGMODULE_CATZ
  to support them.

17 months agorem: usr: Remove trusted-keys and managed-keys options
Matthijs Mekking [Wed, 11 Dec 2024 13:39:02 +0000 (13:39 +0000)] 
rem: usr: Remove trusted-keys and managed-keys options

These options have been deprecated in 9.19 in favor of the 'trust-anchors' option and are now being removed.

Closes #5080

Merge branch '5080-remove-trusted-and-managed-keys' into 'main'

See merge request isc-projects/bind9!9855

17 months agoRemove trusted-keys and managed-keys options
Matthijs Mekking [Fri, 6 Dec 2024 15:30:04 +0000 (16:30 +0100)] 
Remove trusted-keys and managed-keys options

These options have been deprecated in 9.19 in favor of the trust-anchors
option. They are now removed to clean up the configuration and the code.

17 months agofix: nil: update style guideline to reflect current practice
Evan Hunt [Wed, 11 Dec 2024 03:39:21 +0000 (03:39 +0000)] 
fix: nil: update style guideline to reflect current practice

The style guide now mentions clang-format, doesn't parenthesize return values, and no longer calls for backward compatibility in public function names.

Merge branch 'each-style-update' into 'main'

See merge request isc-projects/bind9!9892

17 months agoupdate style guideline to reflect current practice
Evan Hunt [Tue, 10 Dec 2024 22:11:45 +0000 (14:11 -0800)] 
update style guideline to reflect current practice

It now mentions clang-format, doesn't parenthesize return values,
and no longer calls for backward compatibility in public function names.

17 months agofix: dev: mark loop as shuttingdown earlier in shutdown_cb
Ondřej Surý [Tue, 10 Dec 2024 19:51:20 +0000 (19:51 +0000)] 
fix: dev: mark loop as shuttingdown earlier in shutdown_cb

Merge branch 'loop-shuttingdown' into 'main'

See merge request isc-projects/bind9!9827

17 months agomark loop as shuttingdown earlier in shutdown_cb
Pavel Březina [Thu, 5 Dec 2024 11:37:37 +0000 (12:37 +0100)] 
mark loop as shuttingdown earlier in shutdown_cb

`shutdown_trigger_close_cb` is not called in the main loop since
queued events in the `loop->async_trigger`, including loop teardown
(shutdown_server) are processed first, before the `uv_close` callback
is executed..

In order to pass the information to the queued events, it is necessary
to set the flag earlier in the process and not wait for the `uv_close`
callback to trigger.

17 months agofix: test: Add rr-related common test artifacts
Michal Nowak [Tue, 10 Dec 2024 17:40:35 +0000 (17:40 +0000)] 
fix: test: Add rr-related common test artifacts

Merge branch 'mnowak/add-rr-related-common-artifacts' into 'main'

See merge request isc-projects/bind9!9830

17 months agoAdd rr-related common test artifacts
Michal Nowak [Thu, 5 Dec 2024 11:54:38 +0000 (12:54 +0100)] 
Add rr-related common test artifacts

17 months agofix: ci: Set cross-version-config-tests to allow_failure in CI
Michal Nowak [Tue, 10 Dec 2024 09:54:02 +0000 (09:54 +0000)] 
fix: ci: Set cross-version-config-tests to allow_failure in CI

Address failing cross-version-config-tests job.

Closes #5087

Merge branch 'mnowak/cross-version-config-tests-allow-fail' into 'main'

See merge request isc-projects/bind9!9833

17 months agoSet cross-version-config-tests to allow_failure in CI
Michal Nowak [Thu, 5 Dec 2024 14:50:40 +0000 (15:50 +0100)] 
Set cross-version-config-tests to allow_failure in CI

The December releases suffer from the ns2/managed1.conf file not being
in the mkeys extra_artifacts. This manifests only when pytest is run
with the --setup-only option, which is the case in the
cross-version-config-tests CI job. The original issue is fixed in !9815,
but the fix will be effective only when subsequent releases are out.

The #4666 issue removed the "fixed" value for the "rrset-order" option
which is still present in the December release system test and which the
current named can't handle. This will be addressed when when the January
9.21 release is published.

The #4482 issue removed the "dnssec-must-be-secure" feature.

17 months agorem: dev: Drop single-use RETERR macro
Matthijs Mekking [Tue, 10 Dec 2024 08:46:29 +0000 (08:46 +0000)] 
rem: dev: Drop single-use RETERR macro

If the RETERR define is only used once in a file, just drop the macro.

Merge branch 'matthijs-remove-single-use-define-reterr' into 'main'

See merge request isc-projects/bind9!9871

17 months agoDrop single-use RETERR macro
Matthijs Mekking [Mon, 9 Dec 2024 14:10:53 +0000 (15:10 +0100)] 
Drop single-use RETERR macro

If the RETERR define is only used once in a file, just drop the macro.

17 months agochg: test: Use a different burst name to identify test queries
Mark Andrews [Tue, 10 Dec 2024 05:52:45 +0000 (05:52 +0000)] 
chg: test: Use a different burst name to identify test queries

This allows easier identification of which burst is which in
named.run.

Merge branch 'marka-use-different-burst-name-for-forensics' into 'main'

See merge request isc-projects/bind9!9881

17 months agoUse a different burst name to identify test queries
Mark Andrews [Fri, 6 Sep 2024 04:51:24 +0000 (14:51 +1000)] 
Use a different burst name to identify test queries

This allows easier identification of which burst is which in
named.run.

17 months agofix: test: Fix static stub subtest description
Mark Andrews [Tue, 10 Dec 2024 03:15:53 +0000 (03:15 +0000)] 
fix: test: Fix static stub subtest description

This subtest exercises static stub behaviour when server-addresses has an address.  This was misidentified in the description.

Closes !9799

Merge branch 'marka-fix-stub-subtest-description' into 'main'

See merge request isc-projects/bind9!9799

17 months agoFix static stub subtest description
Mark Andrews [Tue, 1 Oct 2024 03:12:11 +0000 (13:12 +1000)] 
Fix static stub subtest description

17 months agofix: dev: Accept resolv.conf with more than 8 search domains
Mark Andrews [Tue, 10 Dec 2024 01:39:04 +0000 (01:39 +0000)] 
fix: dev: Accept resolv.conf with more than 8 search domains

Closes #1259

Merge branch '1259-irs-search-unlimited' into 'main'

See merge request isc-projects/bind9!2446

17 months agoRemove artificial search limit from libirs
Petr Menšík [Fri, 4 Oct 2019 22:20:54 +0000 (00:20 +0200)] 
Remove artificial search limit from libirs

Search directive from resolv.conf had a maximum of 8 domains. Any
more were ignored. Do not ignore them anymore; iterate over any
number of domains.

Test resolv.conf support by checking the first and last domain in
the search list. Ignore the domains between; just ensure that the
last domain in the configuration is the last domain parsed.

17 months agofix: usr: Unknown directive in resolv.conf not handled properly
Mark Andrews [Tue, 10 Dec 2024 00:45:44 +0000 (00:45 +0000)] 
fix: usr: Unknown directive in resolv.conf not handled properly

The line after an unknown directive in resolv.conf could accidentally be skipped, potentially affecting dig, host, nslookup, nsupdate, or delv. This has been fixed.

Closes #5084

Merge branch '5084-plain-unknown-keyword-in-resolv-conf-not-handled-propely' into 'main'

See merge request isc-projects/bind9!9865

17 months agoExtend resconf_test
Mark Andrews [Mon, 9 Dec 2024 02:04:05 +0000 (13:04 +1100)] 
Extend resconf_test

Update to the new unit test framework.

Add a test for an unknown directive without any arguments.

Add test for an unknown directive without arguments, followed
by a search directive.

17 months agoFix parsing of unknown directives in resolv.conf
Mark Andrews [Mon, 9 Dec 2024 03:45:38 +0000 (14:45 +1100)] 
Fix parsing of unknown directives in resolv.conf

Only call eatline() to skip to the next line if we're not
already at the end of a line when parsing an unknown directive.
We were accidentally skipping the next line when there was only
a single unknown directive on the current line.

17 months agonew: test: Add Fedora 41
Michal Nowak [Mon, 9 Dec 2024 17:19:26 +0000 (17:19 +0000)] 
new: test: Add Fedora 41

Prereq: isc-projects/images!345

Merge branch 'mnowak/fedora-41' into 'main'

See merge request isc-projects/bind9!9612

17 months agoAdd Fedora 41
Michal Nowak [Thu, 10 Oct 2024 09:11:48 +0000 (11:11 +0200)] 
Add Fedora 41

17 months agoAdd Alpine Linux 3.21
Michal Nowak [Mon, 9 Dec 2024 16:25:12 +0000 (16:25 +0000)] 
Add Alpine Linux 3.21

Prereq: isc-projects/images!359

Merge branch 'mnowak/alpine-3.21' into 'main'

See merge request isc-projects/bind9!9872

17 months agoAdd Alpine Linux 3.21
Michal Nowak [Mon, 9 Dec 2024 15:35:59 +0000 (16:35 +0100)] 
Add Alpine Linux 3.21

17 months agonew: ci: Add FreeBSD 14.2
Michal Nowak [Mon, 9 Dec 2024 13:35:30 +0000 (13:35 +0000)] 
new: ci: Add FreeBSD 14.2

Merge branch 'mnowak/freebsd-14.2' into 'main'

See merge request isc-projects/bind9!9838

17 months agoAdd FreeBSD 14.2
Michal Nowak [Thu, 5 Dec 2024 18:27:36 +0000 (19:27 +0100)] 
Add FreeBSD 14.2

17 months agorem: usr: Remove dnssec-must-be-secure feature
Ondřej Surý [Mon, 9 Dec 2024 12:10:48 +0000 (12:10 +0000)] 
rem: usr: Remove dnssec-must-be-secure feature

Closes #4482

Merge branch '4482-remove-dnssec-must-be-secure-feature' into 'main'

See merge request isc-projects/bind9!9851

17 months agoReplace remaining usage of DNS_R_MUSTBESECURE with DNS_R_NOVALIDSIG
Ondřej Surý [Fri, 6 Dec 2024 17:12:15 +0000 (18:12 +0100)] 
Replace remaining usage of DNS_R_MUSTBESECURE with DNS_R_NOVALIDSIG

The DNS_R_MUSTBESECURE lost its meaning with removal of
dnssec-must-be-secure option, so replace the few remaining (and a bit
confusing) use of this result code with DNS_R_NOVALIDSIG.

17 months agoRemove dnssec-must-be-secure feature
Ondřej Surý [Fri, 6 Dec 2024 12:11:59 +0000 (13:11 +0100)] 
Remove dnssec-must-be-secure feature

The dnssec-must-be-secure feature was added in the early days of BIND 9
and DNSSEC and it makes sense only as a debugging feature.  There are no
reasons to keep this feature in the production code anymore.

Remove the feature to simplify the code.

17 months agorem: usr: Remove fixed value for the rrset-order option
Ondřej Surý [Mon, 9 Dec 2024 12:09:36 +0000 (12:09 +0000)] 
rem: usr: Remove fixed value for the rrset-order option

Remove the "fixed" value from the "rrset-order" option and from the
autoconf script.

Closes #4666

Merge branch '4666-remote-rrset-order-fixed' into 'main'

See merge request isc-projects/bind9!9852

17 months agoRemove fixed value for the rrset-order option
Ondřej Surý [Fri, 6 Dec 2024 13:13:56 +0000 (14:13 +0100)] 
Remove fixed value for the rrset-order option

Remove the "fixed" value from the "rrset-order" option and from the
autoconf script.

17 months agofix: usr: disable deterministic ecdsa for fips builds
Michal Nowak [Mon, 9 Dec 2024 11:55:53 +0000 (11:55 +0000)] 
fix: usr: disable deterministic ecdsa for fips builds

FIPS 186-5 [1] allows the usage deterministic ECDSA (Section 6.3) which
is compabile with RFC 6979 [2] but OpenSSL seems to follow FIPS 186-4
(Section 6.3) [3] which only allows for random k values, failing
k value generation for OpenSSL >=3.2. [4]

Fix signing by not using deterministic ECDSA when FIPS mode is active.

[1]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
[2]: https://datatracker.ietf.org/doc/html/rfc6979
[3]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf
[4]: https://github.com/openssl/openssl/blob/85f17585b0d8b55b335f561e2862db14a20b1e64/crypto/ec/ecdsa_ossl.c#L201-L207

Closes #5072

Merge branch '5072-the-ecdsa_determinism_test-check-fails-on-ol-9-5-fips' into 'main'

See merge request isc-projects/bind9!9808

17 months agodisable deterministic ecdsa for fips builds
Aydın Mercan [Wed, 4 Dec 2024 10:11:45 +0000 (13:11 +0300)] 
disable deterministic ecdsa for fips builds

FIPS 186-5 [1] allows the usage deterministic ECDSA (Section 6.3) which
is compabile with RFC 6979 [2] but OpenSSL seems to follow FIPS 186-4
(Section 6.3) [3] which only allows for random k values, failing
k value generation for OpenSSL >=3.2. [4]

Fix signing by not using deterministic ECDSA when FIPS mode is active.

[1]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
[2]: https://datatracker.ietf.org/doc/html/rfc6979
[3]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf
[4]: https://github.com/openssl/openssl/blob/85f17585b0d8b55b335f561e2862db14a20b1e64/crypto/ec/ecdsa_ossl.c#L201-L207

17 months agochg: dev: Use query counters in validator code
Matthijs Mekking [Mon, 9 Dec 2024 10:31:24 +0000 (10:31 +0000)] 
chg: dev: Use query counters in validator code

Commit af7db8951364a89c468eda1535efb3f53adc2c1f as part of #4141 was supposed to apply the 'max-recursion-queries' quota to validator queries, but the counter was never actually passed on to 'dns_resolver_createfetch()'. This has been fixed, and the global query counter ('max-query-count', per client request) is now also added.

Related to #4980

Merge branch '4980-pass-counters-in-validator-createfetch' into 'main'

See merge request isc-projects/bind9!9856

17 months agoUse query counters in validator code
Matthijs Mekking [Fri, 6 Dec 2024 15:41:15 +0000 (16:41 +0100)] 
Use query counters in validator code

Commit af7db8951364a89c468eda1535efb3f53adc2c1f as part of #4141 was
supposed to apply the 'max-recursion-queries' quota to validator
queries, but the counter was never actually passed on to
dns_resolver_createfetch(). This has been fixed, and the global query
counter ('max-query-count', per client request) is now also added.

17 months agochg: dev: Update picohttpparser.{c,h} with upstream repository
Ondřej Surý [Sun, 8 Dec 2024 12:28:23 +0000 (12:28 +0000)] 
chg: dev: Update picohttpparser.{c,h} with upstream repository

Closes #4485

Merge branch '4485-update-httppicoparser' into 'main'

See merge request isc-projects/bind9!9857

17 months agoUpdate picohttpparser.{c,h} with upstream repository
Ondřej Surý [Fri, 6 Dec 2024 17:29:39 +0000 (18:29 +0100)] 
Update picohttpparser.{c,h} with upstream repository

Upstream code doesn't do regular releases, so we need to regularly
sync the code from the upstream repository.  This is synchronization up
to the commit f8d0513 from Jan 29, 2024.

17 months agofix: usr: Preserve cache across reconfig when using attach-cache
Evan Hunt [Fri, 6 Dec 2024 21:34:15 +0000 (21:34 +0000)] 
fix: usr: Preserve cache across reconfig when using attach-cache

When the `attach-cache` option is used in the `options` block with an arbitrary name, it causes all views to use the same cache. Previously, this configuration caused the cache to be deleted and a new cache created every time the server was reconfigured. This has been fixed.

Closes #5061

Merge branch '5061-attach-cache-fix' into 'main'

See merge request isc-projects/bind9!9787

17 months agopreserve cache across reload when using attach-cache
Evan Hunt [Wed, 27 Nov 2024 08:35:16 +0000 (00:35 -0800)] 
preserve cache across reload when using attach-cache

when the attach-cache option is used in the options block
with an arbitrary name, it causes all views to use the same
cache. however, previously, this could cause the cache to be
deleted and a new cache created every time the server was
reconfigured. this did *not* occur when attach-cache was
used at the view level to refer back to another view's cache.

in this commit we correct the problem by checking for
pre-existing caches during reconfiguration, and moving
them from the old server cache list to the new cache list
before cleaning up and freeing the old cache list.

17 months agofix: dev: Revert "Lock and attach when returning zone stats"
Ondřej Surý [Fri, 6 Dec 2024 19:45:57 +0000 (19:45 +0000)] 
fix: dev: Revert "Lock and attach when returning zone stats"

Closes #5082

Merge branch '5082-lock-and-attach-when-return-zone-stats-revert' into 'main'

See merge request isc-projects/bind9!9859

17 months agoRevert "Attach dnssecsignstats, rcvquerystats, and requeststats" 9858/head
Ondřej Surý [Fri, 6 Dec 2024 18:46:39 +0000 (19:46 +0100)] 
Revert "Attach dnssecsignstats, rcvquerystats, and requeststats"

This reverts commit fb50a7115927e481b0a471de48dc668eb75af941.

17 months agochg: dev: Remove unused maxquerycount
Matthijs Mekking [Fri, 6 Dec 2024 15:18:28 +0000 (15:18 +0000)] 
chg: dev: Remove unused maxquerycount

Related to #4980

Merge branch '4980-remove-unused-maxqueryqount' into 'main'

See merge request isc-projects/bind9!9850

17 months agoRemove unused maxquerycount
Matthijs Mekking [Fri, 6 Dec 2024 10:19:18 +0000 (11:19 +0100)] 
Remove unused maxquerycount

While implementing the global limit 'max-query-count', initially I
thought adding the variable to the resolver structure. But the limit
is per client request so it was moved to the view structure (and
counter in ns_query structure). However, I forgot to remove the
variable from the resolver structure again. This commit fixes that.

17 months agonew: test: Add OpenBSD 7.6
Michal Nowak [Fri, 6 Dec 2024 10:16:29 +0000 (10:16 +0000)] 
new: test: Add OpenBSD 7.6

Merge branch 'mnowak/openbsd-7.6' into 'main'

See merge request isc-projects/bind9!9609

17 months agoAdd OpenBSD 7.6
Michal Nowak [Wed, 9 Oct 2024 20:18:23 +0000 (22:18 +0200)] 
Add OpenBSD 7.6

17 months agochg: test: Add FreeBSD 13.4
Michal Nowak [Fri, 6 Dec 2024 09:30:17 +0000 (09:30 +0000)] 
chg: test: Add FreeBSD 13.4

Merge branch 'mnowak/freebsd-13.4' into 'main'

See merge request isc-projects/bind9!9640

17 months agoAdd FreeBSD 13.4
Michal Nowak [Tue, 15 Oct 2024 13:16:22 +0000 (15:16 +0200)] 
Add FreeBSD 13.4

17 months agofix: dev: Lock and attach when returning zone stats
Mark Andrews [Fri, 6 Dec 2024 05:32:05 +0000 (05:32 +0000)] 
fix: dev: Lock and attach when returning zone stats

When returning zone statistics counters, the statistics sets are now attached while the zone is locked.  This addresses Coverity warnings CID 468720, 468728 and 468729.

Closes #4934

Merge branch '4934-lock-and-attach-when-return-zone-stats' into 'main'

See merge request isc-projects/bind9!9488

17 months agoAttach dnssecsignstats, rcvquerystats, and requeststats
Mark Andrews [Thu, 19 Sep 2024 05:22:24 +0000 (15:22 +1000)] 
Attach dnssecsignstats, rcvquerystats, and requeststats

In dns_zone_getdnssecsignstats, dns_zone_getrcvquerystats and
dns_zone_getrequeststats attach to the statistics structure.

17 months agoINSIST that the zone in locked before unlocking
Mark Andrews [Mon, 28 Oct 2024 23:12:20 +0000 (10:12 +1100)] 
INSIST that the zone in locked before unlocking

This is the counterpart to the INSIST(!zone->locked) when the zone
is locked.

17 months agofix: dev: Finalize removal of memory debug flags size and mctx
Mark Andrews [Fri, 6 Dec 2024 03:12:29 +0000 (03:12 +0000)] 
fix: dev: Finalize removal of memory debug flags size and mctx

Commit 4b3d0c66009d30f5c0bc12ee128fc59f1d853f44 has removed them, but
did not remove few traces in documentation and help. Remove them from
remaining places.

Merge branch 'main-memory-flags-size-mctx' into 'main'

See merge request isc-projects/bind9!9606

17 months agoFinalize removal of memory debug flags size and mctx
Petr Menšík [Wed, 9 Oct 2024 13:32:07 +0000 (15:32 +0200)] 
Finalize removal of memory debug flags size and mctx

Commit 4b3d0c66009d30f5c0bc12ee128fc59f1d853f44 has removed them, but
did not remove few traces in documentation and help. Remove them from
remaining places.

17 months agofix: usr: Fix dnssec-signzone signing non-DNSKEY RRsets with revoked keys
Mark Andrews [Fri, 6 Dec 2024 00:59:26 +0000 (00:59 +0000)] 
fix: usr: Fix dnssec-signzone signing non-DNSKEY RRsets with revoked keys

`dnssec-signzone` was using revoked keys for signing RRsets other than DNSKEY.  This has been corrected.

Closes #5070

Merge branch '5070-dnssec-signzone-fix-revoke' into 'main'

See merge request isc-projects/bind9!9800

17 months agoCheck dnssec-signzone behaviour with revoked keys
Mark Andrews [Mon, 2 Dec 2024 07:30:41 +0000 (18:30 +1100)] 
Check dnssec-signzone behaviour with revoked keys

Only DNSKEY records should be signed with a revoked key.

17 months agoDo not sign non DNSKEY RRset with revoked keys
Mark Andrews [Fri, 29 Nov 2024 06:20:39 +0000 (17:20 +1100)] 
Do not sign non DNSKEY RRset with revoked keys

It does not make sense to sign RRsets other than DNSKEY with revoked
keys.

17 months agofix: test: ecdsa pytest rewrite fixes
Michal Nowak [Thu, 5 Dec 2024 18:22:24 +0000 (18:22 +0000)] 
fix: test: ecdsa pytest rewrite fixes

Merge branch 'mnowak/ecdsa-pytest-rewrite-fixes' into 'main'

See merge request isc-projects/bind9!9823

17 months agoUse os.getenv() instead of os.environ
Michal Nowak [Thu, 5 Dec 2024 09:37:19 +0000 (10:37 +0100)] 
Use os.getenv() instead of os.environ

If ECDSAP256SHA256_SUPPORTED or ECDSAP384SHA384_SUPPORTED variables were
not present in the environment, os.environ would raise KeyError that is
not being handled in the decorator. Use os.getenv() instead.

17 months agoFix skipif decorators' conditions
Michal Nowak [Thu, 5 Dec 2024 09:23:53 +0000 (10:23 +0100)] 
Fix skipif decorators' conditions

The ECDSA256 and ECDSA384 check conditions were switched.

17 months agofix: usr: Fix nsupdate hang when processing a large update
Matthijs Mekking [Thu, 5 Dec 2024 15:13:45 +0000 (15:13 +0000)] 
fix: usr: Fix nsupdate hang when processing a large update

To mitigate DNS flood attacks over a single TCP connection, we throttle the connection when the other side does not read the data. Throttling should only occur on server-side sockets, but erroneously also happened for nsupdate, which acts as a client. When nsupdate started throttling the connection, it never attempts to read again. This has been fixed.

Closes #4910

Merge branch '4910-nsupdate-hangs-when-processing-large-update' into 'main'

See merge request isc-projects/bind9!9709

17 months agoFix nsupdate hang when processing a large update
Matthijs Mekking [Fri, 1 Nov 2024 12:25:26 +0000 (13:25 +0100)] 
Fix nsupdate hang when processing a large update

The root cause is the fix for CVE-2024-0760 (part 3), which resets
the TCP connection on a failed send. Specifically commit
4b7c61381f186e20a476c35032a871295ebbd385 stops reading on the socket
because the TCP connection is throttling.

When the tcpdns_send_cb callback thinks about restarting reading
on the socket, this fails because the socket is a client socket.
And nsupdate is a client and is using the same netmgr code.

This commit removes the requirement that the socket must be a server
socket, allowing reading on the socket again after being throttled.

17 months agoAdd test case for nsupdate hangs on large update
Matthijs Mekking [Fri, 1 Nov 2024 12:23:20 +0000 (13:23 +0100)] 
Add test case for nsupdate hangs on large update

This test case hangs, despite the update being performed on the
name server.