Commit Graph

28389 Commits

Author SHA1 Message Date
Ondřej Surý
14d4bbea61 Adjust lock/unlock in zone_rekey()
(cherry picked from commit aaaa7e67fa)
2020-03-03 16:28:42 +11:00
Mark Andrews
6bf56cdf4d Ensure that resigintime and the zone timer are set
(cherry picked from commit a6626594aa)
2020-03-03 16:28:41 +11:00
Matthijs Mekking
ef99d6bda0 Add more zone locks
Add more zone locks around code that touches zone timer setting
in failure modes.

(cherry picked from commit 143d1c9767)
2020-03-03 16:28:37 +11:00
Mark Andrews
0536bfc91a Always call set_resigntime with the zone lock held
(cherry picked from commit 7212961849)
2020-03-03 16:17:34 +11:00
Mark Andrews
43ff3b3ad5 Always call zone_settimer()
zone_needdump() could potentially not call zone_settimer() so
explitly call zone_settimer() as zone->resigntime could have
gone backward.

(cherry picked from commit 5ec57f31b0)
2020-03-03 16:17:30 +11:00
Mark Andrews
bfef5ce9bc Call set_resigntime() in receive_secure_serial()
With RRSIG records no longer being signed with the full
sig-validity-interval we need to ensure the zone->resigntime
as it may need to be set to a earlier time.

(cherry picked from commit 5d1611afdc)
2020-03-03 16:16:38 +11:00
Ondřej Surý
3df6760518 Merge branch 'ondrej/use-pkg-config-for-libxml2-v9_11' into 'v9_11'
use pkg-config for libxml2 (v9.11)

See merge request isc-projects/bind9!3118
2020-03-02 14:33:49 +00:00
Ondřej Surý
2def018af7 Add release notes for pkg-config requirement for libxml2 2020-03-02 15:07:18 +01:00
Ondřej Surý
7110ceb880 Use pkg-config for --with-libxml2=auto/yes
The downstream distributors of BIND 9 (Debian in this case) are in
process of removing xml2-config command from the libxml2-dev package
(see Debian Bug #949056 for details).  The removal of the script will
make BIND 9 to fail to build from the source when --with-libxml2=yes is
specified or not link with libxml2 when --with-libxml2=auto is specified
and then fail ABI changes (Debian Bug #949056).

When --with-libxml2=<path>, the script checks for <path>/bin/xml2-config
and uses the specified path to link with libxml2. This has been kept to
retain backwards compatibility with systems that does not ship
pkg-config.
2020-03-02 15:07:18 +01:00
Ondřej Surý
6050c766de Merge branch '414-use-p11-kit-headers-v9_11' into 'v9_11'
Resolve "Legal issue with pkcs11 headers"

See merge request isc-projects/bind9!3133
2020-03-02 10:29:36 +00:00
Ondřej Surý
5edc8b5338 Use standard PKCS#11 standard error codes instead of custom error codes
* CKR_CRYPTOKI_ALREADY_INITIALIZED: This value can only be returned by
  `C_Initialize`. It means that the Cryptoki library has already been
  initialized (by a previous call to `C_Initialize` which did not have a
  matching `C_Finalize` call).

* CKR_FUNCTION_NOT_SUPPORTED: The requested function is not supported by this
  Cryptoki library. Even unsupported functions in the Cryptoki API should have a
  "stub" in the library; this stub should simply return the value
  CKR_FUNCTION_NOT_SUPPORTED.

* CKR_LIBRARY_LOAD_FAILED: The Cryptoki library could not load a dependent
  shared library.

(cherry picked from commit f6922d6e78)
2020-03-02 11:01:05 +01:00
Ondřej Surý
4b9cdbaf7e Replace the OASIS PKCS#11 header file with one from p11-kit
The OASIS pkcs11.h header has a restrictive license.  Replace the
pkcs11.h pkcs11f.h and pkcs11t.h headers with pkcs11.h from p11-kit.

For source distribution, the license for the OASIS headers itself
doesn't pose any licensing problem when combined with MPL license, but
it possibly creates problem for downstream distributors of BIND 9.

(cherry picked from commit c47fad2431)
2020-03-02 10:43:45 +01:00
Mark Andrews
392430c6dc Merge branch '1638-rrsig-soa-and-re-signing-v9_11' into 'v9_11'
Resolve "RRSIG(SOA) and re-signing."

See merge request isc-projects/bind9!3129
2020-02-27 23:31:02 +00:00
Mark Andrews
a32d952d9d capture named-journalprint output
(cherry picked from commit 88c828cb9f)
2020-02-28 10:14:02 +11:00
Mark Andrews
317e0cf4c9 sort RRSIG(SOA) to be last of RRSIGs with a common re-resign time
(cherry picked from commit a24fd55836)
2020-02-28 10:13:57 +11:00
Mark Andrews
51f3d3781e use the full sig-validity-interval for RRSIG(SOA)
(cherry picked from commit 660dc3eba7)
2020-02-28 10:10:26 +11:00
Evan Hunt
9fe133ceed Merge branch '1632-spelling-v9_11-take2' into 'v9_11'
fix additional spelling errors

See merge request isc-projects/bind9!3115
2020-02-25 06:27:50 +00:00
Evan Hunt
191b616579 fix additional spelling errors 2020-02-24 22:04:43 -08:00
Evan Hunt
e09f0856f0 Merge branch '1632-spelling-v9_11' into 'v9_11'
fix spelling errors reported by Fossies.

See merge request isc-projects/bind9!3112
2020-02-21 23:02:26 +00:00
Evan Hunt
e63223332c fix spelling errors reported by Fossies. 2020-02-21 14:09:59 -08:00
Mark Andrews
75d70433e4 Merge branch 'marka-fix-signature-test-v9_11' into 'v9_11'
Fix code to generate the test signatues.

See merge request isc-projects/bind9!3106
2020-02-21 07:20:38 +00:00
Mark Andrews
4ecf3b8961 fixup! Fix code to generate the test signatues. 2020-02-21 18:10:44 +11:00
Mark Andrews
22422a2f5d Fix code to generate the test signatues.
* ctx needs to be destroyed before it is regenerated.
* emit the name of the signature to be replaced.
* cleanup memory before asserting so post longjump doesn't detect a
  memory leak.
* comment code.

(cherry picked from commit 3a8c8a2a31)
2020-02-21 17:45:47 +11:00
Michał Kępień
67451d5502 Merge branch 'michal/make-a-sed-script-in-doc-arm-makefile.in-portable-v9_11' into 'v9_11'
[v9_11] Make a sed script in doc/arm/Makefile.in portable

See merge request isc-projects/bind9!3099
2020-02-20 11:28:32 +00:00
Michał Kępień
2b07349098 Make a sed script in doc/arm/Makefile.in portable
BSD sed does not recognize \s as a whitespace matching token.  Make the
sed script in doc/arm/Makefile.in which ensures GitLab identifiers are
not split across lines portable by replacing \s with [[:space:]].

(cherry picked from commit b25e6b51f6)
2020-02-20 12:24:28 +01:00
Michał Kępień
7eb9446e24 Merge branch 'michal/increase-lifetime-of-docs-sid-amd64-artifacts-v9_11' into 'v9_11'
[v9_11] Increase lifetime of docs:sid:amd64 artifacts

See merge request isc-projects/bind9!3094
2020-02-20 10:57:38 +00:00
Michał Kępień
1728dfaae2 Increase lifetime of docs:sid:amd64 artifacts
Artifacts generated by the docs:sid:amd64 job need to be retained longer
than for other jobs as they are used for building bind.isc.org contents.
If these artifacts are removed too quickly, pipelines in the pages/bind
GitLab project start failing, preventing content updates from being
published.  Increase lifetime of the relevant job artifacts to prevent
this from happening.

(cherry picked from commit 9751ba5a75)
2020-02-20 11:53:30 +01:00
Tinderbox User
6afa4a49bc Merge branch 'prep-release' into v9_11 v9.11.16 2020-02-12 15:42:40 +00:00
Tinderbox User
aa55ef6c43 prep 9.11.16 2020-02-12 15:37:33 +00:00
Michal Nowak
9a18bab7f6 Merge branch 'mnowak/coverity-disable-web-tag-v9_11' into 'v9_11'
[v9_11] Run Coverity Scan only when specific variables are present

See merge request isc-projects/bind9!3056
2020-02-12 15:00:33 +00:00
Michal Nowak
d28e40b05d Run Coverity Scan only when specific variables are present
Submissions to Coverity Scan should be limited to those originated from
release branches and only from a specific schedule which holds
COVERITY_SCAN_PROJECT_NAME and COVERITY_SCAN_TOKEN variables.

(cherry picked from commit 48530aa21395414b0f9788ea5ab158b2b09ab977)
2020-02-12 15:00:32 +00:00
Michał Kępień
4bf6c17885 Merge branch 'michal/prepare-release-notes-for-bind-9.11.16' into 'v9_11'
Prepare release notes for BIND 9.11.16

See merge request isc-projects/bind9!3052
2020-02-12 13:18:59 +00:00
Michał Kępień
f9c164b08b Add release notes section for BIND 9.11.16 2020-02-12 13:58:01 +01:00
Michał Kępień
44ee969186 Merge branch 'michal/minor-README-tweaks-v9_11' into 'v9_11'
[v9_11] Minor README tweaks

See merge request isc-projects/bind9!3049
2020-02-12 10:39:09 +00:00
Michał Kępień
3ac942e5db Minor CHANGES tweak
(cherry picked from commit a0349b18e0)
2020-02-12 11:29:38 +01:00
Stephen Morris
0e1b8415a2 Minor README tweaks
(cherry picked from commit bc539d48e7)
2020-02-12 11:29:23 +01:00
Michal Nowak
7bfbf10585 Merge branch 'mnowak/coverity2-v9_11' into 'v9_11'
[v9_11] Add Coverity Scan to CI

See merge request isc-projects/bind9!3047
2020-02-12 10:15:39 +00:00
Michal Nowak
155bd283bb Add Coverity Scan to CI
This job requires two CI variables to be set:

  - COVERITY_SCAN_PROJECT_NAME: project name, which is associated with
    the BIND branch for which this job is executed, e.g. "bind-master",

  - COVERITY_SCAN_TOKEN: project token.

(cherry picked from commit e8392e4bb911366b65cdc461ec907d9e1a68bf54)
2020-02-12 10:15:39 +00:00
Mark Andrews
43b7593583 Merge branch '1602-rpz-system-test-failed-because-protoype-responses-timed-out-v9_11' into 'v9_11'
spin waiting for prototype dig responses

See merge request isc-projects/bind9!3044
2020-02-12 09:18:33 +00:00
Mark Andrews
a8ee4f9923 spin waiting for prototype dig responses
(cherry picked from commit c38752b07c)
2020-02-12 19:45:34 +11:00
Mark Andrews
919199c814 Merge branch '1616-autosign-not-waiting-long-enough-for-zone-to-be-signed-v9_11-and-maybe-others' into 'v9_11'
Resolve "autosign not waiting long enough for zone to be signed v9_11 and maybe others"

See merge request isc-projects/bind9!3039
2020-02-12 08:06:03 +00:00
Mark Andrews
c99ad5c8c7 wait for apex NSEC3 to be generated 2020-02-12 12:47:09 +11:00
Ondřej Surý
58c93bf04c Merge branch '1428-possible-data-race-in-rbtdb-happens-occasionally-on-ppc64le-v9_14-v9_11' into 'v9_11'
Resolve "Possible data race in rbtdb, happens occasionally on ppc64le"

See merge request isc-projects/bind9!3037
2020-02-11 22:06:53 +00:00
Ondřej Surý
f71a8d1120 Convert all atomic operations in isc_rwlock to sequentially-consistent ordering
The memory ordering in the rwlock was all wrong, I am copying excerpts
from the https://en.cppreference.com/w/c/atomic/memory_order#Relaxed_ordering
for the convenience of the reader:

  Relaxed ordering

  Atomic operations tagged memory_order_relaxed are not synchronization
  operations; they do not impose an order among concurrent memory
  accesses. They only guarantee atomicity and modification order
  consistency.

  Sequentially-consistent ordering

  Atomic operations tagged memory_order_seq_cst not only order memory
  the same way as release/acquire ordering (everything that
  happened-before a store in one thread becomes a visible side effect in
  the thread that did a load), but also establish a single total
  modification order of all atomic operations that are so tagged.

Which basically means that we had no or weak synchronization between
threads using the same variables in the rwlock structure.  There should
not be a significant performance drop because the critical sections were
already protected by:

  while(1) {
    if (relaxed_atomic_operation) {
      break;
    }
    LOCK(lock);
    if (!relaxed_atomic_operation) {
      WAIT(sem, lock);
    }
    UNLOCK(lock)l
  }

I would add one more thing to "Don't do your own crypto, folks.":

  - Also don't do your own locking, folks.

As part of this commit, I have also cleaned up the #ifdef spaghetti,
and fixed the isc_atomic API usage.
2020-02-11 21:20:14 +01:00
Ondřej Surý
542517b194 Make isc_rwlock.c thread-safe
The ThreadSanitizer found several possible data races in our rwlock
implementation.  This commit convert .spins and .write_granted fields
to atomic.

(cherry picked from commit 1da0994ea4)
2020-02-11 20:05:51 +01:00
Mark Andrews
4e739538d6 Merge branch 'marka-coverity-v9_11' into 'v9_11'
Address Coverity warnings in v9 11

See merge request isc-projects/bind9!3032
2020-02-11 14:07:12 +00:00
Mark Andrews
8d0b59a5f5 Silence Coverity FORWARD_NULL warning
CID 1458400 (#1 of 1): Dereference after null check
	(FORWARD_NULL) 14. var_deref_model: Passing null pointer
	nxt->typebits to mem_tobuffer, which dereferences it. [show
	details]

219        return (mem_tobuffer(target, nxt->typebits, nxt->len));
2020-02-11 13:02:08 +00:00
Mark Andrews
eeaffbe07d Silence Coverity CHECKED_RETURN warnings
CID 1458403 (#1 of 1): Unchecked return value (CHECKED_RETURN)
	8. check_return: Calling isc_socket_recv without checking
	return value (as is done elsewhere 14 out of 17 times).

121        isc_socket_recv(sock, &dev->region, 1, task, my_recv, event->ev_arg);

	CID 1458402 (#1 of 1): Unchecked return value (CHECKED_RETURN)
	2. check_return: Calling isc_socket_recv without checking
	return value (as is done elsewhere 14 out of 17 times).

149        isc_socket_recv(sock, &dev->region, 1, task, my_recv, event->ev_arg);

	CID 1458401 (#1 of 1): Unchecked return value (CHECKED_RETURN)
	6. check_return: Calling isc_socket_recv without checking
	return value (as is done elsewhere 14 out of 17 times).

226                isc_socket_recv(dev->newsocket, &region, 1,
227                                newtask, my_recv, event->ev_arg);
2020-02-11 13:02:08 +00:00
Ondřej Surý
5f90f2ac6c Merge branch 'ondrej/remove-OpenSSL-engine-specification-in-label-v9_11' into 'v9_11'
[v9_11] Cleanup support for specifying PKCS#11 engine as part of the label

See merge request isc-projects/bind9!3034
2020-02-11 10:51:42 +00:00
Ondřej Surý
ce2198c7c2 Remove reference to prepending label with engine in manpage
(cherry picked from commit 33fa3d5eb1)
2020-02-11 10:42:35 +01:00