Commit Graph

32662 Commits

Author SHA1 Message Date
Mark Andrews
52b73db20b Check 'rndc retransfer' of primary error message
(cherry picked from commit 8f36b8567a)
2021-01-28 09:44:26 +11:00
Mark Andrews
b416d8fcdf Improve the diagnostic 'rndc retransfer' error message
(cherry picked from commit dd3520ae41)
2021-01-28 09:44:26 +11:00
Matthijs Mekking
59d78bf729 Merge branch '2178-dnssec-fromlabel-ec_crash-v9_16' into 'v9_16'
Resolve "dnssec-keyfromlabel  ECDSAP256SHA256 error on AEP Keypers HSM"

See merge request isc-projects/bind9!4602
2021-01-26 15:08:07 +00:00
Matthijs Mekking
4a36b6d918 Make opensslecdsa_parse use fromlabel
When 'opensslecdsa_parse()' encounters a label tag in the private key
file, load the private key with 'opensslecdsa_fromlabel()'. Otherwise
load it from the private structure.

This was attempted before with 'load_privkey()' and 'uses_engine()',
but had the same flaw as 'opensslecdsa_fromlabel()' had previously,
that is getting the private and public key separately, juggling with
pointers between EC_KEY and EVP_PKEY, did not create a valid
cryptographic key that could be used for signing.

(cherry picked from commit 57ac70ad46)
2021-01-26 15:04:59 +01:00
Matthijs Mekking
97185ecac2 Simplify opensslecdsa_fromlabel
The 'opensslecdsa_fromlabel()' function does not need to get the
OpenSSL engine twice to load the private and public key. Also no need
to call 'dst_key_to_eckey()' as the EC_KEY can be derived from the
loaded EVP_PKEY's.

Add some extra checks to ensure the key has the same base id and curve
(group nid) as the dst key.

Since we already have the EVP_PKEY, no need to call 'finalize_eckey()',
instead just set the right values in the key structure.

(cherry picked from commit 393052d6ff)
2021-01-26 15:04:51 +01:00
Matthijs Mekking
f555cec0af Replace EVP_DigestFinal with EVP_DigestFinal_ex
The openssl docs claim that EVP_DigestFinal() is obsolete and that
one should use EVP_DigestFinal_ex() instead.

(cherry picked from commit 1fcd0ef8bd)
2021-01-26 15:04:38 +01:00
Matthijs Mekking
56b0861049 Add notes and changes for [#2178]
(cherry picked from commit 37d11f5be0)
2021-01-26 15:04:30 +01:00
Matthijs Mekking
9e2ea5efb1 Don't set pubkey if eckey already has public key
The 'ecdsa_check()' function tries to correctly set the public key
on the eckey, but this should be skipped if the public key is
retrieved via the private key.

(cherry picked from commit 06b9724152)
2021-01-26 15:04:21 +01:00
Matthijs Mekking
e3acfb44d5 ECDSA code should not use RSA label
The 'opensslecdsa_tofile()' function tags the label as an RSA label,
that is a copy paste error and should be of course an ECDSA label.

(cherry picked from commit 46afeca8bf)
2021-01-26 15:04:11 +01:00
Matthijs Mekking
8b25d3ab57 Correctly update pointers to pubkey and privkey
The functions 'load_pubkey_from_engine()' and
'load_privkey_from_engine()' did not correctly store the pointers.

Update both functions to add 'EC_KEY_set_public_key()' and
'EC_KEY_set_private_key()' respectively, so that the pointers to
the public and private keys survive the "load from engine" functions.

(cherry picked from commit 01239691a1)
2021-01-26 15:04:03 +01:00
Matthijs Mekking
f66df9f1b7 load_pubkey_from_engine() should load public key
The 'function load_pubkey_from_engine()' made a call to the libssl
function 'ENGINE_load_private_key'.  This is a copy paste error and
should be 'ENGINE_load_public_key'.

(cherry picked from commit 370285a62d)
2021-01-26 15:03:43 +01:00
Ondřej Surý
d77ac5c767 Merge branch '2403-dig-has-a-fit-with-option-multi-typo-on-multi-v9_16' into 'v9_16'
Report unknown dash option during the pre-parse phase (v9.16)

See merge request isc-projects/bind9!4600
2021-01-26 13:26:47 +00:00
Mark Andrews
77ae42b68c Add CHANGES note for [GL #2403]
(cherry picked from commit 0b6da18f31)
2021-01-26 14:19:12 +01:00
Mark Andrews
702a00d10e Report unknown dash option during the pre-parse phase
(cherry picked from commit 3361c0d6f8)
2021-01-26 14:18:54 +01:00
Ondřej Surý
2bcb00919f Merge branch '2349-backport-max-ixfr-ration-v9_16' into 'v9_16'
Backport max-ixfr-ratio to BIND 9.16

See merge request isc-projects/bind9!4598
2021-01-26 12:10:22 +00:00
Evan Hunt
f5362ed135 CHANGES and release note 2021-01-26 12:38:32 +01:00
Evan Hunt
62202b0e6d prevent ixfr/ns1 being removed 2021-01-26 12:38:32 +01:00
Evan Hunt
077e2c2a74 add serial number to "transfer ended" log messages 2021-01-26 12:38:32 +01:00
Evan Hunt
9529d1ed0d add a system test for AXFR fallback when max-ixfr-ratio is exceeded
also cleaned up the ixfr system test:

- use retry_quiet when applicable
- use scripts to generate test zones
- improve consistency
2021-01-26 12:38:32 +01:00
Evan Hunt
2df6ffc051 check size ratio when responding to IXFR requests 2021-01-26 12:38:32 +01:00
Evan Hunt
9950247c78 improve calculation of database transfer size
- change name of 'bytes' to 'xfrsize' in dns_db_getsize() parameter list
  and related variables; this is a more accurate representation of what
  the function is doing
- change the size calculations in dns_db_getsize() to more accurately
  represent the space needed for a *XFR message or journal file to contain
  the data in the database. previously we returned the sizes of all
  rdataslabs, including header overhead and offset tables, which
  resulted in the database size being reported as much larger than the
  equivalent *XFR or journal.
- map files caused a particular problem here: the fullname can't be
  determined from the node while a file is being deserialized, because
  the uppernode pointers aren't set yet. so we store "full name length"
  in the dns_rbtnode structure while serializing, and clear it after
  deserialization is complete.
2021-01-26 12:38:32 +01:00
Evan Hunt
70df95e9f5 dns_journal_iter_init() can now return the size of the delta
the call initailizing a journal iterator can now optionally return
to the caller the size in bytes of an IXFR message (not including
DNS header overhead, signatures etc) containing the differences from
the beginning to the ending serial number.

this is calculated by scanning the journal transaction headers to
calculate the transfer size. since journal file records contain a length
field that is not included in IXFR messages, we subtract out the length
of those fields from the overall transaction length.

this necessitated adding an "RR count" field to the journal transaction
header, so we know how many length fields to subract. NOTE: this will
make existing journal files stop working!
2021-01-26 12:38:32 +01:00
Evan Hunt
57aadd6cea add syntax and setter/getter functions to configure max-ixfr-ratio 2021-01-26 12:38:32 +01:00
Michał Kępień
80a4effee2 Merge branch '2387-use--release-for-SONAME-v9.16' into 'v9_16'
Use -release instead of -version-info for internal library SONAMEs

See merge request isc-projects/bind9!4553
2021-01-25 14:45:49 +00:00
Ondřej Surý
88c098b467 Add CHANGES and release note for GL #2387
(cherry picked from commit b30aaa3748)
2021-01-25 15:28:09 +01:00
Ondřej Surý
0e25af628c Use -release instead of -version-info for internal library SONAMEs
The BIND 9 libraries are considered to be internal only and hence the
API and ABI changes a lot.  Keeping track of the API/ABI changes takes
time and it's a complicated matter as the safest way to make everything
stable would be to bump any library in the dependency chain as in theory
if libns links with libdns, and a binary links with both, and we bump
the libdns SOVERSION, but not the libns SOVERSION, the old libns might
be loaded by binary pulling old libdns together with new libdns loaded
by the binary.  The situation gets even more complicated with loading
the plugins that have been compiled with few versions old BIND 9
libraries and then dynamically loaded into the named.

We are picking the safest option possible and usable for internal
libraries - instead of using -version-info that has only a weak link to
BIND 9 version number, we are using -release libtool option that will
embed the corresponding BIND 9 version number into the library name.

That means that instead of libisc.so.1608 (as an example) the library
will now be named libisc-9.16.10.so.

(cherry picked from commit c605d75ea5)
2021-01-25 15:28:09 +01:00
Michal Nowak
d74d23c88a Merge branch '2415-update-coverity-scan-ci-job-to-2020-09-v9_16' into 'v9_16'
[v9_16] Update Coverity Scan CI job to 2020.09

See merge request isc-projects/bind9!4594
2021-01-25 11:35:58 +00:00
Michal Nowak
13b6a3837f Update Coverity Scan CI job to 2020.09
(cherry picked from commit 7d428be79b)
2021-01-25 12:33:35 +01:00
Michał Kępień
e3b338c31c Merge branch 'v9_16_11-release' into 'v9_16'
Merge 9.16.11 release branch

See merge request isc-projects/bind9!4587
2021-01-21 08:35:39 +00:00
Michał Kępień
0847e40635 Set up release notes for BIND 9.16.12 2021-01-21 09:33:16 +01:00
Michał Kępień
48864361e6 Bump BIND_BASELINE_VERSION for ABI checks 2021-01-21 09:33:16 +01:00
Tinderbox User
3a53c2ae37 Merge branch 'prep-release' into v9_16_11-release 2021-01-21 09:11:54 +01:00
Michał Kępień
f641d69333 Merge branch 'michal/prepare-documentation-for-bind-9.16.11' into 'v9_16_11-release'
Prepare documentation for BIND 9.16.11

See merge request isc-private/bind9!231
2021-01-21 09:11:54 +01:00
Tinderbox User
536bc1163a prep 9.16.11 2021-01-21 09:11:54 +01:00
Michał Kępień
2e8eb485e9 Prepare release notes for BIND 9.16.11 2021-01-21 09:11:54 +01:00
Michał Kępień
19bd23df6a Add release note for GL #2091 2021-01-21 09:11:54 +01:00
Michał Kępień
db3380e5ee Reorder release notes 2021-01-21 09:11:54 +01:00
Michał Kępień
9396f3ef13 Tweak and reword release notes 2021-01-21 09:11:54 +01:00
Michał Kępień
d17c8903cf Restore release note for GL #2245 2021-01-21 09:11:54 +01:00
Michał Kępień
7d857376a4 Tweak and reword recent CHANGES entries 2021-01-21 09:11:54 +01:00
Evan Hunt
62547cd6d9 Merge branch 'each-fix-cpu-test-v9_16' into 'v9_16'
check whether taskset works before running cpu test

See merge request isc-projects/bind9!4585
2021-01-21 03:01:25 +00:00
Evan Hunt
0a1e1ead94 check whether taskset works before running cpu test
the taskset command used for the cpu system test seems
to be failing under vmware, causing a test failure. we
can try the taskset command and skip the test if it doesn't
work.

(cherry picked from commit a8a49bb783)
2021-01-20 15:44:31 -08:00
Michal Nowak
9c45a221e5 Merge branch 'mnowak/drop-issue-1941-workaround-v9_16' into 'v9_16'
[v9_16] Drop #1941 workaround

See merge request isc-projects/bind9!4581
2021-01-19 10:49:06 +00:00
Michal Nowak
4f2dffee99 Drop #1941 workaround
Workaround for issue #1941 is not needed anymore as the underlying
performance issue which manifested on FreeBSD was addressed.

(cherry picked from commit fe5978f5ba)
2021-01-19 11:47:19 +01:00
Matthijs Mekking
c1ac134376 Merge branch '2380-doc-engine-pkcs11-v9_16' into 'v9_16'
Resolve "Documentation  update - use of "-E pkcs11""

See merge request isc-projects/bind9!4574
2021-01-19 08:58:52 +00:00
Matthijs Mekking
87b44b59c8 Update documentation on -E option
The -E option does not default to pkcs11 if --with-pkcs11 is set,
but always needs to be set explicitly.

(cherry picked from commit 0536375d4cf61c9b570a32e808dde78a7ef859bf)
2021-01-19 09:06:01 +01:00
Matthijs Mekking
6eebd79bf0 Merge branch '2364-cid314969-coverity-deadcode-zoneconf-v9_16' into 'v9_16'
Fix control flow issue CID 314969 in zoneconf.c

See merge request isc-projects/bind9!4576
2021-01-18 15:54:48 +00:00
Matthijs Mekking
57c6017d91 Fix control flow issue CID 314969 in zoneconf.c
Coverity Scan identified the following issue in bin/named/zoneconf.c:

    *** CID 314969:  Control flow issues  (DEADCODE)
    /bin/named/zoneconf.c: 2212 in named_zone_inlinesigning()

    if (!inline_signing && !zone_is_dynamic &&
        cfg_map_get(zoptions, "dnssec-policy", &signing) == ISC_R_SUCCESS &&
        signing != NULL)
    {
        if (strcmp(cfg_obj_asstring(signing), "none") != 0) {
            inline_signing = true;
    >>>     CID 314969:  Control flow issues  (DEADCODE)
    >>>     Execution cannot reach the expression ""no"" inside this statement: "dns_zone_log(zone, 1, "inli...".
            dns_zone_log(
                zone, ISC_LOG_DEBUG(1), "inline-signing: %s",
                inline_signing
                ? "implicitly through dnssec-policy"
                : "no");
        } else {
                ...
        }
    }

This is because we first set 'inline_signing = true' and then check
its value in 'dns_zone_log'.

(cherry picked from commit 8df629d0b2)
2021-01-18 14:40:26 +00:00
Michał Kępień
9d8ed6962b Merge branch 'michal/improve-danger-checks-v9_16' into 'v9_16'
[v9_16] Improve Danger checks

See merge request isc-projects/bind9!4577
2021-01-18 14:15:34 +00:00
Michał Kępień
ab8f013194 Skip subject line length check for merge commits
Some merge requests (e.g. those created for release branches) include
merge commits.  Prevent Danger from warning about excessive subject line
length for merge commits.  (While the proper way to detect a merge
commit would be to check the 'parents' attribute of a commit object,
Danger Python does not seem to populate that attribute, so a simple
string search is performed on the commit subject instead.)

(cherry picked from commit bc42690c99)
2021-01-18 15:13:34 +01:00