Commit Graph
38460 Commits
Author SHA1 Message Date
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
Michał Kępień a9af1ac5ae Limit isc_task_send() overhead for tree pruning
Instead of issuing a separate isc_task_send() call for every RBTDB node
that triggers tree pruning, maintain a list of nodes from which tree
pruning can be started from and only issue an isc_task_send() call if
pruning has not yet been triggered by another RBTDB node.

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.

(cherry picked from commit 24381cc36d)
2024-01-05 12:38:16 +01:00
Michał Kępień efbe5b660d Merge branch '4334-confidential-dns64-and-serve-stale-bind-9.18' into 'v9.18.22-release'
[9.18] [CVE-2023-5679] Fix a bad interaction between DNS64 and serve-stale

See merge request isc-private/bind9!602
2024-01-05 11:26:58 +00:00
Mark AndrewsandMichał Kępień b818821087 Add release note for [GL #4334]
(cherry picked from commit c4faf5c69f)
2024-01-05 12:20:25 +01:00
Mark AndrewsandMichał Kępień 67b9347057 Add CHANGES note for [GL #4334]
(cherry picked from commit 26671f8c47)
2024-01-05 12:20:25 +01:00
Mark AndrewsandMichał Kępień f7e137f321 Restore dns64 state during serve-stale processing
If we are in the process of looking for the A records as part of
dns64 processing and the server-stale timeout triggers, redo the
dns64 changes that had been made to the orignal qctx.

(cherry picked from commit 1fcc483df1)
2024-01-05 12:20:25 +01:00
Michał Kępień c747f1ca6f Merge branch '4281-confidential-redirect-rfc1918-check-failure-bind-9.18' into 'v9.18.22-release'
[9.18] [CVE-2023-5517] Fix handling of RFC 1918 reverse queries with "nxdomain-redirect" enabled

See merge request isc-private/bind9!612
2024-01-05 11:12:59 +00:00
Mark AndrewsandMichał Kępień 349d9d3fee Add release note for [GL #4281]
(cherry picked from commit 2fbafc2675)
2024-01-05 12:03:59 +01:00
Mark AndrewsandMichał Kępień 121473e8b5 Add CHANGES note for [GL #4281]
(cherry picked from commit 0748965b7c)
2024-01-05 12:03:59 +01:00
Mark AndrewsandMichał Kępień b42b1fe051 Save the correct result value to resume with nxdomain-redirect
The wrong result value was being saved for resumption with
nxdomain-redirect when performing the fetch.  This lead to an assert
when checking that RFC 1918 reverse queries where not leaking to
the global internet.

(cherry picked from commit 9d0fa07c5e)
2024-01-05 12:03:59 +01:00
Michał Kępień 7f39a9888b Merge branch '4234-confidential-use-hashmap-when-parsing-9.18' into 'v9.18.22-release'
[9.18] [CVE-2023-4408] Use hashtable when parsing DNS messages

See merge request isc-private/bind9!585
2024-01-05 10:58:01 +00:00
Ondřej SurýandMichał Kępień 968d0a1415 Add CHANGES and release note for [GL #4234]
(cherry picked from commit 30d27928cf)
2024-01-05 11:50:23 +01:00
Ondřej SurýandMichał Kępień 849c05adf4 Use hashtable when parsing a message
When parsing messages use a hashtable instead of a linear search to
reduce the amount of work done in findname when there's more than one
name in the section.

There are two hashtables:

1) hashtable for owner names - that's constructed for each section when
we hit the second name in the section and destroyed right after parsing
that section;

2) per-name hashtable - for each name in the section, we construct a new
hashtable for that name if there are more than one rdataset for that
particular name.

(cherry picked from commit b8a9631754)
2024-01-05 11:50:23 +01:00
Michał Kępień 346b26823c Merge branch '4182-confidential-fix-races-in-dns-tsigkey-find-9.18' into 'v9.18.22-release'
[9.18] Address race in dns_tsigkey_find()

See merge request isc-private/bind9!622
2024-01-05 10:30:14 +00:00
Mark AndrewsandMichał Kępień 0a8367e17b Add CHANGES note for [GL #4182]
(cherry picked from commit a62cda787f)
2024-01-05 11:19:58 +01:00
Mark AndrewsandMichał Kępień f46a81932f Address race in dns_tsigkey_find()
Restart the process with a write lock if we discover an expired key
while holding the read lock.

(cherry picked from commit d2ba96488e)
2024-01-05 11:19:58 +01:00
Aydın Mercan 75677d375e Merge branch '4467-fix-stats-export-overflow-v9_18' into 'bind-9.18'
[9.18] Avoid overflow during statistics dump

See merge request isc-projects/bind9!8574
2024-01-03 18:20:17 +00:00
Aydın Mercan a83c749115 Use <isc/atomic.h> instead of <stdatomic.h> directly in <isc/types.h> 2024-01-03 20:36:35 +03:00
Aydın Mercan 6c0ae4ef6e Move atomic statscounter next to the non-atomic definition
(cherry picked from commit 9c4dd863a6)
2024-01-03 20:36:35 +03:00
Aydın Mercan 9601763943 Use a non-atomic counter when passing to stats dumper
(cherry picked from commit bb96142a17)
2024-01-03 20:36:35 +03:00
Petr ŠpačekandAydın Mercan b913d44ce6 Add CHANGES and release note for [GL #4467]
(cherry picked from commit b57c37d8c5)
2024-01-03 20:36:27 +03:00
Petr ŠpačekandAydın Mercan d33b0f9ddb Avoid overflow during statistics dump
Related: !1493
Fixes: #4467
(cherry picked from commit 7b0115e331)
2024-01-03 20:10:27 +03:00
Mark Andrews 0c49507b1b Merge branch '4513-system-tests-fail-with-net-dns-1-42-bind-9.18' into 'bind-9.18'
[9.18] Resolve "System tests fail with Net::DNS 1.42"

See merge request isc-projects/bind9!8618
2024-01-03 02:24:43 +00:00
Mark Andrews b831223b3e Support Net::DNS::Nameserver 1.42
In Net::DNS 1.42 $ns->main_loop no longer loops.  Use current methods
for starting the server, wait for SIGTERM then cleanup child processes
using $ns->stop_server(), then remove the pid file.

(cherry picked from commit c2c59dea60)
2024-01-03 11:57:59 +11:00