2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 21:47:59 +00:00

34903 Commits

Author SHA1 Message Date
Aram Sargsyan
15cb706f22 Refactor the OpenSSL HMAC usage to use newer APIs
OpenSSL 3 deprecates the HMAC* family and associated APIs.

Rewrite portions of OpenSSL library usage code to use a newer
set of HMAC APIs.
2021-10-28 07:38:56 +00:00
Aram Sargsyan
2a6febd5d2 Use thinner shims for OpenSSL's EVP_MD_CTX_new() and EVP_MD_CTX_free()
The EVP_MD_CTX_new() and EVP_MD_CTX_free() functions are renamed APIs
which were previously available as EVP_MD_CTX_create() and
EVP_MD_CTX_destroy() respectively, which means that we can use them
instead of providing our own shim functions.
2021-10-28 07:38:56 +00:00
Aram Sargsyan
2563afb920 Use ERR_get_error_all() instead of deprecated ERR_get_error_line_data()
OpenSSL 3.0.0 deprecates the ERR_get_error_line_data() function.

Use ERR_get_error_all() instead of ERR_get_error_line_data() and create
a shim to use the old variant for the older OpenSSL versions which don't
have the newer ERR_get_error_all().
2021-10-28 07:38:56 +00:00
Aram Sargsyan
c45d853f44 Use EVP_MD_CTX_get0_md() instead of deprecated EVP_MD_CTX_md()
OpenSSL 3.0.0 deprecates the EVP_MD_CTX_md() function.

Use EVP_MD_CTX_md() instead of EVP_MD_CTX_get0_md() and create a shim
to use the old variant for the older OpenSSL versions which don't have
the newer EVP_MD_CTX_get0_md().
2021-10-28 07:38:56 +00:00
Aram Sargsyan
8924046753 Make the configure.ac script compatible with OpenSSL 3.0.0
OpenSSL 3.0.0 deprecates many low level API functions.

In preparation for the future support of linking BIND with OpenSSL 3.0.0
without the deprecated API functions, change the configure.ac script to
use functions which are available on all supported versions of OpenSSL
and LibreSSL.
2021-10-28 07:38:56 +00:00
Arаm Sаrgsyаn
55e10b6152 Merge branch '2972-rsa-keys-compare-typo-bug' into 'main'
Fix a bug when comparing two RSA keys

Closes #2972

See merge request isc-projects/bind9!5529
2021-10-28 07:31:13 +00:00
Aram Sargsyan
7101afa23c Add dst_key_pubcompare and dst_key_compare unit test
The dst_key_pubcompare() and dst_key_compare() didn't have a unit test,
add the unit tests which test comparing the same keys, different keys,
and, where possible, similar keys with a manually altered parameter.

dst_key_pubcompare() internally uses the *_todns() functions of the
lib/dns/openssl*_link.c modules.

dst_key_compare() internally uses the *_compare() functions of the
lib/dns/openssl*_link.c modules.
2021-10-27 22:23:03 +00:00
Aram Sargsyan
1ceb1f7ab0 Add CHANGES note for [GL #2972] 2021-10-27 20:35:04 +00:00
Aram Sargsyan
930e4f52a5 Fix a bug when comparing two RSA keys
When comparing different parameters of two RSA keys there is a typo
which causes the "p" prime factors to not being compared.

Fix the typo.
2021-10-27 20:34:04 +00:00
Mark Andrews
ad57f03389 Merge branch '2916-duplicate-catalog-zones-is-fatal' into 'main'
Resolve "duplicate catalog-zones is fatal"

Closes #2916

See merge request isc-projects/bind9!5432
2021-10-26 14:54:03 +00:00
Mark Andrews
d2d47e8471 Add CHANGES note for [GL #2916] 2021-10-27 01:32:57 +11:00
Mark Andrews
ae62e704bc Handle duplicate catalog zone entries gracefully
Duplicate catalog zone entries caused an assertion failure
in named during configuration.  This is now a soft error
that is detected earlier by named and also by named-checkconf.
2021-10-27 01:32:57 +11:00
Mark Andrews
54f1ea64c1 Merge branch '1542-silent-failure-of-build-when-creating-a-new-rr-type-if-code-is-out-of-range' into 'main'
Resolve "Silent failure of build when creating a new RR Type if CODE is out of range"

Closes #1542

See merge request isc-projects/bind9!2895
2021-10-25 21:52:34 +00:00
Matthijs Mekking
e073b04605 Document typenumber and classnumber format
Document the typenumber and classnumber in doc/dev/rdata so that it
is clear what the expected format is.
2021-10-25 21:33:35 +00:00
Mark Andrews
d3d22502b4 Error out if gen finds a type or class that is greater than 65535 2021-10-25 21:33:35 +00:00
Matthijs Mekking
5f3ff44914 Merge branch '2956-nsec3param-no-salt-n-pepa' into 'main'
Change nsec3param default to iter 0 salt-length 0

Closes #2956

See merge request isc-projects/bind9!5513
2021-10-25 10:08:30 +00:00
Matthijs Mekking
e713b8548c Add release note and CHANGES for #2956
Feature change.
2021-10-25 11:28:09 +02:00
Matthijs Mekking
70872062eb Update tests to match new nsec3param default
Update the nsec3 system tests to use the new default values. Change
the policy for "nsec3-other" so that we still have a test case for
non-zero salt length.
2021-10-25 11:27:23 +02:00
Matthijs Mekking
8f324b4717 Change nsec3param default to iter 0 salt-length 0
When using 'nsec3param' in 'dnssec-policy' and no specific parameters
are provided, default to zero additional iterations and no salt, as
recommended by draft-ietf-dnsop-nsec3-guidance.
2021-10-25 11:27:23 +02:00
Matthijs Mekking
8c1fc49974 Merge branch '2742-serve-stale-is-confusing' into 'main'
Update rndc serve-stale status output

Closes #2742

See merge request isc-projects/bind9!5521
2021-10-25 09:26:33 +00:00
Matthijs Mekking
b3507207d4 Add release note and CHANGES for #2742
Feature change.
2021-10-25 10:42:10 +02:00
Matthijs Mekking
380ba47329 Update rndc serve-stale status output
Explicitly show if cache is enabled or disabled, and if answering stale
data is enabled or disabled.
2021-10-25 10:42:10 +02:00
Michal Nowak
cf37b01023 Merge branch '2458-run-asan-and-tsan-with-latest-stable-gcc' into 'main'
Use Fedora image for ASAN and TSAN CI jobs; drop TSan suppressions

Closes #2458

See merge request isc-projects/bind9!4709
2021-10-22 13:13:30 +00:00
Michal Nowak
6179011a50
Drop GCC ThreadSanitizer suppresion of fstrm-originated calls
With custom fstrm library in the Fedora image which uses mutexes instead
of barriers ThreadSanitizer suppression with GCC is not necessary
anymore.
2021-10-22 12:50:43 +02:00
Michal Nowak
1f4a56cb3e
Rename ASAN_OPTIONS_COMMON to ASAN_OPTIONS
Renaming the variable removes some of the complexity.
2021-10-22 12:50:43 +02:00
Michal Nowak
6ab2d89686
Use Fedora image for GCC ASAN and TSAN CI jobs
For the sake of running ASAN and TSAN jobs with the latest stable GCC,
replace "base image" (Debian Buster with GCC 8.3.0) with Fedora 34 image
with GCC 11.
2021-10-22 12:50:43 +02:00
Michal Nowak
332f19994a Merge branch 'mnowak/debian-11-bullseye' into 'main'
Add Debian 11 (bullseye)

See merge request isc-projects/bind9!5330
2021-10-22 08:33:39 +00:00
Michal Nowak
1b9a9c2829
Do not spawn Debian 9 CI jobs in merge requests 2021-10-22 10:09:17 +02:00
Michal Nowak
2b5dfae5de
Add Debian 11 (bullseye) 2021-10-22 10:09:16 +02:00
Michal Nowak
77358ba664 Merge branch 'mnowak/openbsd-7.0' into 'main'
Add OpenBSD 7.0

See merge request isc-projects/bind9!5519
2021-10-22 07:38:06 +00:00
Michal Nowak
75e873ed98
Add OpenBSD 7.0 2021-10-22 09:25:36 +02:00
Mark Andrews
af17112319 Merge branch '2966-logfileconfig-system-test-is-timing-sensitive' into 'main'
Resolve "logfileconfig system test is timing sensitive"

Closes #2966

See merge request isc-projects/bind9!5516
2021-10-21 20:46:12 +00:00
Mark Andrews
f485bb19c0 Accept either 2 or 3 old versions of log file
Depending upon when the directory is sampled there may be 2
(oldest version removed and rename / reopen is in progresss) or
3 old versions of the log file.
2021-10-21 20:26:09 +00:00
Ondřej Surý
d63fdfd79c Merge branch 'ondrej/fix-missing-DNS_ZONEFLG_DUMPING-in-setmodtime' into 'main'
Add missing DNS_ZONEFLG_DUMPING to setmodtime()

See merge request isc-projects/bind9!5512
2021-10-21 10:33:03 +00:00
Ondřej Surý
55ac6b7394 Add missing DNS_ZONEFLG_DUMPING to setmodtime()
It was found, that the original commit adding the setmodtime() was
incompletely squashed and there was double check for
DNS_ZONEFLG_NEEDDUMP instead of check for DNS_ZONEFLG_NEEDDUMP and
DNS_ZONEFLG_DUMPING.

Change the duplicate check to DNS_ZONEFLG_DUMPING.
2021-10-21 12:26:02 +02:00
Evan Hunt
5714682267 Merge branch '2927-lame-server-loop' into 'main'
check for loops in ADB finds

Closes #2927

See merge request isc-projects/bind9!5474
2021-10-21 09:26:44 +00:00
Evan Hunt
1ed928dad7 CHANGES and release note for [GL #2927] 2021-10-21 02:15:55 -07:00
Evan Hunt
61ac32a989 add a system test with an ADB loop
Add a lame delegation to lame.example.org with only an A record
in the additional section; on failure, this will trigger a retry
with AAAA, which will loop. Test that dig returns SERVFAIL, in
addition to confirming that named doesn't hang on shutdown.
2021-10-21 02:15:55 -07:00
Evan Hunt
128068fde2 check for loops in ADB finds
If an ADB find is started on behalf of a resolver fetch, and fails to
find any addresses but has a pending resolver fetch associated with it,
then we need to check whether the fetch it's waiting on is the one
that created it. If so, it can never finish and needs to be terminated.
2021-10-21 02:15:43 -07:00
Evan Hunt
93f5bc893e incidental cleanup
The NAME_FETCH_A and NAME_FETCH_AAAA macros were meant to be
boolean, indicating whether the pointers were set or not, while
the NAME_FETCH_V4 and NAME_FETCH_V6 macros were meant to return
the pointer values. The latter were only used as booleans, so
they've been removed in favor of the former.

Also did some style cleanup and removed an unreachable code block.
2021-10-21 01:39:30 -07:00
Evan Hunt
6ba91a07ff Merge branch '2963-gettcp-assert' into 'main'
don't set DNS_DISPATCHSTATE_CONNECTED until attaching handle

Closes #2963

See merge request isc-projects/bind9!5515
2021-10-21 08:39:03 +00:00
Evan Hunt
c5a8454436 don't set DNS_DISPATCHSTATE_CONNECTED until attaching handle
there was a race possible in which a dispatch was put into
the 'connected' state before it had a TCP handle attached,
which could cause an assertion failure in dns_dispatch_gettcp().
2021-10-21 08:28:14 +00:00
Ondřej Surý
d4e04abb73 Merge branch 'ondrej/fix-isc_time_add-overflow' into 'main'
Fix isc_time_add() overflow

See merge request isc-projects/bind9!5511
2021-10-21 07:50:50 +00:00
Ondřej Surý
04511736a0 Add isc_time_add and isc_time_subtract unit test
The isc_time_add() and isc_time_subtract() didn't have a unit test, add
the unit test with couple of edge case vectors to check whether overflow
and underflow is correctly handled.
2021-10-21 09:31:01 +02:00
Ondřej Surý
2b147ac358 Use __builtin_*_overflow for isc_time_{add,subtract}()
Use the __builtin_uadd_overflow() and __builtin_usub_overflow() for
overflow checks in isc_time_add() and isc_time_subtract().  This
generates more efficient and safe code.
2021-10-21 09:31:01 +02:00
Ondřej Surý
8c05f12bc8 Fix isc_time_add() overflow
The isc_time_add() could overflow when t.seconds + i.seconds == UINT_MAX
and t.nanoseconds + i.nanoseconds >= NS_PER_S.

Fix the overflow in isc_time_add(), and simplify the ISC_R_RANGE checks
both in isc_time_add() and isc_time_subtract() functions.
2021-10-21 09:31:01 +02:00
Mark Andrews
d09625423c Merge branch '2944-doth-system-test-fails-with-256-file-descriptors' into 'main'
Resolve "doth system test fails with 256 file descriptors"

Closes #2944

See merge request isc-projects/bind9!5477
2021-10-20 20:45:17 +00:00
Mark Andrews
5d1e6b036a Increase the number of file descriptors for stress_http_quota.py
stress_http_quota.py uses more than 256 file descriptors and fails
on some platforms.  Increase the available descriptors to 1024.
2021-10-20 19:41:25 +00:00
Evan Hunt
d48fa3b1c4 Merge branch 'each-cleanup-qmin-test' into 'main'
fix qmin system test

See merge request isc-projects/bind9!5509
2021-10-20 06:30:05 +00:00
Evan Hunt
ac3eb921fc fix qmin system test
The qmin system test was printing spurious output.  On investigation,
the test case turned out to be both broken and ineffective: its
expectations were wrong, and it was printing the output because its
wrong expectations were not met, and those failed expectations were
not causing a test failure. All of this has been corrected.
2021-10-19 11:34:52 -07:00