Commit graph

39759 commits

Author SHA1 Message Date
Nicki Křížek
e7806db2a9 Move param to isctest.util
(cherry picked from commit 481b46ffcc)
2025-06-19 15:45:48 +02:00
Nicki Křížek
8867994e0d Improve logging from isctest.run.retry_with_timeout
Allow use of exception (and by extension, assert statements) in the
called function in order to extract essential debug information about
the type of failure that was encountered.

In case the called function fails to succeed on the last retry and
raised an exception, log it as error and set it as the assert message to
propagate it through the pytest framework.

(cherry picked from commit 620c884133)
2025-06-19 15:18:32 +02:00
Matthijs Mekking
df417186ef [9.18] fix: usr: Fix purge-keys bug when using views
Previously, when a DNSSEC key was purged by one zone view, other zone views would return an error about missing key files. This has been fixed.

Closes #5315

Backport of MR !10550

Merge branch 'backport-5315-fix-spurious-some-key-files-are-missing-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10599
2025-06-19 10:08:55 +00:00
Matthijs Mekking
5f589541bc Fix spurious missing key files log messages
This happens because old key is purged by one zone view, then the other
is freaking out about it.

Keys that are unused or being purged should not be taken into account
when verifying key files are available.

The keyring is maintained per zone. So in one zone, a key in the
keyring is being purged. The corresponding key file is removed.

The key maintenance is done for the other zone view. The key in that
keyring is not yet set to purge, but its corresponding key file is
removed. This leads to "some keys are missing" log errors.

We should not check the purge variable at this point, but the
current time and purge-keys duration.

This commit fixes this erroneous logic.

(cherry picked from commit d494698852)
2025-06-19 11:35:01 +02:00
Matthijs Mekking
6d72f5ba41 Test purge-keys with views
Create a test scenario where a signed zone is in multiple views and
then a key may be purged. This is a bug case where the key files are
removed by one view and then the other view starts complaining.

Note: This commit was manually modified because 9.18 does not have
pytest based kasp system tests. The test was translated to a shell
script style test case.

(cherry picked from commit 752d8617f5)
2025-06-19 11:25:53 +02:00
Mark Andrews
9e89762370 [9.18] new: usr: Add support to set and display the CO flag
Add support to display the CO (Compact denial of existence Ok flag) when displaying messages.

Add support to set the CO flag when making queries in dig (+coflag).

Closes #5319

Backport of MR !10482

Merge branch 'backport-5319-add-support-to-set-and-display-the-co-flag-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10579
2025-06-13 11:16:34 +00:00
Mark Andrews
d23d04d6aa Add "undefined" to +ednsflags description
Reflow help message.

(cherry picked from commit bbfb7ebda2)
2025-06-13 20:40:59 +10:00
Mark Andrews
0890fba57b Add tests for 'dig +coflag'
(cherry picked from commit c56af212f0)
2025-06-13 20:39:19 +10:00
Mark Andrews
4ff67b1889 Add CO support to dig
Dig now support setting the EDNS CO as flag using "+coflag" /
"+nocoflag" rather than as part of +ednsflags.

(cherry picked from commit 6c28411c55)
2025-06-13 20:39:17 +10:00
Mark Andrews
0aabb0b020 [9.18] fix: test: test_xferquota.py reloads zone file too fast
Add a 1 second delay to ensure file time stamp is different
from last load.

Closes #5366

Backport of MR !10571

Merge branch 'backport-5366-test_xferquota-py-reloads-zone-file-too-fast-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10576
2025-06-13 08:19:31 +00:00
Mark Andrews
85c2e78edc changing.db is updated too fast
ensure a second has elasped before updating the zone file
by adding 'time.sleep(1)' to xferquota/tests_xferquota.py

(cherry picked from commit d8d14cb780)
2025-06-13 07:11:10 +00:00
Evan Hunt
0e55c3b5fe [9.18] fix: test: Prevent .hypothesis artifacts in system test directories
Backport of MR !10518

Merge branch 'backport-each-hypothesis-artifacts-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10549
2025-06-03 08:17:56 +00:00
Evan Hunt
3de9d6f8df Prevent .hypothesis artifacts in system test directories
The "run.sh" script, used by "make test", changes the working
directory to the system test directory before executing pytest.
If the test drops hypothesis artifacts while running, this
can cause spurious test failures due to an apparent mismatch
between the contents of the system test directory and the
temporary pytest directory. This has been addressed by having
"run.sh" call pytest from the parent directory instead.

(cherry picked from commit c08e78ef73)
2025-06-03 07:38:47 +00:00
Mark Andrews
d95caf1b4f [9.18] fix: nil: Extend named-rrchecker multi-line parsing support
named-rrchecker now parses the braces which support multi-line input 
from the beginning of the input rather than only when reading the 
data fields of the record.

Closes #5336

Backport of MR !10521

Merge branch 'backport-5336-extend-named-rrchecker-multiline-support-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10547
2025-06-03 03:03:35 +00:00
Mark Andrews
51893cd65b Add various multi-line inputs to named-rrchecker
(cherry picked from commit 5f882f95fe)
2025-06-03 02:27:51 +00:00
Mark Andrews
d3e6b9a6f1 Extend named-rrchecker multi-line parsing support
named-rrchecker now parses the braces which support multi-line input
from the beginning of the input rather than only when reading the
data fields of the record.

(cherry picked from commit 2e1f933d65)
2025-06-03 02:27:51 +00:00
Petr Špaček
e39c390f7f [9.18] chg: ci: Revert Run CI danger job even if user canceled it while it was running
Unexpectedly this broke CI job generator which parses gitlab-ci.yaml
and cannot handle `!reference` YAML tags.

This reverts merge request !10490

Backport of MR !10540

Merge branch 'backport-revert-0a1a599f-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10542
2025-06-02 16:16:21 +00:00
Petr Špaček
3e3b730c8e Revert "chg: ci: Run CI danger job even if user canceled it while it was running"
This reverts merge request !10490

(cherry picked from commit 304638b0b2)
2025-06-02 16:14:08 +00:00
Petr Špaček
4868fbff00 [9.18] fix: doc: named-rrchecker doc improvements
Backport of MR !10516

Merge branch 'backport-pspacek/named-rrchecker-docs-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10538
2025-06-02 14:38:38 +00:00
Petr Špaček
ce484c71a7 Fix link to TXT RRtype specification
The odd-looking "\ " escape is required to italicize <character-string>
without italicizing the final "s". See reStructuredText Markup
Specification, sections "Inline markup recognition rules" and "Escaping
Mechanism". Most importantly:

Escaped whitespace characters are removed from the output document
together with the escaping backslash. This allows for character-level
inline markup.

(cherry picked from commit 43c5b9aeb4)
2025-06-02 14:23:10 +00:00
Petr Špaček
031df57a6c Add exhaustive examples for named-rrchecker
(cherry picked from commit 46173778ce)
2025-06-02 14:23:10 +00:00
Petr Špaček
366054ff2c Clarify named-rrchecker return codes
(cherry picked from commit c986d37f24)
2025-06-02 14:23:10 +00:00
Petr Špaček
ac2992b86f Clarify named-rrchecker command line parameters
(cherry picked from commit c440c418db)
2025-06-02 14:23:10 +00:00
Petr Špaček
a29912a4fc Clarify named-rrchecker input format
(cherry picked from commit 5c370d9e6b)
2025-06-02 14:23:10 +00:00
Petr Špaček
4a22654836 [9.18] chg: ci: Run CI danger job even if user canceled it while it was running
Backport of MR !10490

Merge branch 'backport-pspacek/always-hazard-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10535
2025-06-02 12:08:54 +00:00
Petr Špaček
77d10b30c7 Run CI danger job even if user canceled it while it was running
Limitation: The after_script is not executed if the job did not start at
all, i.e. if the user canceled the job before it got onto a runner.
See https://gitlab.com/groups/gitlab-org/-/epics/10158

(cherry picked from commit 33bc2628b7)
2025-06-02 12:03:47 +00:00
Michal Nowak
a935316d57 [9.18] chg: test: Use "digit" class instead of character range in rndc_dumpdb()
The tr range did not work on Solaris 11.4. Let's use a class that is
defined in POSIX.

Closes #5326

Backport of MR !10530

Merge branch 'backport-5326-make-rndc_dumpdb-work-on-solaris-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10533
2025-06-02 12:02:08 +00:00
Michal Nowak
0c900e4a6a
Use "digit" class instead of character range in rndc_dumpdb()
The tr range did not work on Solaris 11.4. Let's use a class that is
defined in POSIX.

(cherry picked from commit baa5ccd795)
2025-06-02 13:29:00 +02:00
Petr Špaček
68a821eaf7 [9.18] chg: doc: Add text about no bug bounties
Vicky and Ondrej have agreed that we should add text to explain that we do not give bug bounties.

Backport of MR !10246

Merge branch 'backport-sgoldlust-main-bug-bounty-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10528
2025-06-02 07:11:55 +00:00
Suzanne Goldlust
200439d21e Update URL for bug reports
(cherry picked from commit 67cd4f9743)
2025-06-02 07:04:27 +00:00
Suzanne Goldlust
d540464920 Add text about no bug bounties
(cherry picked from commit 11269e1a18)
2025-06-02 07:04:27 +00:00
Mark Andrews
a093b913cd [9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!10506
2025-05-29 23:42:07 +00:00
Mark Andrews
274077aeb9 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 72cd6e8591)
2025-05-29 23:10:13 +00:00
Michal Nowak
a22e941ad2 [9.18] chg: ci: Replace Oracle Linux Docker images with AlmaLinux ones
To be consistent with the replacing of Oracle Linux QCOW2 images with
AlmaLinux AWS AMIs, also replace Docker images.

Backport of MR !10434

Merge branch 'backport-mnowak/replace-oracle-linux-with-almalinux-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10513
2025-05-29 15:58:03 +00:00
Michal Nowak
6789423f9a
Replace Oracle Linux Docker images with AlmaLinux ones
To be consistent with the replacing of Oracle Linux QCOW2 images with
AlmaLinux AWS AMIs, also replace Docker images.

(cherry picked from commit 63947a2062)
2025-05-29 17:25:00 +02:00
Nicki Křížek
84b459c757 [9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!10508
2025-05-29 12:03:59 +00:00
Nicki Křížek
cfdaf1b349 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 0aff715f40)
2025-05-29 13:27:27 +02:00
Ondřej Surý
6c216c18d0 [9.18] fix: dev: Set name for all the isc_mem contexts
Backport of MR !10425

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

See merge request isc-projects/bind9!10499
2025-05-29 04:15:35 +00:00
Ondřej Surý
2c5f8e732e
Set name for all the isc_mem context
The memory context for dlz_dlopen_driver unit 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 5d264b3329)
2025-05-29 05:42:56 +02:00
Colin Vidal
41d83b02ae [9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!10494
2025-05-28 21:10:22 +00:00
Colin Vidal
3bcc24df93 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 f84065a32c)
2025-05-28 20:53:30 +02:00
Petr Špaček
7a8c5abd85 [9.18] chg: doc: Update security issue reporting procedure
Backport of MR !10487

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

See merge request isc-projects/bind9!10492
2025-05-28 14:58:21 +00:00
Petr Špaček
2aa234e674 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 cc60cc9a32)
2025-05-28 14:54:22 +00:00
Nicki Křížek
5f4ce118ea [9.18] [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.18' into 'bind-9.18'

See merge request isc-projects/bind9!10477
2025-05-23 15:12:22 +00:00
Nicki Křížek
d59665b64b Add a bad TSIG algorithm hypothesis python test
Co-authored-by: Petr Špaček <pspacek@isc.org>
(cherry picked from commit 96b0621de4)
2025-05-23 16:58:37 +02:00
Michał Kępień
6868a9ea4a Merge tag 'v9.18.37' into bind-9.18 2025-05-21 21:25:08 +02:00
Michał Kępień
fa9d0b6549 [9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!10462
2025-05-14 18:02:45 +00:00
Michał Kępień
4646510fc9 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 cb76b3729e)
2025-05-14 17:18:57 +00:00
Michal Nowak
feedb73c8e [9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!10456
2025-05-13 17:29:27 +00:00
Michal Nowak
aa97e246ba
Make FreeBSD 12.x part of Community-Maintained platforms
(cherry picked from commit ff39441874)
2025-05-13 18:37:48 +02:00