Commit graph

36166 commits

Author SHA1 Message Date
Matthijs Mekking
0ba0ef4e20 Document where updates and DNSSEC records are stored
Make clear that inline-signing stores DNSSEC records in a signed
version of the zone, using the zone's filename plus ".signed" extension.

Tell that dynamic zones store updates in the zone's filename.

DNSSEC records for dynamic zones also go in the zone's filename, unless
inline-signing is enabled.

Then, dnssec-policy assumes inline-signing, but only if the zone is
not dynamic.

(cherry picked from commit 8860f6b4ff)
2022-06-20 15:28:58 +02:00
Michal Nowak
d2b83e8b4a Merge branch 'mnowak/bump-clang-to-version-14-v9_18' into 'v9_18'
[v9_18] Update clang to version 14

See merge request isc-projects/bind9!6455
2022-06-17 06:35:09 +00:00
Michal Nowak
0819f7ecac
Extract Clang version to $CLANG_VERSION
Extracting Clang version helps with updating Clang version in one place
and not missing one of its instances.

(cherry picked from commit bd17dec045)
2022-06-16 18:09:33 +02:00
Michal Nowak
82268504c9
Fix external_symbolizer_path on Fedora
The external_symbolizer_path was wrong on Fedora since moving gcc:tsan
jobs from Debian to Fedora.

(cherry picked from commit e98b9c5009)
2022-06-16 18:09:33 +02:00
Michal Nowak
d3eb307e3c
Update clang to version 14
(cherry picked from commit 1c45a9885a)
2022-06-16 18:09:33 +02:00
Michal Nowak
b8134e4c78 Merge branch 'mnowak/checkds-pylint-implicit-str-concat-fixes-v9_18' into 'v9_18'
[v9_18] Fix implicit string concatenation in tests-checkds.py

See merge request isc-projects/bind9!6453
2022-06-16 11:47:29 +00:00
Michal Nowak
8b77533ac3
Fix implicit string concatenation in tests-checkds.py
pylint 2.14.2 reports the following warnings:

    bin/tests/system/checkds/tests-checkds.py:265:0: W1404: Implicit string concatenation found in call (implicit-str-concat)
    bin/tests/system/checkds/tests-checkds.py:273:0: W1404: Implicit string concatenation found in call (implicit-str-concat)

(cherry picked from commit 831ac8add1)
2022-06-16 13:41:06 +02:00
Tom Krizek
b7ff587512 Merge branch 'tkrizek/pytest-skipped-reason-v9_18' into 'v9_18'
Report reasons for skipped/xfailed system pytests [v9_18]

See merge request isc-projects/bind9!6451
2022-06-16 07:55:08 +00:00
Tom Krizek
1d847def2a
Report reasons for skipped/xfailed system pytests
If skip/xfail is used in pytest, it can have a reason string associated
with it. When evaluating these tests, it can be useful to be able to
differentiate the reason why the test was skipped/xfailed/xpassed,
because there might be multiple possible reasons for that.

The extra options passed to pytest ensure that the string with the
reason appears in the test summary and thus we're able to find the
string with the reason in the log output.

See https://docs.pytest.org/en/7.1.x/how-to/skipping.html for more info

(cherry picked from commit f6d368167a)
2022-06-16 09:19:50 +02:00
Petr Špaček
6d46fa4052 Merge branch 'pspacek/nsec3-doc-update-v9_18' into 'v9_18'
Update NSEC3 guidance to match draft-ietf-dnsop-nsec3-guidance-10 [v9_18]

See merge request isc-projects/bind9!6447
2022-06-15 16:11:24 +00:00
Petr Špaček
bd1ad27ff4
Update NSEC3 guidance to match draft-ietf-dnsop-nsec3-guidance-10
https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-nsec3-guidance-10
is on it's way to become RFC, so let's update our recommendations in the
docs to be in line with it.

(cherry picked from commit 2ee3f4e6c8)
2022-06-15 17:57:40 +02:00
Artem Boldariev
63aef08ea2 Merge branch 'artem-client-tls-sessions-reuse-backport-v9_18' into 'v9_18'
[Backport to 9.18]: TLS session resumption support

See merge request isc-projects/bind9!6445
2022-06-15 15:08:11 +00:00
Artem Boldariev
b3490213eb CID 352848: split xfrin_start() and remove dead code
This commit separates TLS context creation code from xfrin_start() as
it has become too large and hard to follow into a new
function (similarly how it is done in dighost.c)

The dead code has been removed from the cleanup section of the TLS
creation code:

* there is no way 'tlsctx' can equal 'found';
* there is no way 'sess_cache' can be non-NULL in the cleanup section.

Also, it fixes a bug in the older version of the code, where TLS
client session context fetched from the cache would not get passed to
isc_nm_tlsdnsconnect().

(cherry picked from commit 98f758ed4f)
2022-06-15 17:02:45 +03:00
Artem Boldariev
a954eacbac CID 352849: refactor get_create_tls_context() within dighost.c
This commit removes dead code from cleanup handling part of the
get_create_tls_context().

In particular, currently:

* there is no way 'found_ctx' might equal 'ctx';
* there is no way 'session_cache' might equal a non-NULL value while
cleaning up after a TLS initialisation error.

(cherry picked from commit 095b608412)
2022-06-15 17:02:45 +03:00
Artem Boldariev
334eeef5a1 Do not provide a shim for SSL_SESSION_is_resumable()
The recently added TLS client session cache used
SSL_SESSION_is_resumable() to avoid polluting the cache with
non-resumable sessions. However, it turned out that we cannot provide
a shim for this function across the whole range of OpenSSL versions
due to the fact that OpenSSL 1.1.0 does uses opaque pointers for
SSL_SESSION objects.

The commit replaces the shim for SSL_SESSION_is_resumable() with a non
public approximation of it on systems shipped with OpenSSL 1.1.0. It
is not turned into a proper shim because it does not fully emulate the
behaviour of SSL_SESSION_is_resumable(), but in our case it is good
enough, as it still helps to protect the cache from pollution.

For systems shipped with OpenSSL 1.0.X and derivatives (e.g. older
versions of LibreSSL), the provided replacement perfectly mimics the
function it is intended to replace.

(cherry picked from commit 40be3c9263)
2022-06-15 17:02:45 +03:00
Artem Boldariev
7bd5f4972f Dig: Do not call isc_nm_cancelread() for HTTP sockets
This commit ensures that isc_nm_cancelread() is not called from within
dig code for HTTP sockets, as these lack its implementation.

It does not have much sense to have it due to transactional nature of
HTTP.

Every HTTP request-response pair is represented by a virtual socket,
where read callback is called only when full DNS message is received
or when an error code is being passed there. That is, there is nothing
to cancel at the time of the call.

(cherry picked from commit 90c52ca12b)
2022-06-15 17:02:45 +03:00
Artem Boldariev
0cec9cca37 Fix an abort in DoH (client-side) when writing on closing sock
The commit fixes a corner case in client-side DoH code, when a write
attempt is done on a closing socket (session).

The change ensures that the write call-back will be called with a
proper error code (see failed_send_cb() call in client_httpsend()).

(cherry picked from commit 9abb00bb5f)
2022-06-15 17:02:45 +03:00
Artem Boldariev
cb6591f277 Avoid aborting when uv_timer_start() is used on a closing socket
In such a case it will return UV_EINVAL (-EINVAL), leading to
aborting, as the code expects the function to succeed.

(cherry picked from commit 245f7cec2e)
2022-06-15 17:02:45 +03:00
Artem Boldariev
3393ec19c2 Modify CHANGES
Mention that TLS session resumption is now fully supported in the
client side code.

(cherry picked from commit aa8c258fba)
2022-06-15 17:02:45 +03:00
Artem Boldariev
5154bac7c5 Add SSL_SESSION_is_resumable() implementation shim
This commit adds SSL_SESSION_is_resumable() implementation if it is
missing.

(cherry picked from commit 35338b4105)
2022-06-15 17:02:45 +03:00
Artem Boldariev
e02284354a DoT: implement TLS client session resumption
This commit extends DoT code with TLS client session resumption
support implemented on top of the TLS client session cache.

(cherry picked from commit 86465c1dac)
2022-06-15 17:02:45 +03:00
Artem Boldariev
0a4a76ff7a TLS stream/DoH: implement TLS client session resumption
This commit extends TLS stream code and DoH code with TLS client
session resumption support implemented on top of the TLS client
session cache.

(cherry picked from commit 90bc13a5d5)
2022-06-15 17:02:45 +03:00
Artem Boldariev
6ec48f1e78 Extend TLS context cache with TLS client session cache
This commit extends TLS context cache with TLS client session cache so
that an associated session cache can be stored alongside the TLS
context within the context cache.

(cherry picked from commit 987892d113)
2022-06-15 17:02:45 +03:00
Artem Boldariev
7c8d76c458 Add TLS client session cache implementation
This commit adds an implementation of a client TLS session cache. TLS
client session cache is an object which allows efficient storing and
retrieval of previously saved TLS sessions so that they can be
resumed. This object is supposed to be a foundation for implementing
TLS session resumption - a standard technique to reduce the cost of
re-establishing a connection to the remote server endpoint.

OpenSSL does server-side TLS session caching transparently by
default. However, on the client-side, a TLS session to resume must be
manually specified when establishing the TLS connection. The TLS
client session cache is precisely the foundation for that.

(cherry picked from commit 4ef40988f3)
2022-06-15 17:02:45 +03:00
Michał Kępień
64fcf1e464 BIND 9.18.4
-----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCgAtFiEENKwGS3ftSQfs1TU17QVz/8hFYQUFAmKZClMPHG1pY2hhbEBp
 c2Mub3JnAAoJEO0Fc//IRWEFNbsQAKCOxV9aJheb2HP01UUeB4MNEpepCpcFwG0k
 lc9wZe8PzFF6wZ9jpLMFB6M7iS3fRQvTSYXzX9tzODVHu5kKxCYTwr6Vg2Lzvymh
 MrnzXicjAHrLfP6iB/Xoxq84N9Z8j5TeDllw8I2WT09K+ZJxFZ3yWet6eCPuwxg0
 ldmJNBmbNPzGPTMr0n6khRNhRlmYDyzadAcs9LkDodZ18LfBmZu7D8q8V2FsDgad
 AMlyabaWCo0P3qR6XbBEClWRlMXp4Y/GRTRxVZGHHtkc9TbXm6/E9NbJTxK5/nXi
 0ut5ux/MvZo85hxSMwDsuaTJmRzyiqTihauAxFA00Epa9wtbCAyFipzLX1OnS/ya
 hUuaJYNw11AK2fxh4QNcV+4ufHSGqgrWP5dPiMSWLBNBDbxLS2/v3OWb+50RaouX
 DTX83D8ymaa4t48HA4XiaMMrYlniVDVhjao9d4qTb7q7BimJtg4IkbZH/0nnsahB
 Z+di+a4GgemSjIMUCsxa8SF++569viu5s8x3NfdxboDVES1QIgyUbacoV/8UULtO
 PrWILyVzeXM5CyvXcTf4dp4sCIyzKhGkRbZnCQiQ0HIcfSu89BZE98e8/D7+3CxQ
 An//YL0lXsz1AP7weaDzovqGcrwsGwDjFZNCMsoq0ABZh+8XLzgqBcTjFrTygTuj
 0a7f5wkk
 =Qd4z
 -----END PGP SIGNATURE-----

Merge tag 'v9_18_4' into v9_18

BIND 9.18.4
2022-06-15 15:58:14 +02:00
Artem Boldariev
8cea314705 Merge branch 'artem-tlsdns-do-not-call-acceptcb-twice-v9_18' into 'v9_18'
[Backport to 9.18] TLS DNS: do not call accept callback twice

See merge request isc-projects/bind9!6440
2022-06-15 13:40:30 +00:00
Artem Boldariev
9b320b1682 TLS DNS: do not call accept callback twice
Before the changes from this commit were introduced, the accept
callback function will get called twice when accepting connection
during two of these stages:

* when accepting the TCP connection;
* when handshake has completed.

That is clearly an error, as it should have been called only once. As
far as I understand it the mistake is a result of TLS DNS transport
being essentially a fork of TCP transport, where calling the accept
callback immediately after accepting TCP connection makes sense.

This commit fixes this mistake. It did not have any very serious
consequences because in BIND the accept callback only checks an ACL
and updates stats.

(cherry picked from commit e616d7f240)
2022-06-15 15:32:49 +03:00
Petr Špaček
b0ac324a02 Merge branch 'pspacek/doc-cleanup-dnssec-prereq-v9_18' into 'v9_18'
Update intro texts in the DNSSEC Guide [v9_18]

See merge request isc-projects/bind9!6434
2022-06-14 16:24:18 +00:00
Petr Špaček
d1d5531c6a
Update FAQ in the DNSSEC Guide
Mention DoT/DoH, update stats, remove mentions of early stages of
deployment.

(cherry picked from commit fd3a2c7854)
2022-06-14 18:20:50 +02:00
Petr Špaček
a04d6200e0
Update Authoritative Server Hardware requirements in DNSSEC Guide
Based on measurements done on BIND v9_19_2 using bank. TLD and a
synthetitc fullly signed zone, using RSASHA256 and ECDSAP256SHA256
algorithms with NSEC and NSEC3 without opt-out.

(cherry picked from commit 635885afe6)
2022-06-14 18:20:50 +02:00
Petr Špaček
08a5f5cea2
Update DNSSEC validation deployment stats in DNSSEC Guide
(cherry picked from commit 832c172985)
2022-06-14 18:20:50 +02:00
Petr Špaček
8961105b98
Rewrite Recursive Server Hardware requirements in DNSSEC Guide
This section was completely out of date. Current measurements on dataset
Telco EU 2022-02 and BIND 9.19.1 indicate absolutely different results
than described in the old version of the text.

(cherry picked from commit 6cf8066b9c)
2022-06-14 18:20:50 +02:00
Petr Špaček
a85d0286a9
Remove outdated software requirements from DNSSEC Guide
Guide in this repo is tied to latest version anyway, so let's not even
mention ancient versions of BIND.

This also solves the OpenSSL question because it is now mandatory for
build, which subsequently removes the entropy problem - so let's not
mention it either.

(cherry picked from commit 6e79877759)
2022-06-14 18:20:50 +02:00
Arаm Sаrgsyаn
2d85fda569 Merge branch '3401-race-condition-in-route_connected-v9_18' into 'v9_18'
[v9_18] Resolve "race condition in route_connected() leads to crash on startup/shutdown"

See merge request isc-projects/bind9!6433
2022-06-14 15:55:46 +00:00
Aram Sargsyan
7d5ec4b6a5 Add CHANGES note for [GL #3401]
(cherry picked from commit 4b0e7e41fc)
2022-06-14 14:57:32 +00:00
Aram Sargsyan
12aefe6ced Fix a race condition between shutdown and route_connected()
When shutting down, the interface manager can be destroyed
before the `route_connected()` callback is called, which is
unexpected for the latter and can cause a crash.

Move the interface manager attachment code from the callback
to the place before the callback is registered using
`isc_nm_routeconnect()` function, which will make sure that
the interface manager will live at least until the callback
is called.

Make sure to detach the interface manager if the
`isc_nm_routeconnect()` function is not implemented, or when
the callback is called with a result value which differs from
`ISC_R_SUCCESS`.

(cherry picked from commit f6e729635f)
2022-06-14 14:57:23 +00:00
Aram Sargsyan
e92b261235 Do not use the interface manager until it is ready
The `ns_interfacemgr_create()` function, when calling
`isc_nm_routeconnect()`, uses the newly created `ns_interfacemgr_t`
instance before initializing its reference count and the magic value.

Defer the `isc_nm_routeconnect()` call until the initializations
are complete.

(cherry picked from commit 1d93fe973b)
2022-06-14 14:55:57 +00:00
Arаm Sаrgsyаn
e781c394d8 Merge branch '3207-dig-nssearch-crash-fix-v9_18' into 'v9_18'
[v9_18]  Resolve "dig +nssearch org crashes when network is unreachable"

See merge request isc-projects/bind9!6432
2022-06-14 14:51:16 +00:00
Aram Sargsyan
cb25d5b80d Add CHANGES note for [GL #3207]
(cherry picked from commit 0450c9bd32)
2022-06-14 13:22:39 +00:00
Aram Sargsyan
7917e1866a Fix a crash in dig NS search mode
In special NS search mode, after the initial lookup, dig starts the
followup lookup with discovered NS servers in the queries list. If one
of those queries then fail, dig, as usual, tries to start the next query
in the list, which results in a crash, because the NS search mode is
special in a way that the queries are running in parallel, so the next
query is usually already started.

Apply some special logic in `recv_done()` function to deal with the
described situation when handling the query result for the NS search
mode. Particularly, print a warning message for the failed query,
and do not try to start the next query in the list. Also, set a non-zero
exit code if all the queries in the followup lookup fail.

(cherry picked from commit 1290863c22)
2022-06-14 13:21:47 +00:00
Michal Nowak
74ca068877 Merge branch '3138-capture-scripts-to-coverity-scan-v9_18' into 'v9_18'
[v9_18] Capture scripts for Coverity Scan analysis

See merge request isc-projects/bind9!6430
2022-06-14 12:24:17 +00:00
Michal Nowak
e1a463e98d
Capture scripts for Coverity Scan analysis
With the recent Coverity Scan 2021.12 version, Python 3 scripts are
being analyzed in addition to C files. The --fs-capture-search option
scripts for Coverity Scan analysis should be added to leverage this
feature.

(cherry picked from commit b4a2674d98)
2022-06-14 14:19:26 +02:00
Michal Nowak
bed115211e
Download Coverity Scan analysis tool to /tmp
Downloading and unpacking Coverity Scan analysis tool tarball
(cov-analysis-linux64.tgz) to $CI_PROJECT_DIR interferes with the
execution of the analysis tool when the --fs-capture-search option is
used because the tool starts to analyze some of its Javascript files.
(There's the --fs-capture-search-exclude-regex <path> option, but I
failed to find a way to make it work.)

(cherry picked from commit 1333bdf67e)
2022-06-14 14:19:21 +02:00
Michal Nowak
36780e07f6
Drop coverity cache feature
The coverity CI job cache feature is used to ensure that the 1 GB
cov-analysis-linux64.tgz file is being cached on GitLab CI runner, where
it was downloaded in the past. This feature does not seem to work
anymore; given that the proper solution to creating distributed cache is
complicated, better to drop the feature altogether.

(cherry picked from commit c966304e90)
2022-06-14 14:19:17 +02:00
Petr Špaček
5cc296bfb2 Merge branch 'pspacek/dnssec-guide-keymgr-removal-v9_18' into 'v9_18'
Remove description of dnssec-keymgr from DNSSEC Guide [v9_18]

See merge request isc-projects/bind9!6428
2022-06-14 11:32:57 +00:00
Petr Špaček
782f3b6845
Remove description of dnssec-keygmr from DNSSEC Guide
dnssec-keymgr is not included in the distribution since BIND 9.17 so
there is no point in keeping usage instructions around.

(cherry picked from commit 0e1306374e)
2022-06-14 13:12:59 +02:00
Ondřej Surý
f5405826f1 Merge branch '3400-gracefully-handle-the-errors-from-uv_start_read-v9_18' into 'v9_18'
Gracefully handle uv_read_start() failures [v9.18]

See merge request isc-projects/bind9!6426
2022-06-14 10:41:27 +00:00
Ondřej Surý
e644acbfae Add CHANGES and release note for [GL #3400]
(cherry picked from commit 646df5cbbc)
2022-06-14 11:54:11 +02:00
Ondřej Surý
579270509f Gracefully handle uv_read_start() failures
Under specific rare timing circumstances the uv_read_start() could
fail with UV_EINVAL when the connection is reset between the connect (or
accept) and the uv_read_start() call on the nmworker loop.  Handle such
situation gracefully by propagating the errors from uv_read_start() into
upper layers, so the socket can be internally closed().

(cherry picked from commit b432d5d3bc)
2022-06-14 11:54:11 +02:00
Michal Nowak
d3658fcb6f Merge branch 'mnowak/fix-statistics-system-test-on-ol7-v9_18' into 'v9_18'
[v9_18] Fix statistics system test on Oracle Linux 7

See merge request isc-projects/bind9!6425
2022-06-14 08:10:15 +00:00