Commit Graph
37559 Commits
Author SHA1 Message Date
Mark Andrews 6cdeb5b046 Kill unit tests that run more than 1200 seconds
The CI doesn't provide useful forensics when a system test locks
up.  Fork the process and kill it with ABRT if it is still running
after 20 minutes.  Pass the exit status to the caller.

(cherry picked from commit 3d5c7cd46c)
2023-04-03 11:11:26 +10:00
Ondřej Surý 93efd7389f Merge branch '3982-remove-isc_fsaccess-API--9.18' into 'bind-9.18'
[9.18] Replace isc_fsaccess API with more secure file creation

See merge request isc-projects/bind9!7767
2023-03-31 16:01:45 +00:00
Ondřej Surý 7e0319b957 Add CHANGES note for [GL #3982]
(cherry picked from commit f853672e41)
2023-03-31 16:47:15 +02:00
Ondřej Surý 718893ece4 Replace isc_fsaccess API with more secure file creation
The isc_fsaccess API was created to hide the implementation details
between POSIX and Windows APIs.  As we are not supporting the Windows
APIs anymore, it's better to drop this API used in the DST part.

Moreover, the isc_fsaccess was setting the permissions in an insecure
manner - it operated on the filename, and not on the file descriptor
which can lead to all kind of attacks if unpriviledged user has read (or
even worse write) access to key directory.

Replace the code that operates on the private keys with code that uses
mkstemp(), fchmod() and atomic rename() at the end, so at no time the
private key files have insecure permissions.

(cherry picked from commit 263d232c79)
2023-03-31 16:47:15 +02:00
Ondřej Surý dcea09a327 Add isc_os_umask() function to get current umask
As it's impossible to get the current umask without modifying it at the
same time, initialize the current umask at the program start and keep
the loaded value internally.  Add isc_os_umask() function to access the
starttime umask.

(cherry picked from commit aca7dd3961)
2023-03-31 16:47:15 +02:00
Matthijs Mekking 02bcff70aa Merge branch 'matthijs-checkconf-kasp-test-bug-9.18' into 'bind-9.18'
[9.18] Fix kasp system test bug

See merge request isc-projects/bind9!7764
2023-03-31 09:18:15 +00:00
Matthijs Mekking d74557ba35 Fix kasp system test bug
This test was succeeding for the wrong reason (policy not found, rather
than bad key length).

(cherry picked from commit 106497b011)
2023-03-31 10:34:27 +02:00
Artem Boldariev 846b893a46 Merge branch '3966-backport-tlsstream-connectcb-behaviour-from-main-to-v9.18' into 'bind-9.18'
[9.18] TLS Stream: backport connect callback handling behaviour from main

See merge request isc-projects/bind9!7753
2023-03-30 16:41:08 +00:00
Artem Boldariev d1d4f6e362 TLS Stream: backport connect callback handling behaviour from main
This commit contains the backport of the behaviour for handling TLS
connect callbacks when wrapping up.

The current behaviour have not caused any problems to us, yet, but we
are changing it to remain on the safer side.
2023-03-30 18:37:21 +03:00
Matthijs Mekking c3cbd09027 Merge branch '3967-linkfix-dnssec-guide-9.18' into 'bind-9.18'
[9.18] linkfix in dnssec-guide/validation.rst

See merge request isc-projects/bind9!7746
2023-03-29 15:07:00 +00:00
Matthijs Mekking f6f99d1b82 Add CHANGES for #3967
(cherry picked from commit 5a879028fe)
2023-03-29 16:14:47 +02:00
Matthijs Mekking 30e12e3a24 Remove dead link to resolver test
The doc file doc/dnssec-guide/validation.rst points to a resolver test
site that is now down. Remove the dead link.

(cherry picked from commit 8e78f8fc0f)
2023-03-29 16:14:16 +02:00
Matthijs Mekking 44ccc0b9d0 Merge branch '3965-source-never-read-master.c-v9_18' into 'bind-9.18'
[9.18] Fix scan-build issue: initialized value never read

See merge request isc-projects/bind9!7738
2023-03-29 14:11:49 +00:00
Matthijs Mekking b719991230 Add CHANGES entry for #3965
(cherry picked from commit 357b27b04f)
2023-03-29 13:31:49 +00:00
Matthijs Mekking 9874a26686 Fix scan-build issue: initialized value never read
Value stored to 'source' during its initialization is never read.

(cherry picked from commit 4c33277446)
2023-03-29 13:31:49 +00:00
Ondřej Surý 32768d9c94 Merge branch 'ondrej/fix-isc_nm_httpconnect-to-check-for-shuttingdown--9.18' into 'bind-9.18'
[9.18]: Fix isc_nm_httpconnect to check for shuttindown condition

See merge request isc-projects/bind9!7744
2023-03-29 08:17:22 +00:00
Ondřej Surý 3e9bce0a7a Fix isc_nm_httpconnect to check for shuttindown condition
The isc_nm_httpconnect() would succeed even if the netmgr would be
already shuttingdown.  This has been fixed and the unit test has been
updated to cope with fact that the handle would be NULL when
isc_nm_httpconnect() returns with an error.

(cherry picked from commit 665f8bb78d)
2023-03-29 08:27:05 +02:00
Michal Nowak 824378d876 Merge branch 'mnowak/drop-unit-and-system-test-jobs-9.18' into 'bind-9.18'
[9.18] Drop unit and system tests on amd64cross32

See merge request isc-projects/bind9!7740
2023-03-28 14:40:39 +00:00
Michal Nowak d7bbc52c3a Drop "unstable" Debian "bullseye" unit and system jobs
"Unstable" Debian "bullseye" unit and system jobs differ from unit and
system jobs on the Debian "bullseye" image by running a few more tests
enabled by the CI_ENABLE_ALL_TESTS environmental variable.  These tests
are no less stable than the rest, and thus to have distinct jobs for
them wastes resources.

Run "unstable" unit and system tests as part of stock Debian "bullseye"
jobs.

(cherry picked from commit 2b9111b435)
2023-03-28 16:36:24 +02:00
Michal Nowak 01b5a69f73 Drop unit and system tests on amd64cross32
amd64cross32 jobs run a cross-compiled 32-bit BIND 9 on the 64-bit
platform. This approach brings no build issues, and it is a good way to
catch 32-bit issues in BIND 9 code-base and ensure cross-compilation
keeps working.

Unfortunately, running unit and system tests is a problem:

- #3269 - doth-ns1 frequently failed to start
- #3316 - quota_test sometimes fails to create new thread
- #3956 - tcp-ns1 sometimes fails to allocate memory

There's little value in running unit and system tests on the
amd64cross32 platform, and it only means the effort spent by QA by
looking into what turns out to be 32-bit limitations.

(cherry picked from commit f86d4f3bd8)
2023-03-28 16:36:24 +02:00
Tom Krizek 5b13b5df74 Merge branch 'tkrizek/gh-actions-branch-name-update-9.18' into 'bind-9.18'
[9.18] Update branch&tag name conventions

See merge request isc-projects/bind9!7734
2023-03-27 15:47:41 +00:00
Tom Krizek 340166ef28 Update branch&tag naming convention in CONTRIBUTING
(cherry picked from commit 5248a3e7db)
2023-03-27 17:39:37 +02:00
Tom Krizek 763bb3afce Update github actions to trigger on correct branches
The naming convention for maintanence branches was changed from `vX_Y`
to `bind-X.Y`.

(cherry picked from commit ee53e3c02d)
2023-03-27 17:39:35 +02:00
Tom Krizek d82bf3b04f Merge branch '3962-doc-arm-fixes-9.18' into 'bind-9.18'
[9.18] Documentation formatting fixes in ARM

See merge request isc-projects/bind9!7732
2023-03-27 15:37:39 +00:00
Tom Krizek 86d23a1d9c Apply suppress_grammar directive in ARM docs
With a newline before the :suppress_grammar: directive, it wasn't
actually interpreted as a directive, but rather as node content.
Therefore, the directive was ignored and the grammar was incorrectly
printed out.

(cherry picked from commit 36a5c098bd)
2023-03-27 17:08:31 +02:00
Tom Krizek 90842d1f8d Add missing newline in documentation code example
(cherry picked from commit 1849c02606)
2023-03-27 17:08:29 +02:00
Michal Nowak 98541aaaae Merge branch 'mnowak/suppress-gitlab-clean-up-output-9.18' into 'bind-9.18'
[9.18] Suppress Git clean output in GitLab CI

See merge request isc-projects/bind9!7729
2023-03-27 13:12:03 +00:00
Michal Nowak 0f6d1c6a54 Suppress Git clean output in GitLab CI
Git clean in GitLab CI can take up to a thousand lines, thus cluttering
the output for no good reason.

The default GitLab GIT_CLEAN_FLAGS variable is extended with "q" as in
"quiet.

(cherry picked from commit ddb33a12fc)
2023-03-27 15:11:07 +02:00
Petr Špaček 98d7846d22 Merge branch 'pspacek/qmin-docs-describe-underscore-9.18' into 'bind-9.18'
[9.18] Clarify qname-minimization relaxed in the ARM

See merge request isc-projects/bind9!7728
2023-03-27 13:09:29 +00:00
Petr Špaček d7c611becb Clarify qname-minimization relaxed in the ARM
Leading underscore in qname confused some users, and it was not
documented.

(cherry picked from commit 02430a7263)
2023-03-27 15:05:01 +02:00
Arаm Sаrgsyаn e8aae75aec Merge branch '3968-catz-data-race-in-dns__catz_update_cb-9.18' into 'bind-9.18'
[9.18] Fix a data race in dns__catz_update_cb()

See merge request isc-projects/bind9!7727
2023-03-27 12:35:31 +00:00
Aram Sargsyan 9fb1381110 Add a CHANGES note for [GL #3968]
(cherry picked from commit 95cb2affaa)
2023-03-27 11:40:19 +00:00
Aram Sargsyan 987f61dbb7 Fix a data race in dns__catz_update_cb()
The dns__catz_update_cb() function was earlier updated (see
d2ecff3c4a) to use a separate
'dns_db_t' object ('catz->updb' instead of 'catz->db') to
avoid a race between the 'dns__catz_update_cb()' and
'dns_catz_dbupdate_callback()' functions, but the 'REQUIRE'
check there still checks the validity of the 'catz->db' object.

Fix the omission.

(cherry picked from commit a2817541b3)
2023-03-27 11:39:19 +00:00
Evan Hunt c2d8d99148 Merge branch '3953-deprecate-delegation-only-v9_18' into 'bind-9.18'
[9.18] Merge branch '3953-deprecate-delegation-only' into 'main'

See merge request isc-projects/bind9!7718
2023-03-23 21:10:50 +00:00
Evan Hunt f7b2ec32b4 CHANGES and release note for [GL #3953]
(cherry picked from commit 8d80ee561e)
2023-03-23 14:10:06 -07:00
Evan Hunt 1ab3ebb718 deprecate delegation-only and root-delegation only
These options and zone type were created to address the
SiteFinder controversy, in which certain TLD's redirected queries
rather than returning NXDOMAIN. since TLD's are now DNSSEC-signed,
this is no longer likely to be a problem.

The deprecation message for 'type delegation-only' is issued from
the configuration checker rather than the parser. therefore,
isccfg_check_namedconf() has been modified to take a 'nodeprecate'
parameter to suppress the warning when named-checkconf is used with
the command-line option to ignore warnings on deprecated options (-i).

(cherry picked from commit 2399556bee)
2023-03-23 14:09:53 -07:00
Ondřej Surý 02b6cc9b35 Merge branch '3960-handle-non-ISC_R_SUCCESS-in-rctx_respinit-bind-9.18' into 'bind-9.18'
Properly handle ISC_R_SHUTTINGDOWN in resquery_response()

See merge request isc-projects/bind9!7716
2023-03-23 12:39:03 +00:00
Ondřej Surý 4bf253ffe1 Properly handle ISC_R_SHUTTINGDOWN in resquery_response()
When resquery_response() was called with ISC_R_SHUTTINDOWN, the region
argument would be NULL, but rctx_respinit() would try to pass
region->base and region->len to the isc_buffer_init() leading to
a NULL pointer dereference.  Properly handle non-ISC_R_SUCCESS by
ignoring the provided region.

(cherry picked from commit 93259812dd)
2023-03-23 12:26:09 +01:00
Tom Krizek 616920d4b2 Merge branch '3665-dupsigs-test-stability-9.18' into 'bind-9.18'
[9.18] Improve dupsigs test stability

See merge request isc-projects/bind9!7706
2023-03-22 10:21:29 +00:00
Tom Krizek 85c78dbaa9 Lighten the CI load during the dupsigs test
Previously, an AXFR request would be issued every second while waiting
for the zone to be signed. This might've been the cause of issues in CI
where many tests are running in parallel and any extra load may increase
test instability.

Instead, check for the last NSEC record to have a signature before
commencing the AXFR request to check the zone has been fully signed.

Also increase the time for the zone signing to a total of 60+10 seconds
up from the previous 30.

(cherry picked from commit 3291c891f6)
2023-03-22 10:56:25 +01:00
Tom Krizek e4484bfde6 End dupsigs test early if it fails
There's no point in continuing the dupsigs test if a failure is
detected. End the test early to avoid wasting time and resources.

(cherry picked from commit ad647dca13)
2023-03-22 10:56:25 +01:00
Tom Krizek 4b56482e62 Store dupsigs axfr to a file for easier debugging
(cherry picked from commit fad2eee631)
2023-03-22 10:56:25 +01:00
Tom Krizek 1e94c87b00 Redirect dupsigs test output to proper logger
Ensure messages from dupsigs system test end up in its log rather than
stdout. Previously, the output was hard to debug when running the tests
in parallel and messages wouldn't end up in the dupsigs.log.

(cherry picked from commit cbe2559f37)
2023-03-22 10:56:23 +01:00
Arаm Sаrgsyаn 069eaa1232 Merge branch '3955-hold-catz-reference-during-update-v9_18' into 'bind-9.18'
[9.18] Hold a catz reference while the update process is running

See merge request isc-projects/bind9!7705
2023-03-21 12:17:35 +00:00
Aram Sargsyan 51d7b13009 Add a CHANGES note for [GL #3955]
(cherry picked from commit aee14ee5d9)
2023-03-21 11:47:17 +00:00
Aram Sargsyan eef58e9708 Hold a catz reference while the update process is running
This should delay the catalog zone from being destroyed during
shutdown, if the update process is still running.

Doing this should not introduce significant shutdown delays, as
the update function constantly checks the 'shuttingdown' flag
and cancels the process if it is set.

(cherry picked from commit dc2b8bb1c9)
2023-03-21 11:47:17 +00:00
Michal Nowak 43eac16dd7 Merge branch 'mnowak/respdiff-drop-allow_failure-9.18' into 'bind-9.18'
[9.18] respdiff jobs do not need "allow_failure: true"

See merge request isc-projects/bind9!7699
2023-03-17 10:18:25 +00:00
Michal Nowak 7b7d8b7a6c respdiff jobs do not need "allow_failure: true"
ASAN and TSAN respdiff jobs should be stable and not require
"allow_failure: true" anymore.

(cherry picked from commit dd97ddca6f)
2023-03-17 11:11:06 +01:00
Tom Krizek c4ce5662fd Merge branch 'tkrizek/ci-artifacts-1d-9.18' into 'bind-9.18'
[9.18] Use the default retention time for CI artifacts

See merge request isc-projects/bind9!7694
2023-03-16 14:14:28 +00:00
Tom Krizek 7acea8eb5d Use the default retention time for CI artifacts
The instance-wide GitLab CI artifact retention time was changed to 1 day
up from the previous value of 12 hours. Remove our explicit overrides
for 1 day artifact retention time, as it is the default now.

Previously, most of our jobs had overrides for 1 day retention, while
some of our jobs used the default 12 hours. This discrepancy could be
quite impractical at times.

(cherry picked from commit 8fef5676fa)
2023-03-16 15:13:13 +01:00