Commit graph

39825 commits

Author SHA1 Message Date
Michal Nowak
ee46748eea Update BIND version to 9.19.18-dev 2023-09-12 08:11:52 +02:00
Michal Nowak
6bda72d26f Merge branch '4242-placeholder' into 'main'
Add CHANGES placeholder for [GL #4242]

Closes #4242

See merge request isc-projects/bind9!8284
2023-09-07 08:21:45 +00:00
Michal Nowak
a8cba9b672
Add CHANGES placeholder for [GL #4242] 2023-09-07 10:18:56 +02:00
Michal Nowak
b237414ae2 Merge branch '4152-placeholder' into 'main'
Add CHANGES placeholder for [GL #4152]

See merge request isc-projects/bind9!8283
2023-09-07 08:18:01 +00:00
Michal Nowak
b4ec7c79bb
Add CHANGES placeholder for [GL #4152] 2023-09-06 16:03:42 +02:00
Mark Andrews
b6e5960b09 Merge branch '4290-raise-log-level-to-isc_log_error-on-formerr-in-xfrin-c' into 'main'
Resolve "raise log level to ISC_LOG_NOTICE on FORMERR in xfrin.c"

Closes #4290

See merge request isc-projects/bind9!8262
2023-09-06 09:13:23 +00:00
Mark Andrews
b867244305 Add a CHANGES note for [GL #4290] 2023-09-06 02:24:53 +00:00
Mark Andrews
6c3414739d Adjust level of log messages when transferring in a zone
This raises the log level of messages treated as FORMERR to NOTICE
when transfering in a zone.  This also adds a missing log message
for TYPE0 and meta types received during a zone transfer.
2023-09-06 02:24:53 +00:00
Mark Andrews
fafa7f397b Merge branch '4291-check-dig-exit-status' into 'main'
Resolve "RNDC system test failed to run to completion"

Closes #4291

See merge request isc-projects/bind9!8264
2023-09-06 01:32:21 +00:00
Mark Andrews
701ad350f8 Check dig's exist status 2023-09-06 01:03:11 +00:00
Mark Andrews
49f6bf862f Merge branch '4292-uncleared-libcrypto-error-crypto-evp-evp_fetch-c-373-inner_evp_generic_fetch' into 'main'
Resolve "Uncleared libcrypto error: crypto/evp/evp_fetch.c:373 inner_evp_generic_fetch"

Closes #4292

See merge request isc-projects/bind9!8274
2023-09-06 01:02:52 +00:00
Mark Andrews
28adcf1831 Call ERR_clear_error on EVP_MD_fetch or EVP_##alg error 2023-09-06 00:28:56 +00:00
Mark Andrews
028154d416 Merge branch '4214-uaf-in-validator-logging' into 'main'
Resolve "UAF in validator logging"

Closes #4214

See merge request isc-projects/bind9!8269
2023-09-05 23:51:25 +00:00
Mark Andrews
1fed5c8171 Add CHANGES for [GL #4214] 2023-09-06 09:23:00 +10:00
Mark Andrews
cf63cb1136 Restore dns_validator_destroy and fetchctx_detach call order
7a78a85b moved the destruction of the validator from near the start
validated to the end.  This reversed the order of dns_validator_destroy
and fetchctx_detach.  Restore the order so that val->name remains
valid for the lifetime of the validator.
2023-09-06 09:23:00 +10:00
Ondřej Surý
5173849d72 Merge branch 'mnowak/statschannel-system-test-is-too-verbose' into 'main'
Disable command tracing in statschannel system test

See merge request isc-projects/bind9!8277
2023-09-05 17:05:29 +00:00
Michal Nowak
f0c37d861c
Disable command tracing in statschannel system test
Command tracing was added recently via
26e10e8fb5 and makes the system test too
verbose.
2023-09-05 19:01:27 +02:00
Ondřej Surý
fb233b3fc5 Merge branch '4296-ignore-jemalloc-versions-before-4.0.0' into 'main'
Ignore jemalloc versions before 4.0.0

Closes #4296

See merge request isc-projects/bind9!8273
2023-09-05 16:54:55 +00:00
Ondřej Surý
7423557e42
Add CHANGES and release note for [GL #4296] 2023-09-05 18:47:29 +02:00
Aram Sargsyan
2084986462
Synchronize used library versions reporting functions
There are libraries which are reported in printversion(), but not
reported in setup(). Synchronize the functions, so that the log
file could have the same information as reported by the 'named -V'
command execution.
2023-09-05 18:47:29 +02:00
Ondřej Surý
2e99dcefa8
Print the used jemalloc version in autoconf and named -V output
The autoconf and named -V now prints used version of jemalloc.  This
doesn't work with system supplied jemalloc, so in it prints `system`
instead in the autoconf and nothing in named -V output.
2023-09-05 18:47:21 +02:00
Ondřej Surý
d862f4bc64
Ignore jemalloc versions before 4.0.0
We now depend on explicitly creating memory arenas and disabling tcache
on those, and these features are not available with jemalloc < 4.
Instead of working around these issues, make the jemalloc >= 4.0.0 hard
requirement by looking for sdallocx() symbol that's only available from
that version.

The jemalloc < 4 was only used by RHEL 7 which is not supported since
BIND 9.19+.
2023-09-05 18:46:57 +02:00
Michal Nowak
be33cfa3f6 Merge branch '4255-placeholder' into 'main'
Add CHANGES placeholder for [GL #4255]

See merge request isc-projects/bind9!8275
2023-09-05 16:08:07 +00:00
Michal Nowak
e70a937b3f
Add CHANGES placeholder for [GL #4255] 2023-09-05 17:57:18 +02:00
Ondřej Surý
dd658c454e Merge branch '4038-specialised-arena-per-worker' into 'main'
Make it possible to create memory contexts backed by jemalloc arenas

Closes #4038

See merge request isc-projects/bind9!8270
2023-09-05 08:23:42 +00:00
Artem Boldariev
60d52a49b0
Add CHANGES and release note for [GL #4038]
Mention that send buffer allocations/deallocations are now routed
through dedicated memory arenas.
2023-09-05 09:39:41 +02:00
Artem Boldariev
01cc7edcca
Allocate DNS send buffers using dedicated per-worker memory arenas
This commit ensures that memory allocations related to DNS send
buffers are routed through dedicated per-worker memory arenas in order
to decrease memory usage on high load caused by TCP-based DNS
transports.

We do that by following jemalloc developers suggestions:

https://github.com/jemalloc/jemalloc/issues/2483#issuecomment-1639019699
https://github.com/jemalloc/jemalloc/issues/2483#issuecomment-1698173849
2023-09-05 09:39:41 +02:00
Artem Boldariev
6e98b58d15
Add ability to set per jemalloc arena dirty and muzzy decay values
This commit adds couple of functions to change "dirty_decay_ms" and
"muzzy_decay_ms" settings on arenas associated with memory contexts.
2023-09-05 09:39:41 +02:00
Artem Boldariev
8550c52588
Make it possible to create memory contexts backed by jemalloc arenas
This commit extends the internal memory management middleware code in
BIND so that memory contexts backed by dedicated jemalloc arenas can
be created. A new function (isc_mem_create_arena()) is added for that.

Moreover, it extends the existing code so that specialised memory
contexts can be created easily, should we need that functionality for
other future purposes. We have achieved that by passing the flags to
the underlying jemalloc-related calls. See the above
isc_mem_create_arena(), which can serve as an example of this.

Having this opens up possibilities for creating memory contexts tuned
for specific needs.
2023-09-05 09:39:41 +02:00
Ondřej Surý
912d6a13e4 Merge branch '4263-deprecate-dnssec-must-be-secure-feature' into 'main'
Deprecate 'dnssec-must-be-secure' option

See merge request isc-projects/bind9!8267
2023-09-04 13:14:48 +00:00
Ondřej Surý
898f0ee3cf
Add CHANGES and release note for [GL #4263] 2023-09-04 13:47:33 +02:00
Ondřej Surý
9e0b348a2b
Deprecate 'dnssec-must-be-secure' option
The dnssec-must-be-secure feature was added in the early days of BIND 9
and DNSSEC and it makes sense only as a debugging feature.

Remove the feature to simplify the code.
2023-09-04 13:38:14 +02:00
Michał Kępień
eac0a4b3ed Merge branch 'michal/reorganize-vulnerability-docs' into 'main'
Move security-related information to SECURITY.md

See merge request isc-projects/bind9!8257
2023-09-04 09:56:54 +00:00
Michał Kępień
ca9fed9143
Move security-related information to SECURITY.md
To follow current best practices, create a short SECURITY.md file in the
root of the repository that contains information about the project's
security policy and guidelines for reporting potential security issues.
Replace the relevant bits of text in other files with references to the
new SECURITY.md file, so that the relevant information only needs to be
maintained in one place.

Replace all occurrences of the generic security-officer@isc.org email
with a dedicated address for reporting BIND 9 security issues,
bind-security@isc.org.
2023-09-04 11:54:57 +02:00
Ondřej Surý
00a6268c8f Merge branch 'each-cleanup-rbt' into 'main'
replace RBT usage throughout named

See merge request isc-projects/bind9!8213
2023-09-04 09:07:32 +00:00
Evan Hunt
9c25a09e5d
CHANGES for [GL !8213] 2023-09-04 10:19:48 +02:00
Evan Hunt
1019c0c0b1
unconditionally create view and resolver nametrees
instead of allowing a NULL nametree in dns_nametree_covered(),
require nametree to exist, and ensure that the nametrees defined
for view and resolver objects are always created.
2023-09-04 10:19:48 +02:00
Evan Hunt
1a238a0f86
use a count nametree for synthfromdnssec
use the count semantics for dns_nametree to support view->sfd.
2023-09-04 10:19:48 +02:00
Evan Hunt
b1e4e2a9ee
add a 'foundname' argument to dns_nametree_covered()
when checking whether a name is covered, the ancestor name that
was found can be set into a name object passed in.
2023-09-04 10:19:48 +02:00
Evan Hunt
0ebaa26da7
add semantics to name trees to support counters
name trees can now also hold trees of counters. each time a name
dns_nametree_add() is called with a given name, the counter for that
name is incremented; the name is not deleted until dns_nametree_delete()
is called the same number of times.

this is meant to be used for synth-from-dnssec, which is incremented for
each key defined at a name, and decremented when a key is removed, the
name must continue to exist until the number of keys has reached zero.
2023-09-04 10:19:48 +02:00
Evan Hunt
bc3fd1a2ef
use bitfield name trees for disable-algorithms and disable-ds-digests
switch disable-algorithms and disable-ds-digests to use
bitfield-type name trees, replacing the RBT-based bftree.
2023-09-04 10:19:48 +02:00
Evan Hunt
9ed1dba976
add semantics to dns_nametree to support bitfields
name trees can now hold either boolean values or bit fields. the
type is selected when the name tree is created.

the behavior of dns_nametree_add() differs slightly beteween the types:
in a boolean tree adding an existing name will return ISC_R_EXISTS,
but in a bitfield tree it simply sets the specified bit in the bitfield
and returns ISC_R_SUCCESS.
2023-09-04 10:19:48 +02:00
Evan Hunt
54fc02410e refactor disable_algorithm and disable_ds_digest to use one data structure
the functions for disabling DNSSEC signing algorithms and DS digest
algorithms in resolver.c had a lot of duplicated code.

this commit adds functions to implement a "bitfield tree", which is
(currently) an RBT in which the node data contains arbitrary-sized
bitfields to indicate whether a value has been added at the given
node or not. (it can be changed to a QP trie later.)

it also replaces the functions dns_resolver_disable_algorithm(),
dns_resolver_algorithm_supported(), dns_resolver_disable_ds_digest()
and dns_resolver_ds_digest_supported() with simple wrappers that call
the new functions.
2023-09-01 10:46:58 -07:00
Evan Hunt
e83ac0ce65 use dns_nametree in place of RBTs
replace the use of RBTs for deny-answer-aliases, the exclude
lists for deny-answer-aliases and deny-answer-addresses, and
dnssec-must-be-secure, with name trees.
2023-09-01 10:46:53 -07:00
Evan Hunt
56114aaa0d add dns_nametree structure for policy match lookups
this is a QP trie of boolean values to indicate whether a name is
included in or excluded from some policy. this can be used for
synth-from-dnssec, deny-answer-aliases, etc.
2023-09-01 10:46:48 -07:00
Evan Hunt
9067b637d8 replace RBTs with hashmaps in dns_transport
as dns_transport_find() is only concerned with finding an exact
match on the specified name it doesn't need to use a tree data
structure internally, we can replace the RBTs with hash tables.
2023-09-01 10:39:39 -07:00
Mark Andrews
5969a7c1ac Merge branch '4159-openssl-error-queue-not-cleaned' into 'main'
Resolve "OpenSSL error queue not cleaned"

Closes #4159

See merge request isc-projects/bind9!8233
2023-09-01 03:08:20 +00:00
Mark Andrews
6a1a73759a Add release note for [GL #4159] 2023-09-01 12:01:51 +10:00
Mark Andrews
6c3d4d7aa2 Add CHANGES note for [GL #4159] 2023-09-01 12:01:50 +10:00
Mark Andrews
14727bb4b9 Detect uncleared libcrypto errors in rdata processing
If libcrypto errors are not cleared slow memory leaks occur which
are not detected at shutdown.
2023-09-01 12:01:20 +10:00