Commit Graph
38483 Commits
Author SHA1 Message Date
Ondřej Surý 4b14bcedcf Add CHANGES note for [GL #4591]
(cherry picked from commit db69cc7891)
(cherry picked from commit 9584c4338e)
2024-02-29 16:13:19 +01:00
Ondřej Surý 3129c80741 Make the TTL-based cleaning more aggressive
It was discovered that the TTL-based cleaning could build up
a significant backlog of the rdataset headers during the periods where
the top of the TTL heap isn't expired yet.  Make the TTL-based cleaning
more aggressive by cleaning more headers from the heap when we are
adding new header into the RBTDB.

(cherry picked from commit d8220ca4ca)
(cherry picked from commit b4d9f1cbab)
2024-02-29 16:13:18 +01:00
Ondřej Surý 1c3dd0d0ff Remove expired rdataset headers from the heap
It was discovered that an expired header could sit on top of the heap
a little longer than desireable.  Remove expired headers (headers with
rdh_ttl set to 0) from the heap completely, so they don't block the next
TTL-based cleaning.

(cherry picked from commit a9383e4b95)
(cherry picked from commit 756555dbcf)
2024-02-29 16:13:18 +01:00
Ondřej Surý 9f4790d7cc Merge branch '4596-regression-in-cache-cleaning-9.18-v9.18.25-release' into 'v9.18.25-release'
[9.18.25] Reduce lock contention during RBTDB tree pruning

See merge request isc-projects/bind9!8796
2024-02-29 12:44:52 +00:00
Ondřej Surý 9e23c6967f Add CHANGES and release note for [GL #4596]
(cherry picked from commit f447557667)
(cherry picked from commit f255ab3bf7)
2024-02-29 12:40:31 +01:00
Ondřej Surý 29e9d4193b Simplify the parent cleaning in the prune_tree() mechanism
Instead of juggling with node locks in a cycle, cleanup the node we are
just pruning and send any the parent that's also subject to the pruning
to the prune tree via normal way (e.g. enqueue pruning on the parent).

This simplifies the code and also spreads the pruning load across more
event loop ticks which is better for lock contention as less things run
in a tight loop.

(cherry picked from commit 0b32d323e0)
(cherry picked from commit a4c225cb6d)
2024-02-29 12:39:26 +01:00
Ondřej Surý 156a08e327 Reduce lock contention during RBTDB tree pruning
The log message for commit a9af1ac5ae
explained:

    In some older BIND 9 branches, the extra queuing overhead eliminated by
    this change could be remotely exploited to cause excessive memory use.
    Due to architectural shift, this branch is not vulnerable to that issue,
    but applying the fix to the latter is nevertheless deemed prudent for
    consistency and to make the code future-proof.

However, it turned out that having a single queue for the nodes to be
pruned increased lock contention to a level where cleaning up nodes from
the RBTDB took too long, causing the amount of memory used by the cache
to grow indefinitely over time.

This commit reverts the change to the pruning mechanism introduced by
commit a9af1ac5ae as BIND branches newer
than 9.16 were not affected by the excessive event queueing overhead
issue mentioned in the log message for the above commit.

(cherry picked from commit eed17611d8)
(cherry picked from commit 4b32456705)
2024-02-29 12:39:26 +01:00
Ondřej Surý e6eb345509 Merge branch '4595-fix-expire-lru-headers-race-9.18' into 'v9.18.25-release'
[9.18] Do not use header_prev in expire_lru_headers

See merge request isc-projects/bind9!8776
2024-02-23 14:49:28 +00:00
Mark AndrewsandOndřej Surý f228d5e683 Add CHANGES and release note for [GL #4495]
(cherry picked from commit 4f8539ac23)
2024-02-23 12:36:42 +01:00
Mark AndrewsandOndřej Surý 61ca526590 Do not use header_prev in expire_lru_headers
dns__cacherbt_expireheader can unlink / free header_prev underneath
it.  Use ISC_LIST_TAIL after calling dns__cacherbt_expireheader
instead to get the next pointer to be processed.

(cherry picked from commit 7ce2e86024)
2024-02-23 12:36:42 +01:00
Ondřej Surý a2b7194952 Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.18.25-v9.18.25-release' into 'v9.18.25-release'
Update BIND version to 9.18.25-dev

See merge request isc-projects/bind9!8779
2024-02-23 11:26:55 +00:00
Michał KępieńandOndřej Surý ffaed05053 Set up release notes for BIND 9.18.25
(cherry picked from commit eef4bc99d0)
2024-02-23 12:25:55 +01:00
Michał KępieńandOndřej Surý 65df298b3a Update BIND version to 9.18.25-dev
(cherry picked from commit 5e3d4ade06)
2024-02-23 12:25:00 +01:00
Michał Kępień 6d7674f8f2 Update BIND version for release v9.18.24 2024-02-11 11:39:40 +01:00
Michał Kępień b402191074 Add a CHANGES marker 2024-02-11 11:39:40 +01:00
Michał Kępień 4ba9ebefd1 Merge branch 'michal/prepare-documentation-for-bind-9.18.24' into 'v9.18.24-release'
Prepare documentation for BIND 9.18.24

See merge request isc-private/bind9!657
2024-02-11 10:38:21 +00:00
Michał Kępień 0b7dc5eca7 Merge branch '4568-fix-isc_ht-case-insensitive-matching-9.18.24' into 'v9.18.24-release'
[9.18.24] Fix case insensitive matching in isc_ht hash table implementation

See merge request isc-private/bind9!656
2024-02-11 10:26:52 +00:00
Michał Kępień 886793e8de Add release note for GL #4459 2024-02-11 11:23:28 +01:00
Ondřej SurýandMichał Kępień bb1bf51f10 Add CHANGES note for [GL #4568]
(cherry picked from commit b7797adc4e)
2024-02-11 11:23:28 +01:00
Michał Kępień 5ce386aa5c Prepare release notes for BIND 9.18.24 2024-02-11 11:23:28 +01:00
Ondřej SurýandMichał Kępień c8b623d87f Add a system test for mixed-case data for the same owner
We were missing a test where a single owner name would have multiple
types with a different case.  The generated RRSIGs and NSEC records will
then have different case than the signed records and message parser have
to cope with that and treat everything as the same owner.

(cherry picked from commit 14e435b814)
2024-02-11 11:23:28 +01:00
Ondřej SurýandMichał Kępień c462d65b2f Fix case insensitive matching in isc_ht hash table implementation
The case insensitive matching in isc_ht was basically completely broken
as only the hashvalue computation was case insensitive, but the key
comparison was always case sensitive.

(cherry picked from commit ec11aa2836)
2024-02-11 11:23:28 +01:00
Michal Nowak cb49b26a34 Update BIND version for release 2024-02-02 11:05:55 +01:00
Michal Nowak 671b8174c8 Add a CHANGES marker 2024-02-02 11:05:35 +01:00
Michal Nowak bd03be1ab7 Merge branch 'michal/prepare-documentation-for-bind-9.18.23' into 'v9.18.23-release'
Prepare documentation for BIND 9.18.23

See merge request isc-private/bind9!644
2024-02-02 10:04:25 +00:00
Michał Kępień 462a9af182 Add release note for GL #4487 2024-02-02 09:22:13 +01:00
Michał Kępień 4ac103a6b3 Prepare release notes for BIND 9.18.23 2024-02-02 09:22:13 +01:00
Michał Kępień 57a5ecc468 Merge branch 'ondrej/split-taskmgr-9.18' into 'v9.18.23-release'
[9.18] [CVE-2023-50387] Fix KeyTrap

See merge request isc-private/bind9!628
2024-02-01 20:49:44 +00:00
Ondřej SurýandMichał Kępień c847092a17 Add CHANGES and release note for [GL #4424] 2024-02-01 21:47:29 +01:00
Ondřej SurýandMichał Kępień f39cd17a26 Optimize selecting the signing key
Don't parse the crypto data before parsing and matching the id and the
algorithm for consecutive DNSKEYs.  This allows us to parse the RData
only in case the other parameters match allowing us to skip keys that
are of no interest to us, but still would consume precious CPU time by
parsing possibly garbage with OpenSSL.
2024-02-01 21:47:29 +01:00
Ondřej SurýandMichał Kępień 21af5c9a97 Don't iterate from start every time we select new signing key
Remember the position in the iterator when selecting the next signing
key.  This should speed up processing for larger DNSKEY RRSets because
we don't have to iterate from start over and over again.
2024-02-01 21:47:29 +01:00
Mark AndrewsandMichał Kępień 0add293477 Fail processing incoming DNS message on first validation failure
Stop processing the DNS validation when first validation failure occurs
in the DNS message.
2024-02-01 21:47:29 +01:00
Mark AndrewsandMichał Kępień 439e16e4de Skip revoked keys when selecting DNSKEY in the validation loop
Don't select revoked keys when iterating through DNSKEYs in the DNSSEC
validation routines.
2024-02-01 21:47:29 +01:00
Ondřej SurýandMichał Kępień 1b3b0cef22 Split fast and slow task queues
Change the taskmgr (and thus netmgr) in a way that it supports fast and
slow task queues.  The fast queue is used for incoming DNS traffic and
it will pass the processing to the slow queue for sending outgoing DNS
messages and processing resolver messages.

In the future, more tasks might get moved to the slow queues, so the
cached and authoritative DNS traffic can be handled without being slowed
down by operations that take longer time to process.
2024-02-01 21:47:29 +01:00
Michał Kępień b7685dd452 Merge branch '4234-confidential-parser-regression-9.18' into 'v9.18.23-release'
[9.18] fix a message parsing regression

See merge request isc-private/bind9!633
2024-02-01 20:27:15 +00:00
Michał Kępień 48324b06d0 Add a CHANGES entry
(cherry picked from commit 04ba284e1a)
2024-02-01 21:24:26 +01:00
Aram SargsyanandMichał Kępień cf34bccf4c fix another message parsing regression
The fix for CVE-2023-4408 introduced a regression in the message
parser, which could cause a crash if an rdata type that can only
occur in the question was found in another section.

(cherry picked from commit 510f1de8a6)
2024-02-01 21:24:26 +01:00
Evan HuntandMichał Kępień 6d70ccd128 fix a message parsing regression
the fix for CVE-2023-4408 introduced a regression in the message
parser, which could cause a crash if duplicate rdatasets were found
in the question section. this commit ensures that rdatasets are
correctly disassociated and freed when this occurs.

(cherry picked from commit 4c19d35614)
2024-02-01 21:24:26 +01:00
Artem Boldariev b626567984 Merge branch '4487-dot-ensure-that-no-more-than-one-message-from-a-server-is-processed' into 'v9.18.23-release'
Fix reading extra messages in TLS DNS in client mode

See merge request isc-private/bind9!635
2024-01-22 10:23:17 +00:00
Artem Boldariev 6b9ccae537 Modify CHANGES [GL #4487]
Mention that TLS DNS will not process more than one message at a time
when that was not expected.
2024-01-18 22:54:08 +02:00
Artem Boldariev a15c5b1687 Add a unit test which would fail on excessive reads
This commit adds a unit tests which would fail/crash/abort if
excessive reads were possible.

See [GL #4487]
2024-01-18 22:53:43 +02:00
Artem Boldariev 7b390a7fb6 Fix reading extra messages in TLS DNS in client mode
When connecting to a remote party the TLS DNS code could process more
than one message at a time despite the fact that it is expected that
we should stop after every DNS message.

Every DNS message is handled and consumed from the input buffer by
isc__nm_process_sock_buffer(). However, as opposed to TCP DNS code, it
can be called more than once when processing incoming data from a
server (see tls_cycle_input()). That, in turn means that we can
process more than one message at a time. Some higher level code might
not expect that, as it breaks the contract.

In particular, in the original report that happened during
isc__nm_async_tlsdnsshutdown() call: when shutting down multiple calls
to tls_cycle() are possible (each possibly leading to a
isc__nm_process_sock_buffer()). If there are any non processed
messages left, for any of the messages left the read callback will be
called even when it is not expected as there were no preceding
isc_nm_read().

To keep TCP DNS and TLS DNS code in sync, we make a similar change to
it as well, although it should not matter.
2024-01-17 22:35:25 +02:00
Michal Nowak 0a6472be29 Update BIND version for release 2024-01-05 14:46:13 +01:00
Michal Nowak 791cdac410 Add a CHANGES marker 2024-01-05 14:45:55 +01:00
Michal Nowak e08dec4ff0 Merge branch 'michal/prepare-documentation-for-bind-9.18.22' into 'v9.18.22-release'
Prepare documentation for BIND 9.18.22

See merge request isc-private/bind9!625
2024-01-05 13:43:20 +00:00
Michał Kępień 0eb83555ea Fix Danger rules for flagging release note issues
The logic contained in dangerfile.py incorrectly warns about missing
release note changes for merge requests preparing release documentation
as such merge requests rename files in the doc/notes/ directory.  This
(correctly) causes these files to be passed to dangerfile.py via
danger.git.created_files and danger.git.deleted_files rather than via
danger.git.modified_files, which in turn causes the logic checking the
use of the "Release Notes" label to assume that no release notes are
added, removed, or modified by a given merge request.

Fix by considering all types of file changes (modifications, additions,
and removals - which also covers file renaming) when checking whether a
given merge request modifies release notes.  Update the warning messages
accordingly.

However, when trying to find release notes added by a given merge
request, deleted files must not be considered.  Tweak the logic looking
for GitLab identifiers in the release notes added by a given merge
request so that it only scans modified and added (or renamed) files.

(cherry picked from commit 0fec404c64)
2024-01-05 12:55:58 +01:00
Michał Kępień 6901452117 Tweak and reword release notes 2024-01-05 12:55:58 +01:00
Michał Kępień 8c875b2f1b Prepare release notes for BIND 9.18.22 2024-01-05 12:55:58 +01:00
Michał Kępień febc027ea4 Merge branch '4383-limit-tree-pruning-overhead-9.18' into 'v9.18.22-release'
[9.18] Limit isc_task_send() overhead for tree pruning

See merge request isc-private/bind9!620
2024-01-05 11:45:42 +00:00
Michał Kępień 4ddf9fa508 Add CHANGES entry for GL #4383
(cherry picked from commit 04df558d57)
2024-01-05 12:38:16 +01:00