Commit Graph
33854 Commits
Author SHA1 Message Date
Ondřej Surý 6abebaaad9 Remove locking mechanism from the isc_mempool
Now, that all the locked mempools have been replaced with simple isc_mem
context, remove unused optional locking from isc_mempool API.
2021-12-15 13:29:19 +01:00
Ondřej Surý 974f2f6ace Replace locked mempools with memory contexts
Current mempools are kind of hybrid structures - they serve two
purposes:

 1. mempool with a lock is basically static sized allocator with
    pre-allocated free items

 2. mempool without a lock is a doubly-linked list of preallocated items

The first kind of usage could be easily replaced with jemalloc small
sized arena objects and thread-local caches.

The second usage not-so-much and we need to keep this (in
libdns:message.c) for performance reasons.
2021-12-15 13:29:19 +01:00
Michal Nowak 8decad467c Merge branch '2886-drop-cppcheck-v9_16' into 'v9_16'
[v9_16] Drop cppcheck CI job

See merge request isc-projects/bind9!5640
2021-12-14 14:39:21 +00:00
Michal Nowak 4f5d0ea1a2 Drop cppcheck CI job
Every cppcheck update brings the cost of addressing new false positives
in the BIND 9 source code while not reaping any benefits in case of
identified issues with the code.

(cherry picked from commit 654cc61bb9)
2021-12-14 15:10:30 +01:00
Michal Nowak aa1f5885ab Merge branch 'mnowak/drop-debian-softhsm-ci-jobs' into 'v9_16'
Drop Debian SoftHSM v2.4 CI jobs

See merge request isc-projects/bind9!5610
2021-12-14 11:58:53 +00:00
Michal Nowak a278145a48 Drop Debian SoftHSM v2.4 CI jobs
The base image is in the process of being upgraded from Debian Buster to
Debian Bullseye, which has SoftHSM v2.6, the same SoftHSM version we
already test PKCS#11 with on Fedora. We don't need to test with two
SoftHSM 2.6 versions, drop CI jobs running on the base image.
2021-12-14 12:33:52 +01:00
Ondřej Surý a1389327aa Merge branch 'matthijs-regen-configure-after-mr-5625' into 'v9_16'
Regenerate configure file

See merge request isc-projects/bind9!5630
2021-12-09 16:51:52 +00:00
Matthijs Mekking 8dd2038f13 Regenerate configure file
Commit 3c77a51f added a configure check for OPENSSL_cleanup. The
regenerated configure file should have been added to that commit.
2021-12-09 17:03:31 +01:00
Matthijs Mekking 5928f2a5e7 Merge branch 'matthijs-fix-openssl-init-ssl-leak-v9_16' into 'v9_16'
Add OPENSSL_cleanup to tls_shutdown function (9.16)

See merge request isc-projects/bind9!5625
2021-12-09 10:07:19 +00:00
Matthijs Mekking 3c77a51f6b Add OPENSSL_cleanup to tls_shutdown function
This prevents a direct leak in OPENSSL_init_crypto (called from
OPENSSL_init_ssl).

Add shim version of OPENSSL_cleanup because it is missing in LibreSSL on
OpenBSD.

(cherry picked from commit 89f4f8f0c8)
2021-12-09 10:47:56 +01:00
Ondřej Surý 95432e0865 Merge branch '3051-missing-destroy-for-pthread-primitives-v9_16' into 'v9_16'
Stop leaking mutex in nmworker and cond in nm socket

See merge request isc-projects/bind9!5626
2021-12-08 17:39:12 +00:00
Ondřej Surý 1804a0332a Add CHANGES and release not for [GL #3051]
(cherry picked from commit dff5888d9b)
2021-12-08 18:20:16 +01:00
Ondřej SurýandOndřej Surý d5cdcf924a Stop leaking mutex in nmworker and cond in nm socket
On FreeBSD, the pthread primitives are not solely allocated on stack,
but part of the object lives on the heap.  Missing pthread_*_destroy
causes the heap memory to grow and in case of fast lived object it's
possible to run out-of-memory.

Properly destroy the leaking mutex (worker->lock) and
the leaking condition (sock->cond).

(cherry picked from commit 57d0fabadd)
2021-12-08 18:19:37 +01:00
Ondřej Surý 4ea50a810c Merge branch '2700-improve-failed-tcp-accept-logging-v9_16' into 'v9_16'
Improve the logging on failed TCP accept

See merge request isc-projects/bind9!5613
2021-12-02 13:40:39 +00:00
Ondřej Surý 597cb80c3e Add CHANGES and release note for [GL #2700]
(cherry picked from commit 9d53471890)
2021-12-02 14:20:16 +01:00
Ondřej Surý 75c484e36d Improve the logging on failed TCP accept
Previously, when TCP accept failed, we have logged a message with
ISC_LOG_ERROR level.  One common case, how this could happen is that the
client hits TCP client quota and is put on hold and when resumed, the
client has already given up and closed the TCP connection.  In such
case, the named would log:

    TCP connection failed: socket is not connected

This message was quite confusing because it actually doesn't say that
it's related to the accepting the TCP connection and also it logs
everything on the ISC_LOG_ERROR level.

Change the log message to "Accepting TCP connection failed" and for
specific error states lower the severity of the log message to
ISC_LOG_INFO.

(cherry picked from commit 20ac73eb22)
2021-12-02 14:19:46 +01:00
Arаm Sаrgsyаn dd243656be Merge branch '1608-catz-reconfig-crash-fix-v9_16' into 'v9_16'
[v9_16] Fix catalog zone reconfiguration crash

See merge request isc-projects/bind9!5608
2021-12-01 10:31:02 +00:00
Evan HuntandAram Sargsyan c243daf839 Add a regression test
Reconfigure the server without catalog-zone configuration, and then
put it back and reconfigure again, to confirm that there's no crash.

(cherry picked from commit bb411af31d)
2021-12-01 09:56:59 +00:00
Aram Sargsyan a6572062b1 Add CHANGES and release notes for [GL #1608]
(cherry picked from commit e644738310)
2021-12-01 09:56:59 +00:00
Aram Sargsyan 4b362a82eb Fix catalog zone reconfiguration crash
The following scenario triggers a "named" crash:

1. Configure a catalog zone.
2. Start "named".
3. Comment out the "catalog-zone" clause.
4. Run `rndc reconfig`.
5. Uncomment the "catalog-zone" clause.
6. Run `rndc reconfig` again.

Implement the required cleanup of the in-memory catalog zone during
the first `rndc reconfig`, so that the second `rndc reconfig` could
find it in an expected state.

(cherry picked from commit 43ac2cd229)
2021-12-01 09:56:59 +00:00
Mark Andrews f70a43d8d3 Merge branch '2850-the-list-of-fetches-at-the-end-of-rndc-recursing-output-is-very-poorly-explained-in-the-arm-v9_16' into 'v9_16'
Update the description of fetches-per-zone counters

See merge request isc-projects/bind9!5604
2021-11-30 13:04:03 +00:00
Mark Andrews 566fc191e1 Update the description of fetches-per-zone counters
(cherry picked from commit 65f6d8af75)
2021-11-30 22:40:28 +11:00
Mark Andrews 50d401be1c Merge branch '853-dnssec-dsfromkey-doesn-t-omit-revoked-ksk-v9_16' into 'v9_16'
dnssec-dsfromkey should not convert revoked keys

See merge request isc-projects/bind9!5603
2021-11-30 11:39:27 +00:00
Mark Andrews f454d0501f Add CHANGES for [GL #853]
(cherry picked from commit d632df3c11)
2021-11-30 22:11:35 +11:00
Mark Andrews f805436655 Check dnssec-dsfromkey with revoked DNSKEY
Checks that there is a revoked key in the DNSKEY RRset then checks
that only the correct number of DS records are produced.

(cherry picked from commit e7a3ada1d2)
2021-11-30 22:11:03 +11:00
Tony FinchandMark Andrews 3f7fa710d7 dnssec-dsfromkey should not convert revoked keys
it is pointless to convert revoked keys to DS or CDS records as
they cannot be used to provide a cryptographic link from the parent
zone.

(cherry picked from commit 04a5529c2d)
2021-11-30 22:11:03 +11:00
Mark Andrews 7a6de3f830 Merge branch '3009-set-dopenssl_suppress_deprecated-for-9-16-and-9-11' into 'v9_16'
Resolve "Set -DOPENSSL_SUPPRESS_DEPRECATED for 9.16 and 9.11"

See merge request isc-projects/bind9!5562
2021-11-26 13:16:25 +00:00
Mark Andrews 91052ae29e Suppress OpenSSL deprecated warnings from OpensSSL 3.0.0
We are not back porting OpenSSL 3.0.0 fixes to this branch so there
is no point in emitting warnings about using deprecated code.
Additionally this impacts --enable-developer and --enable-warn-error.
2021-11-26 12:54:21 +00:00
Mark Andrews e687014c30 Merge branch '3021-dns_sdlz_putrr-does-not-auto-increase-buffer-v9_16' into 'v9_16'
Do not convert ISC_R_NOSPACE to DNS_R_SERVFAIL too early

See merge request isc-projects/bind9!5596
2021-11-25 21:08:16 +00:00
Mark Andrews 1e908ca076 Add CHANGES for [GL #3021]
(cherry picked from commit ed5d28088a)
2021-11-26 07:47:54 +11:00
Mark Andrews bf1eaf4661 Exercise ISC_R_NOSPACE path in dns_sdlz_putrr
Use relative names when adding SOA record and a long domain
name to create SOA RR where the wire format is longer than
the initial buffer allocation in dns_sdlz_putrr.

(cherry picked from commit 6dc5248606)
2021-11-26 07:47:14 +11:00
Mark Andrews 4ace37bf73 Do not convert ISC_R_NOSPACE to DNS_R_SERVFAIL too early
The parsing loop needs to process ISC_R_NOSPACE to properly
size the buffer.  If result is still ISC_R_NOSPACE at the end
of the parsing loop set result to DNS_R_SERVFAIL.

(cherry picked from commit 08f1cba096)
2021-11-26 07:44:37 +11:00
Michal Nowak e7f23efb79 Merge branch 'mnowak/warning-array-subscript-is-of-type-char-on-netbsd-9-v9_16' into 'v9_16'
[v9_16] Fix "array subscript is of type 'char'" on NetBSD 9

See merge request isc-projects/bind9!5594
2021-11-25 18:20:11 +00:00
Michal Nowak b61eec8376 Fix "array subscript is of type 'char'" on NetBSD 9
In file included from rdata.c:602:
    In file included from ./code.h:88:
    ./rdata/in_1/svcb_64.c:259:9: warning: array subscript is of type 'char' [-Wchar-subscripts]
                            if (!isdigit(*region->base)) {
                                 ^~~~~~~~~~~~~~~~~~~~~~
    /usr/include/sys/ctype_inline.h:51:44: note: expanded from macro 'isdigit'
    #define isdigit(c)      ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_D))
                                                    ^~~~

(cherry picked from commit d09447287f)
2021-11-25 18:54:18 +01:00
Matthijs Mekking 4f4d5302c2 Merge branch 'matthijs-doc-fix-cookie-algorithm-desc-v9_16' into 'v9_16'
Update docs with correct cookie-algorithm values (9.16)

See merge request isc-projects/bind9!5583
2021-11-18 13:08:23 +00:00
Dan TheisenandMatthijs Mekking 82d2016b20 Update docs with correct cookie-algorithm values
The documentation was inconsistent with the code. The new description
for cookie-algorithm now reflects the current behavior.

The following two commits are the relevant code changes to this
section of docs: afa81ee4 a912f313

(cherry picked from commit b29a748119)
2021-11-18 13:47:08 +01:00
Michał Kępień e656d4f957 Merge branch 'v9_16_23-release' into 'v9_16'
Merge 9.16.23 release branch

See merge request isc-projects/bind9!5582
2021-11-18 08:28:40 +00:00
Michał Kępień 2512fb8873 Set up release notes for BIND 9.16.24 2021-11-18 09:19:02 +01:00
Tinderbox UserandMichał Kępień a8399473bc Merge branch 'prep-release' into v9_16_23-release 2021-11-18 09:19:02 +01:00
Michał Kępień 957dc6c4e0 Merge branch 'michal/prepare-documentation-for-bind-9.16.23' into 'v9_16_23-release'
Prepare documentation for BIND 9.16.23

See merge request isc-private/bind9!336
2021-11-18 09:19:02 +01:00
Tinderbox UserandMichał Kępień 274aae0cc7 prep 9.16.23 2021-11-18 09:19:02 +01:00
Michał Kępień b4c9087130 Prepare release notes for BIND 9.16.23 2021-11-18 09:19:02 +01:00
Michał Kępień 666cd60807 Tweak and reword release notes 2021-11-18 09:19:02 +01:00
Evan Hunt 9dec7d97d5 Merge branch '2374-mdig-ephemeral-v9_16' into 'v9_16'
Make mdig use the OS-supplied ephemeral port range

See merge request isc-projects/bind9!5579
2021-11-17 23:52:58 +00:00
Evan Hunt 43df2f3aba Make mdig use the OS-supplied ephemeral port range
mdig was always using the default 1024-65535 range for outgoing
messages, instead of using the system's configured ephemeral ports.

(cherry picked from commit 0fecb10c17)
2021-11-17 14:46:32 -08:00
Mark Andrews 18abb4fc3b Merge branch '3012-begin-end-dnssec-managed-keys-in-bin-named-config-c-are-mismatched-v9_16' into 'v9_16'
Update comments around built in trust anchors

See merge request isc-projects/bind9!5577
2021-11-16 22:05:37 +00:00
Mark Andrews 1a94a31484 Embed NAMED_SYSCONFDIR contents in the bind.keys comment
(cherry picked from commit 1d7b1f74c9)
2021-11-17 08:46:07 +11:00
Mark Andrews 4ad84547c5 Update comments around built in trust anchors
The comments now say "# BEGIN TRUST ANCHORS" and "# END TRUST ANCHORS".

(cherry picked from commit 43a7f3f532)
2021-11-17 08:46:07 +11:00
Ondřej Surý 6930550d16 Merge branch 'ondrej/update-flycheck-configuration-on-Linux-v9_16' into 'v9_16'
Add flycheck configuration for libxml2 and json-c on Linux

See merge request isc-projects/bind9!5571
2021-11-15 11:37:03 +00:00
Ondřej SurýandOndřej Surý ef5da72b05 Add flycheck configuration for libxml2 and json-c on Linux
(cherry picked from commit 41f86440c4)
2021-11-15 12:34:27 +01:00