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

43066 Commits

Author SHA1 Message Date
Petr Špaček
83e4fda8c1 chg: test: DNSTAP test cleanup
Merge branch 'pspacek/dnstap-test-cleanup' into 'main'

See merge request isc-projects/bind9!10478
2025-05-28 11:16:17 +00:00
Petr Špaček
889b360167 Use Pytest mark to guard dnstap features 2025-05-28 10:45:32 +00:00
Petr Špaček
313a985dfc Fix DNSTAP feature detection for pytest 2025-05-28 10:45:32 +00:00
Petr Špaček
f176acdfcc Port dnstap test to use isctest utilities 2025-05-28 10:45:32 +00:00
Evan Hunt
a988ffcede fix: dev: Add more iteration macros
Add more macros for iteration: `DNS_RDATASET_FOREACH`, `CFG_LIST_FOREACH`, `DNS_DBITERATOR_FOREACH`, and `DNS_RDATASETITER_FOREACH`.

Merge branch 'each-rdataset-foreach' into 'main'

See merge request isc-projects/bind9!10350
2025-05-28 04:40:40 +00:00
Evan Hunt
8d065fd3e1 add DNS_DBITERATOR_FOREACH and DNS_RDATASETITER_FOREACH
when iterating databases, use DNS_DBITERATOR_FOREACH and
DNS_DNSRDATASETITER_FOREACH macros where possible.
2025-05-27 21:08:09 -07:00
Evan Hunt
24d077afb0 add CFG_LIST_FOREACH macro
replace the pattern `for (elt = cfg_list_first(x); elt != NULL;
elt = cfg_list_next(elt))` with a new `CFG_LIST_FOREACH` macro.
2025-05-27 21:08:09 -07:00
Evan Hunt
f10f5572ac add DNS_RDATASET_FOREACH macro
replace the pattern `for (result = dns_rdataset_first(x); result ==
ISC_R_SUCCES; result = dns_rdataset_next(x)` with a new
`DNS_RDATASET_FOREACH` macro throughout BIND.
2025-05-27 21:08:09 -07:00
Evan Hunt
6a6ef103dd import_rdataset() can't fail
the import_rdataset() function can't return any value other
than ISC_R_SUCCESS, so it's been changed to void and its callers
don't rely on its return value any longer.
2025-05-27 20:56:54 -07:00
Evan Hunt
7655e6c108 fix: nil: correct the DbC assertions in message.c
the comments for some calls in the dns_message API specified
requirements which were not actually enforced in the functions.
in most cases, this has now been corrected by adding the missing
REQUIREs. in one case, the comment was incorrect and has been
revised.

Merge branch 'each-fix-message-requires' into 'main'

See merge request isc-projects/bind9!10466
2025-05-27 23:11:27 +00:00
Evan Hunt
c437da59ee correct the DbC assertions in message.c
the comments for some calls in the dns_message API specified
requirements which were not actually enforced in the functions.

in most cases, this has now been corrected by adding the missing
REQUIREs. in one case, the comment was incorrect and has been
revised.
2025-05-27 23:11:04 +00:00
Evan Hunt
b045726f8f fix: dev: Make all ISC_LIST_FOREACH calls safe
Previously, `ISC_LIST_FOREACH` and `ISC_LIST_FOREACH_SAFE` were
two separate macros, with the _SAFE version allowing entries
to be unlinked during the loop. `ISC_LIST_FOREACH` is now also
safe, and the separate `_SAFE` macro has been removed.

Similarly, the `ISC_LIST_FOREACH_REV` macro is now safe, and
`ISC_LIST_FOREACH_REV_SAFE` has also been removed.

Merge branch 'each-isc-list-foreach' into 'main'

See merge request isc-projects/bind9!10479
2025-05-27 23:08:35 +00:00
Evan Hunt
8487e43ad9 make all ISC_LIST_FOREACH calls safe
previously, ISC_LIST_FOREACH and ISC_LIST_FOREACH_SAFE were
two separate macros, with the _SAFE version allowing entries
to be unlinked during the loop. ISC_LIST_FOREACH is now also
safe, and the separate _SAFE macro has been removed.

similarly, the ISC_LIST_FOREACH_REV macro is now safe, and
ISC_LIST_FOREACH_REV_SAFE has also been removed.
2025-05-23 13:09:10 -07:00
Nicki Křížek
94c4181442 [CVE-2025-40775] sec: test: Add a bad TSIG algorithm hypothesis python test
Closes #5300

Merge branch '5300-tsig-unknown-alg-test' into 'main'

See merge request isc-projects/bind9!10475
2025-05-23 11:30:58 +00:00
Nicki Křížek
96b0621de4 Add a bad TSIG algorithm hypothesis python test
Co-authored-by: Petr Špaček <pspacek@isc.org>
2025-05-23 10:39:52 +02:00
Alessio Podda
dc3a1bde65 chg: dev: Adaptive memory allocation strategy for qp-tries
qp-tries allocate their nodes (twigs) in chunks to reduce allocator
pressure and improve memory locality. The choice of chunk size presents
a tradeoff: larger chunks benefit qp-tries with many values (as seen
in large zones and resolvers) but waste memory in smaller use cases.

Previously, our fixed chunk size of 2^10 twigs meant that even an
empty qp-trie would consume 12KB of memory, while reducing this size
would negatively impact resolver performance.

This commit implements an adaptive chunking strategy that:
 - Tracks the size of the most recently allocated chunk.
 - Doubles the chunk size for each new allocation until reaching a
   predefined maximum.

This approach effectively balances memory efficiency for small tries
while maintaining the performance benefits of larger chunk sizes for
bigger data structures.

Merge branch 'alessio/qp-small-alloc' into 'main'

See merge request isc-projects/bind9!10245
2025-05-22 22:53:48 +00:00
Alessio Podda
d7064c9b88 Tune min and max chunk size
Before implementing adaptive chunk sizing, it was necessary to ensure
that a chunk could hold up to 48 twigs, but the new logic will size-up
new chunks to ensure that the current allocation can succeed.

We exploit the new logic in two ways:
 - We make the minimum chunk size smaller than the old limit of 2^6,
   reducing memory consumption.
 - We make the maximum chunk size larger, as it has been observed that
   it improves resolver performance.
2025-05-22 15:19:48 -07:00
alessio
70b1777d8a Adaptive memory allocation strategy for qp-tries
qp-tries allocate their nodes (twigs) in chunks to reduce allocator
pressure and improve memory locality. The choice of chunk size presents
a tradeoff: larger chunks benefit qp-tries with many values (as seen
in large zones and resolvers) but waste memory in smaller use cases.

Previously, our fixed chunk size of 2^10 twigs meant that even an
empty qp-trie would consume 12KB of memory, while reducing this size
would negatively impact resolver performance.

This commit implements an adaptive chunking strategy that:
 - Tracks the size of the most recently allocated chunk.
 - Doubles the chunk size for each new allocation until reaching a
   predefined maximum.

This approach effectively balances memory efficiency for small tries
while maintaining the performance benefits of larger chunk sizes for
bigger data structures.

This commit also splits the callback freeing qpmultis into two
phases, one that frees the underlying qptree, and one that reclaims
the qpmulti memory. In order to prevent races between the qpmulti
destructor and chunk garbage collection jobs, the second phase is
protected by reference counting.
2025-05-22 15:19:27 -07:00
Michał Kępień
13d0bab7c2 fix: doc: Update CVE checklist
Merge branch 'michal/update-cve-checklist' into 'main'

See merge request isc-projects/bind9!10473
2025-05-22 12:25:24 +00:00
Michał Kępień
65e32317e3 Fix duplicate Markdown reference
Commit 7e429463f5 added a second
definition of the "step_asn_send" reference.  Make the relevant links
distinct.
2025-05-22 14:21:04 +02:00
Michał Kępień
f8fe1bd635 Send pre-announcement emails for all ISC projects
There is no reason for the public pre-announcements of security issues
to only be sent for BIND 9.  Remove the "BIND 9 only" annotation from
the relevant checklist step as it caused confusion in practice.
2025-05-22 14:21:04 +02:00
Suzanne Goldlust
db62e8bfb9 Update CVE checklist template
Clarify a confusing step in the CVE checklist.
2025-05-22 14:21:04 +02:00
Michał Kępień
c9bf5df999 Merge tag 'v9.21.8' 2025-05-21 21:23:09 +02:00
Ondřej Surý
43f19763b3 rem: dev: Clean up the DST cryptographic API
The DST API has been cleaned up, duplicate functions has been squashed
into single call (verify and verify2 functions), and couple of unused
functions have been completely removed (createctx2, computesecret,
paramcompare, and cleanup).

Merge branch 'ondrej/dst_api-cleanup' into 'main'

See merge request isc-projects/bind9!10345
2025-05-20 23:39:34 +00:00
Ondřej Surý
8171bf01ed Deprecate max-rsa-exponent-size, always use 4096 instead
The `max-rsa-exponent-size` could limit the exponents of the RSA
public keys during the DNSSEC verification.  Instead of providing
a cryptic (not cryptographic) knob, hardcode the max exponent to
be 4096 (the theoretical maximum for DNSSEC).
2025-05-21 00:50:08 +02:00
Ondřej Surý
841b25fb62 Cleanup the DST cryptographic API
The DST API has been cleaned up, duplicate functions has been squashed
into single call (verify and verify2 functions), and couple of unused
functions have been completely removed (createctx2, computesecret,
paramcompare, and cleanup).
2025-05-20 09:52:35 +02:00
Arаm Sаrgsyаn
10a02e84eb new: usr: Implement a new 'notify-defer' configuration option
This new option sets a delay (in seconds) to wait before sending
a set of NOTIFY messages for a zone. Whenever a NOTIFY message is
ready to be sent, sending will be deferred for this duration. This
option is not to be confused with the :any:`notify-delay` option.
The default is 0 seconds.

Closes #5259

Merge branch '5259-implement-zone-notify-defer' into 'main'

See merge request isc-projects/bind9!10419
2025-05-15 13:26:44 +00:00
Aram Sargsyan
e42d6b4810 Implement a new 'notify-defer' configuration option
This new option sets the delay, in seconds, to wait before sending
a set of NOTIFY messages for a zone. Whenever a NOTIFY message is
ready to be sent, sending will be deferred for this duration.
2025-05-15 12:24:13 +00:00
Aram Sargsyan
d79b14ff5d Update the dns_zone_setnotifydelay() function's documentation
Add a note that the delay is in seconds.
2025-05-15 12:21:30 +00:00
Aram Sargsyan
62f66c0be0 Delete the unused dns_zone_getnotifydelete() function
The function is unused, delete it.
2025-05-15 12:21:30 +00:00
Arаm Sаrgsyаn
9c73285a6c fix: test: Fix catz system test errors
Merge branch 'aram/catz-system-test-errors-fix' into 'main'

See merge request isc-projects/bind9!10444
2025-05-15 12:19:46 +00:00
Aram Sargsyan
52ac03f064 Fix more catz system test errors
A quick grep check discovered a couple of more errors similar to the
one fixed in the previous commit. Fix them too.
2025-05-15 11:28:39 +00:00
Aram Sargsyan
f200b1ac18 Fix catz system test error
The '|| ret=1' is omitted from the check. This was introduced in the
b171cacf4f commit. Fix the error.
2025-05-15 11:28:39 +00:00
Michał Kępień
229a47afdb chg: test: Mark test_idle_timeout as flaky on FreeBSD 13
The test_idle_timeout check in the "timeouts" system test has been
failing often on FreeBSD 13 AWS hosts.  Adding timestamped debug logging
shows that the time.sleep() calls used in that check are returning
significantly later than asked to on that platform (e.g. after 4 seconds
when just 1 second is requested), breaking the test's timing assumptions
and triggering false positives.  These failures are not an indication of
a bug in named and have not been observed on any other platform.  Mark
the problematic check as flaky, but only on FreeBSD 13, so that other
failure modes are caught appropriately.

Merge branch 'michal/mark-test_idle_timeout-as-flaky-on-freebsd-13' into 'main'

See merge request isc-projects/bind9!10459
2025-05-14 17:17:11 +00:00
Michał Kępień
cb76b3729e Mark test_idle_timeout as flaky on FreeBSD 13
The test_idle_timeout check in the "timeouts" system test has been
failing often on FreeBSD 13 AWS hosts.  Adding timestamped debug logging
shows that the time.sleep() calls used in that check are returning
significantly later than asked to on that platform (e.g. after 4 seconds
when just 1 second is requested), breaking the test's timing assumptions
and triggering false positives.  These failures are not an indication of
a bug in named and have not been observed on any other platform.  Mark
the problematic check as flaky, but only on FreeBSD 13, so that other
failure modes are caught appropriately.
2025-05-14 09:50:33 +02:00
Evan Hunt
870c9b6a91 fix: dev: Debug level was ignored when logging to stderr
The debug level (set with the `-d` option) was ignored when running `named` with the `-g` and `-u` options.

Merge branch 'each-fix-debug-level' into 'main'

See merge request isc-projects/bind9!10453
2025-05-13 20:56:32 +00:00
Evan Hunt
96333bc6d7 debug level was ignored when logging to stderr
In commit cc167266aa, the -g option was changed so it sets both
named_g_logstderr and also named_g_logflags to use ISO style timestamps
with tzinfo. Together with an error in named_log_setsafechannels(), that
change could cause the debugging level to be ignored.
2025-05-13 12:47:23 -07:00
Michal Nowak
99b6914a94 rem: ci: Drop Ubuntu 20.04 Focal Fossa
Focal-specific ./configure options were moved to Jammy.

Merge branch 'mnowak/drop-ubuntu-focal' into 'main'

See merge request isc-projects/bind9!9899
2025-05-13 16:24:41 +00:00
Michal Nowak
84c565878e Revert "Ignore .hypothesis files created by system tests"
This reverts commit f413ddbe5f.
2025-05-13 17:03:21 +02:00
Michal Nowak
ff39441874 Make FreeBSD 12.x part of Community-Maintained platforms 2025-05-13 17:01:33 +02:00
Michal Nowak
326e19a65a Drop Ubuntu 20.04 Focal Fossa
Focal-specific ./configure options were moved to Jammy.
2025-05-13 17:00:43 +02:00
Michał Kępień
73e56aa991 chg: doc: Set up version for BIND 9.21.9
Merge branch 'michal/set-up-version-for-bind-9.21.9' into 'main'

See merge request isc-projects/bind9!10450
2025-05-12 18:38:52 +00:00
Michał Kępień
a79dec8971 Update BIND version to 9.21.9-dev 2025-05-12 20:24:12 +02:00
Michał Kępień
0119c99206 Update BIND version for release v9.21.8 2025-05-08 23:09:48 +02:00
Michał Kępień
186eda3fa4 new: doc: Prepare documentation for BIND 9.21.8
Merge branch 'michal/prepare-documentation-for-bind-9.21.8' into 'v9.21.8-release'

See merge request isc-private/bind9!796
2025-05-08 21:08:02 +00:00
Michał Kępień
44c37b19f0 Reorder release notes 2025-05-08 22:51:59 +02:00
Michał Kępień
ad6fac37e7 Tweak and reword release notes 2025-05-08 22:51:59 +02:00
Michał Kępień
29739a21d4 Prepare release notes for BIND 9.21.8 2025-05-08 22:51:59 +02:00
Michał Kępień
3388084860 Generate changelog for BIND 9.21.8 2025-05-08 22:51:59 +02:00
Michał Kępień
1665e05438 [CVE-2025-40775] sec: usr: Prevent assertion when processing TSIG algorithm
DNS messages that included a Transaction Signature (TSIG) containing an
invalid value in the algorithm field caused :iscman:`named` to crash
with an assertion failure. This has been fixed.  :cve:`2025-40775`

See isc-projects/bind9#5300

Merge branch '5300-confidential-tsig-unknown-alg' into 'v9.21.8-release'

See merge request isc-private/bind9!793
2025-05-08 22:45:48 +02:00