2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

43024 Commits

Author SHA1 Message Date
Nicki Křížek
62fa80eb5a [9.20] fix: test: Fix intermittent kasp pytest failures
The `pytest` cases checks if a zone is signed by looking at the `NSEC` record at the apex. If that has an RRSIG record, it is considered signed. But `named` signs zones incrementally (in batches) and so the zone may still lack some signatures. In other words, the tests may consider a zone signed while in fact signing is not yet complete, then performs additional checks such as is a subdomain signed with the right key. If this check happens before the zone is actually fully
signed, the check will fail.

Fix this by using `check_dnssec_verify` instead of `check_is_zone_signed`. We were already doing this check, but we now move it up. This will transfer the zone and then run `dnssec-verify` on the response. If the zone is partially signed, the check will fail, and it will retry for up to ten times.

Closes #5303

Backport of MR !10445

Merge branch 'backport-5303-kasp-pytest-intermittent-test-failures-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10510
2025-05-29 13:12:52 +00:00
Matthijs Mekking
d2a6af1906 Fix intermittent kasp pytest failures
The pytest cases checks if a zone is signed by looking at the NSEC
record at the apex. If that has an RRSIG record, it is considered
signed. But 'named' signs zones incrementally (in batches) and so
the zone may still lack some signatures. In other words, the tests
may consider a zone signed while in fact signing is not yet complete,
then performs additional checks such as is a subdomain signed with the
right key. If this check happens before the zone is actually fully
signed, the check will fail.

Fix this by using 'check_dnssec_verify' instead of
'check_is_zone_signed'. We were already doing this check, but we now
move it up. This will transfer the zone and then run 'dnssec-verify'
on the response. If the zone is partially signed, the check will fail,
and it will retry for up to ten times.

(cherry picked from commit 7a31fd57e2fbb9b4a4cdf169698425742f407b18)
2025-05-29 12:35:22 +00:00
Nicki Křížek
08d72fef7c [9.20] chg: test: Add utility module to import correct version of hypothesis
On FIPS-enabled platforms, we need to ensure a minimal version of
hypothesis which no longer uses MD5. This doesn't need to be enforced
for other platforms.

Move the import magic to a utility module to avoid copy-pasting the
boilerplate code around.

Backport of MR !10442

Merge branch 'backport-nicki/pytest-import-hypothesis-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10507
2025-05-29 11:18:23 +00:00
Nicki Křížek
1c08636cbc Ensure supported version of hypothesis is available
On FIPS-enabled platforms, we need to ensure a minimal version of
hypothesis which no longer uses MD5. This doesn't need to be enforced
for other platforms.

Move the import magic to a utility module to avoid copy-pasting the
boilerplate code around.

(cherry picked from commit 0aff715f4040abd21f0bce9d48a2dc3f99186697)
2025-05-29 09:04:30 +00:00
Mark Andrews
6b6659e1e7 [9.20] fix: nil: silence tainted scalar in client.c
Coverity detected that 'optlen' was not being checked in 'process_opt'.  
This is actually already done when the OPT record was initially  
parsed.  Add an INSIST to silence Coverity as is done in message.c.

Closes #5330

Backport of MR !10500

Merge branch 'backport-5330-tainted-scalar-in-client-c-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10505
2025-05-29 08:01:23 +00:00
Mark Andrews
2ecac031ba Silence tainted scalar in client.c
Coverity detected that 'optlen' was not being checked in 'process_opt'.
This is actually already done when the OPT record was initially
parsed.  Add an INSIST to silence Coverity as is done in message.c.

(cherry picked from commit 72cd6e85916e02fe7f51806eb25ee0c5a973398a)
2025-05-29 07:01:00 +00:00
Ondřej Surý
bdcd698edf [9.20] fix: dev: Set name for all the isc_mem contexts
Backport of MR !10425

Merge branch 'backport-ondrej/fix-isc_mem_setname-usage-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10498
2025-05-29 04:34:24 +00:00
Ondřej Surý
1945fbc0dc
Set name for all the isc_mem context
The memory context for managers and dlz_dlopen_driver units had no name
and that was causing trouble with the statistics channel output.  Set
the name for the two memory context that were missing a proper name.

(cherry picked from commit 5d264b33295d164d55659b166ead7b31b92eda39)
2025-05-29 05:45:12 +02:00
Ondřej Surý
66fc4ee86e [9.20] fix: usr: Fix zone deletion issue
A secondary zone could initiate a new zone transfer from the
primary server after it had been already deleted from the
secondary server, and before the internal garbage collection
was activated to clean it up completely. This has been fixed.

Closes #5291

Backport of MR !10449

Merge branch 'backport-5291-zone-delete-bug-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10496
2025-05-28 19:04:49 +00:00
Aram Sargsyan
80a43c9241 Prepare a zone for shutting down when deleting it from a view
After b171cacf4f0123ba96bef6eedfc92dfb608db6b7, a zone object can
remain in the memory for a while, until garbage collection is run.
Setting the DNS_ZONEFLG_EXITING flag should prevent the zone
maintenance function from running while it's in that state.
Otherwise, a secondary zone could initiate a zone transfer after
it had been deleted.

(cherry picked from commit 874ca5ca2f1f381e434304e262ea08e77e3bdf65)
2025-05-28 18:30:45 +00:00
Ondřej Surý
f09bb8b88c [9.20] fix: usr: Fix a zone refresh bug
A secondary zone could fail to further refresh with new
versions of the zone from a primary server if named was
reconfigured during the SOA request step of an ongoing
zone transfer. This has been fixed.

Closes #5307

Backport of MR !10468

Merge branch 'backport-5307-zone-refresh-stuck-after-reconfiguration-fix-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10495
2025-05-28 17:53:22 +00:00
Aram Sargsyan
fa974811a9
Emit a ISC_R_CANCELED result instead of ISC_R_SHUTTINGDOWN
When request manager shuts down, it also shuts down all its ongoing
requests. Currently it calls their callback functions with a
ISC_R_SHUTTINGDOWN result code for the request. Since a request
manager can shutdown not only during named shutdown but also during
named reconfiguration, instead of sending ISC_R_SHUTTINGDOWN result
code send a ISC_R_CANCELED code to avoid confusion and errors with
the expectation that a ISC_R_SHUTTINGDOWN result code can only be
received during actual shutdown of named.

All the callback functions which are passed to either the
dns_request_create() or the dns_request_createraw() functions have
been analyzed to confirm that they can process both the
ISC_R_SHUTTINGDOWN and ISC_R_CANCELED result codes. Changes were
made where it was necessary.

(cherry picked from commit f4cd307c6b705e13c45136ac4dc49e262a598297)
2025-05-28 19:18:19 +02:00
Aram Sargsyan
20eb80333e
Test named reconfiguration during zone transfer's SOA request
This new test checks that named can correctly process an interrupted
SOA request during zone transfer, caused by reconfiguration.

Co-authored-by: Michał Kępień <michal@isc.org>
(cherry picked from commit aa6ca3e77682462ed3af8bc42ea8590addba6626)
2025-05-28 19:18:19 +02:00
Aram Sargsyan
0d1251a2ec
Add a debug log in zone.c:refresh_callback()
The new debug message logs the request result in the SOA request
callback function.

(cherry picked from commit b07ec4f0b3429f688d35d2694f56cffc9d3ac56b)
2025-05-28 19:18:19 +02:00
Aram Sargsyan
7b46d898b6
Fix a zone refresh bug in zone.c:refresh_callback()
When the zone.c:refresh_callback() callback function is called during
a SOA request before a zone transfer, it can receive a
ISC_R_SHUTTINGDOWN result for the sent request when named is shutting
down, and in that case it just destroys the request and finishes the
ongoing transfer, without clearing the DNS_ZONEFLG_REFRESH flag of the
zone. This is alright when named is going to shutdown, but currently
the callback can get a ISC_R_SHUTTINGDOWN result also when named is
reconfigured during the ongoibg SOA request. In that case, leaving the
DNS_ZONEFLG_REFRESH flag set results in the zone never being able
to refresh again, because any new attempts will be caneled while
the flag is set. Clear the DNS_ZONEFLG_REFRESH flag on the 'exiting'
error path of the callback function.

(cherry picked from commit 228e441328af8f3a54c1ae3f0cd7b871dab83609)
2025-05-28 19:01:33 +02:00
Colin Vidal
4709cb4fa2 [9.20] fix: test: enable shell-based rndc system tests
Enable existing rndc system tests (the python test function calling the
shell file was missing). Also update the extra artifacts list to remove
one generated file which was left behind.

Backport of MR !10489

Merge branch 'backport-colin/rndc-tests-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10493
2025-05-28 16:19:32 +00:00
Colin Vidal
d85610f07d enable shell-based rndc system tests
Enable existing rndc system tests (the python test function calling the
shell file was missing). Also update the extra artifacts list to remove
one generated file which was left behind.

(cherry picked from commit f84065a32c393daa32e8236b440ac6f2ecdeedc8)
2025-05-28 15:44:58 +00:00
Petr Špaček
0c1ada11d4 [9.20] chg: doc: Update security issue reporting procedure
Backport of MR !10487

Merge branch 'backport-pspacek/update-reporting-procedure-sec-md-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10491
2025-05-28 14:58:37 +00:00
Petr Špaček
75ea8e5ec4 Update security issue reporting procedure
We have a new template for people to use. It saves lots of back and
forth if people use it.

(cherry picked from commit cc60cc9a3249665edf5dcef33b526b8669138e51)
2025-05-28 14:54:17 +00:00
Petr Špaček
39f1092cac [9.20] chg: test: DNSTAP test cleanup
Backport of MR !10478

Merge branch 'backport-pspacek/dnstap-test-cleanup-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10488
2025-05-28 12:02:34 +00:00
Petr Špaček
4650a1b065 Use Pytest mark to guard dnstap features
(cherry picked from commit 889b36016718bbb61167b46f9483113688b76c0d)
2025-05-28 13:27:44 +02:00
Petr Špaček
a6e16b76b2 Fix DNSTAP feature detection for pytest
(cherry picked from commit 313a985dfcc1cd44749b11a3596ca6346913996e)
2025-05-28 13:27:42 +02:00
Petr Špaček
ddbcf9192c Port dnstap test to use isctest utilities
(cherry picked from commit f176acdfcc813cfc870ca9d4cbec525d23ece314)
2025-05-28 11:17:30 +00:00
Evan Hunt
7f0f7168d0 [9.20] 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.

Backport of MR !10466

Merge branch 'backport-each-fix-message-requires-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10484
2025-05-28 00:21:07 +00:00
Evan Hunt
11aa50ec83 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.

(cherry picked from commit c437da59ee78df59ce8708fa87a489154745a383)
2025-05-27 16:44:24 -07:00
Nicki Křížek
2592fb319e [9.20] [CVE-2025-40775] sec: test: Add a bad TSIG algorithm hypothesis python test
Closes #5300

Backport of MR !10475

Merge branch 'backport-5300-tsig-unknown-alg-test-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10476
2025-05-23 12:10:31 +00:00
Nicki Křížek
e77b1275a0 Add a bad TSIG algorithm hypothesis python test
Co-authored-by: Petr Špaček <pspacek@isc.org>
(cherry picked from commit 96b0621de4b56795646dfa67cb47225216f4cab5)
2025-05-23 11:31:42 +00:00
Michał Kępień
6ba6648935 Merge tag 'v9.20.9' into bind-9.20 2025-05-21 21:24:23 +02:00
Arаm Sаrgsyаn
a24db6433e [9.20] 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

Backport of MR !10419

Merge branch 'backport-5259-implement-zone-notify-defer-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10465
2025-05-16 13:23:04 +00:00
Aram Sargsyan
a90e3b9e6f 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.

(cherry picked from commit e42d6b48108e6c879fb7d152194708b0cb6d62b0)
2025-05-16 09:58:48 +00:00
Aram Sargsyan
0dd96098f9 Update the dns_zone_setnotifydelay() function's documentation
Add a note that the delay is in seconds.

(cherry picked from commit d79b14ff5dbda45507a185f4e557e8097b483620)
2025-05-15 13:29:13 +00:00
Aram Sargsyan
53c9817b29 Delete the unused dns_zone_getnotifydelete() function
The function is unused, delete it.

(cherry picked from commit 62f66c0be02e2dccf2517908a63ebead1984a29a)
2025-05-15 13:29:13 +00:00
Arаm Sаrgsyаn
832ab721bb [9.20] fix: test: Fix catz system test errors
Backport of MR !10444

Merge branch 'backport-aram/catz-system-test-errors-fix-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10464
2025-05-15 13:26:17 +00:00
Aram Sargsyan
cdd8f5f966 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.

(cherry picked from commit 52ac03f0643cbc85493ca43c717a2c8dde080db8)
2025-05-15 12:20:19 +00:00
Aram Sargsyan
1930dbf749 Fix catz system test error
The '|| ret=1' is omitted from the check. This was introduced in the
b171cacf4f0123ba96bef6eedfc92dfb608db6b7 commit. Fix the error.

(cherry picked from commit f200b1ac18e8085e0689656da1af2f59d84db4ee)
2025-05-15 12:20:19 +00:00
Michał Kępień
5290dd3528 [9.20] 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.

Backport of MR !10459

Merge branch 'backport-michal/mark-test_idle_timeout-as-flaky-on-freebsd-13-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10461
2025-05-14 17:57:59 +00:00
Michał Kępień
9e6c8f1637 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.

(cherry picked from commit cb76b3729e082f6c1ac0fbf608cee9bcb879cefa)
2025-05-14 17:18:53 +00:00
Michal Nowak
551967f410 [9.20] rem: ci: Drop Ubuntu 20.04 Focal Fossa
Focal-specific ./configure options were moved to Jammy.

Backport of MR !9899

Merge branch 'backport-mnowak/drop-ubuntu-focal-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10455
2025-05-13 17:25:31 +00:00
Michal Nowak
3682ccecb5 Revert "Ignore .hypothesis files created by system tests"
This reverts commit f413ddbe5f2edfdeedc41603dcd2afe105ed2844.

(cherry picked from commit 84c565878eaad5be9775c2569dcb51e262f19c11)
2025-05-13 16:26:24 +00:00
Michal Nowak
37cd7daf13 Make FreeBSD 12.x part of Community-Maintained platforms
(cherry picked from commit ff39441874fd234ac03567d04d8f3dad0f777b1d)
2025-05-13 16:26:24 +00:00
Michal Nowak
c9b79d0a77 Drop Ubuntu 20.04 Focal Fossa
Focal-specific ./configure options were moved to Jammy.

(cherry picked from commit 326e19a65ae511df56c8a32c49d011052186774f)
2025-05-13 16:26:24 +00:00
Michał Kępień
24870ca4ea chg: doc: Set up version for BIND 9.20.10
Merge branch 'michal/set-up-version-for-bind-9.20.10' into 'bind-9.20'

See merge request isc-projects/bind9!10452
2025-05-12 18:38:56 +00:00
Michał Kępień
07297e0e60 Update BIND version to 9.20.10-dev 2025-05-12 20:24:39 +02:00
Michał Kępień
98f2a5b7f4
Update BIND version for release v9.20.9 2025-05-08 23:10:54 +02:00
Michał Kępień
c70bb7aa06 new: doc: Prepare documentation for BIND 9.20.9
Merge branch 'michal/prepare-documentation-for-bind-9.20.9' into 'v9.20.9-release'

See merge request isc-private/bind9!797
2025-05-08 21:08:05 +00:00
Michał Kępień
a2fdb1a5d6
Reorder release notes 2025-05-08 22:53:43 +02:00
Michał Kępień
51dee8510c
Tweak and reword release notes 2025-05-08 22:53:43 +02:00
Michał Kępień
58f6b1aac5
Prepare release notes for BIND 9.20.9 2025-05-08 22:53:43 +02:00
Michał Kępień
4d92246e63
Generate changelog for BIND 9.20.9 2025-05-08 22:53:43 +02:00
Michał Kępień
b8c198ac5c [9.20] [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`

Backport of !793

See isc-projects/bind9#5300

Merge branch '5300-confidential-tsig-unknown-alg-bind-9.20' into 'v9.20.9-release'

See merge request isc-private/bind9!795
2025-05-07 11:46:13 +00:00