Commit graph

36495 commits

Author SHA1 Message Date
Michał Kępień
dc0d7027cf Prepare release notes for BIND 9.18.6 2022-08-04 23:37:41 +02:00
Artem Boldariev
4552658d1b Merge branch 'tls-fix-readpaused-usage-v9-18' into 'v9_18'
[Backport v9.18] TLS: do not ignore readpaused flag in certain circumstances

See merge request isc-projects/bind9!6629
2022-08-02 16:17:21 +00:00
Artem Boldariev
c2fa72027c TLS: do not ignore readpaused flag in certain circumstances
In some circumstances generic TLS code could have resumed data reading
unexpectedly on the TCP layer code. Due to this, the behaviour of
isc_nm_pauseread() and isc_nm_resumeread() might have been
unexpected. This commit fixes that.

The bug does not seems to have real consequences in the existing code
due to the way the code is used. However, the bug could have lead to
unexpected behaviour and, at any rate, makes the TLS code behave
differently from the TCP code, with which it attempts to be as
compatible as possible.

(cherry picked from commit ec0647d546204a0e09aeaf0e2aabb37f1fb67dd0)
2022-08-02 17:31:15 +03:00
Arаm Sаrgsyаn
097a57e804 Merge branch '3461-fetches-per-zone-final-log-message-v9_18' into 'v9_18'
[v9_18] Resolve "Do a better job of logging when fetches-per-zone is triggered"

See merge request isc-projects/bind9!6625
2022-08-01 14:34:27 +00:00
Aram Sargsyan
0179459d83 Add CHANGES and release notes for [GL #3461]
(cherry picked from commit 0d64f55f5dee7ffee76ddc1e4df15514ab7882c9)
2022-08-01 13:55:03 +00:00
Aram Sargsyan
47e4ef0696 Improve fetch limit logging
When initially hitting the `fetches-per-zone` value, a log message
is being generated for the event of dropping the first fetch, then
any further log events occur only when another fetch is being dropped
and 60 seconds have been passed since the last logged message.

That logic isn't ideal because when the counter of the outstanding
fetches reaches zero, the structure holding the counters' values will
get deleted, and the information about the dropped fetches accumulated
during the last minute will not be logged.

Improve the fcount_logspill() function to makie sure that the final
values are getting logged before the counter object gets destroyed.

(cherry picked from commit 039871ceb767088205563965f7aae622a3f77082)
2022-08-01 13:54:46 +00:00
Petr Špaček
8801d2668e Merge branch 'ron-tags-3-v9_18' into 'v9_18'
Add tags and short descriptions to all configuration statements [v9_18]

See merge request isc-projects/bind9!6624
2022-08-01 09:00:46 +00:00
Petr Špaček
a2c59b949f
Add tags and short description to statements not documented in v9_19 2022-08-01 10:53:25 +02:00
Petr Špaček
67e8e8ff20
Add last missing tags, finishing touches
(cherry picked from commit 43c6a6a48b25930da217a888749780557c629252)
2022-08-01 10:12:13 +02:00
Suzanne Goldlust
c0177bfe4a
Add descriptions of each tag
(cherry picked from commit 8d765840901a79a1786abbcabe02e888eb0d3820)
2022-08-01 10:12:13 +02:00
Suzanne Goldlust
b2159d42b2
Text edits to Statements and Statements by Tag sections
(cherry picked from commit d4b93c4bd6eebaaafe3c40f43671113c5543f645)
2022-08-01 10:12:13 +02:00
Suzanne Goldlust
17d5e43e71
Reorder Statements and Statements by Tag sections
(cherry picked from commit 2cd32eb06df70b1959d3d41e519de44a9f3172bc)
2022-08-01 10:12:13 +02:00
Suzanne Goldlust
ac7d65557b
Rephrase parental-agents description
(cherry picked from commit 21c9166abb53a9f47017a43c380bc59320b6f0e4)
2022-08-01 10:12:12 +02:00
Suzanne Goldlust
7e13992ee7
Add short description for plugin statement
(cherry picked from commit d14828c5a71df0acd1eb5d465e9ae7d75d26a56c)
2022-08-01 10:12:12 +02:00
Suzanne Goldlust
16773a53ed
Add tag and short description for dyndb statement
(cherry picked from commit 5b90f4caa4481858b6c3a0e8fc0f5e38e5d1aa7a)
2022-08-01 10:12:12 +02:00
Suzanne Goldlust
8b0b402ec8
Add tags and short descriptions for dlz and search statements
(cherry picked from commit 93bb1a42f92dd01c90c13207196da12f3a46b972)
2022-08-01 10:12:12 +02:00
Suzanne Goldlust
c1c0197c9a
Add tag and short description for catalog-zones statement
(cherry picked from commit e4f991c1d475d0b6e6cfabe040518f7934cd756d)
2022-08-01 10:12:12 +02:00
Suzanne Goldlust
3c45f366a6
Add short descriptions and some tags to statements through line 1766
(cherry picked from commit 21b8988f803e60ad39f7bb7770d7761a37e1d372)
2022-08-01 10:12:07 +02:00
Arаm Sаrgsyаn
d82f56b972 Merge branch '3471-dig-add-qid-into-usage-summary-v9_18' into 'v9_18'
[v9_18] DiG: document +qid=<num> option in the usage summary

See merge request isc-projects/bind9!6621
2022-07-28 10:16:39 +00:00
Aram Sargsyan
80094e4503 DiG: document +qid=<num> option in the usage summary
The +qid=<num> option, which sets the outgoing query ID, was missing
from the usage summary printed using `dig -h` command.

(cherry picked from commit 4dcc855093f7f5c6d46a88a6aabea5f53a673018)
2022-07-28 09:14:56 +00:00
Mark Andrews
78a14a5f07 Merge branch 'marka-set-suffix-in-ans.py-v9_18' into 'v9_18'
Ensure suffix is always valid in bin/tests/system/qmin/ans4/ans.py [v9_18]

See merge request isc-projects/bind9!6619
2022-07-27 19:07:11 +00:00
Mark Andrews
8fa29c5699 Ensure suffix is always valid in bin/tests/system/qmin/ans4/ans.py
initalise suffix to ""

    170        r.answer.append(
    171            dns.rrset.from_text(
    172                lqname + suffix, 1, IN, NS, "a.bit.longer.ns.name." + suffix
    173            )
    174        )
    175        r.flags |= dns.flags.AA
           15. Condition endswith(lqname, "icky.ptang.zoop.boing."), taking true branch.
    176    elif endswith(lqname, "icky.ptang.zoop.boing."):
           CID 350722 (#7 of 7): Bad use of null-like value (FORWARD_NULL)
           16. invalid_operation: Invalid operation on null-like value suffix.
    177        r.authority.append(
    178            dns.rrset.from_text(
    179                "icky.ptang.zoop.boing." + suffix,
    180                1,
    181                IN,
    182                SOA,
    183                "ns2." + suffix + " hostmaster.arpa. 2018050100 1 1 1 1",
    184            )
    185        )

(cherry picked from commit eb798d047849aa28b0b0f14379a8e264dfa41c7f)
2022-07-27 14:27:18 -04:00
Artem Boldariev
a524cef8af Merge branch 'artem-tls-streamdns-fixes-part2-v9-18' into 'v9_18'
[Backport to v9.18] TLS-related fixes from Stream DNS and Loop Manager branches

See merge request isc-projects/bind9!6617
2022-07-26 13:03:42 +00:00
Artem Boldariev
a957511734 TLS: fix double resumption in isc__nm_tls_resumeread()
This commit fixes an obvious error in isc__nm_tls_resumeread() so that
read cannot be resumed twice.
2022-07-26 15:27:40 +03:00
Artem Boldariev
a165b66fc7 TLS: clear 'errno' when handling SSL status
Sometimes tls_do_bio() might be called when there is no new data to
process (most notably, when resuming reads), in such a case internal
TLS session state will remain untouched and old value in 'errno' will
alter the result of SSL_get_error() call, possibly making it to return
SSL_ERROR_SYSCALL. This value will be treated as an error, and will
lead to closing the connection, which is not what expected.
2022-07-26 15:27:40 +03:00
Mark Andrews
80f777ccfe Merge branch '3469-auto-disable-rsasha1-and-nsec3rsasha1-when-not-supported-by-the-os-v9_18' into 'v9_18'
Check that we can verify a signature at initialisation time [v9_18]

See merge request isc-projects/bind9!6614
2022-07-25 15:51:23 +00:00
Mark Andrews
676a6456e8 Add release note for [GL #3469]
(cherry picked from commit 16b133af407e7659f6c46a81aa58e1d7891249d4)
2022-07-25 10:59:38 -04:00
Mark Andrews
d0b48df8ea CHANGES note for [GL #3469]
(cherry picked from commit c549249cb9020fa2138e7c7411bc64ebd4839557)
2022-07-25 10:59:38 -04:00
Mark Andrews
f3a0dac057 Check that we can verify a signature at initialisation time
Fedora 33 doesn't support RSASHA1 in future mode.  There is no easy
check for this other than by attempting to perform a verification
using known good signatures.  We don't attempt to sign with RSASHA1
as that would not work in FIPS mode.  RSASHA1 is verify only.

The test vectors were generated using OpenSSL 3.0 and
util/gen-rsa-sha-vectors.c.  Rerunning will generate a new set of
test vectors as the private key is not preserved.

e.g.
	cc util/gen-rsa-sha-vectors.c -I /opt/local/include \
		-L /opt/local/lib -lcrypto

(cherry picked from commit cd3f00874f63a50954cebb78edac8f580a27c0de)
2022-07-25 10:59:38 -04:00
Matthijs Mekking
c3ab2a25ef Merge branch '3462-rndc-dumpdb-expired-doesnt-always-work-v9_18' into 'v9_18'
[v9_18] Fix rndc dumpdb -expired for stuck cache contents

See merge request isc-projects/bind9!6612
2022-07-25 14:54:30 +00:00
Matthijs Mekking
acdde6f0a4 Add change entry and release note for #3462
News worthy.

(cherry picked from commit 44bbc0175c5cd0df5c45b726464bcb82604d34ab)
2022-07-25 16:29:41 +02:00
Matthijs Mekking
56f1bf250d Fix rndc dumpdb -expired for stuck cache contents
The command 'rndc dumpdb -expired' will include expired RRsets in the
output, but only for the RBTDB_VIRTUAL time (of 5 minutes). This means
that if there is a cache cleaning problem and contents are not cleaned
up, the rndc command has little diagnostic value. Fix this by including
all RRsets in the dumpdb output if the '-expired' flag is set.

(cherry picked from commit 930ba2c914a0abc07fd087d663a7bfb57850d4ca)
2022-07-25 16:28:18 +02:00
Evan Hunt
78ea0a36a4 Merge branch '2918-deprecate-max-zone-ttl-v9_18' into 'v9_18'
dnssec-policy max-zone-ttl was not fully effective

See merge request isc-projects/bind9!6599
2022-07-22 20:34:16 +00:00
Evan Hunt
3c533374da CHANGES and release note for [GL #2918] 2022-07-22 13:13:43 -07:00
Evan Hunt
4720f13730 warn about zones with both dnssec-policy and max-zone-ttl
max-zone-ttl in zone/view/options is a no-op if dnssec-policy
is in use, so generate a warning.
2022-07-22 13:13:24 -07:00
Evan Hunt
a8e596e32c clarify "max-zone-ttl" documentation
The "max-zone-ttl" option should now be configured as part of
dnssec-policy. Use of this option in zone/view/options will be ignored
in any zone that also has dnssec-policy configured.
2022-07-22 13:13:24 -07:00
Matthijs Mekking
793554c6ce Reject zones with TTL higher than dnssec-policy max-zone-ttl
Reject loading of zones with TTL higher than the max-zone-ttl
from the dnssec-policy.

With this change, any zone with a dnssec-policy in use will ignore
the max-zone-ttl option in zone/view/options.
2022-07-22 13:13:24 -07:00
Matthijs Mekking
9c872756c3 Test dnssec-policy max-zone-ttl rejects zone with too high TTL
Similar to the 'max-zone-ttl' zone option, the 'dnssec-policy' option
should reject zones with TTLs that are out of range.
2022-07-22 13:13:24 -07:00
Arаm Sаrgsyаn
d8acad751e Merge branch '3419-dig-nssearch-query-failure-robustness-v9_18' into 'v9_18'
[v9_18] Fix DiG query error handling robustness in NSSEARCH mode

See merge request isc-projects/bind9!6609
2022-07-22 10:24:48 +00:00
Aram Sargsyan
525c0e9d38 Add CHANGES note for [GL #3419]
(cherry picked from commit e03897087256b394a5cbf6d8639410ed1bdc8451)
2022-07-22 09:41:53 +00:00
Aram Sargsyan
ab8343a5f6 dig +nssearch: send more queries even if setting up one of them fails
In the NSSEARCH followup lookup, when one of the queries fails to be
set up (UDP) or connected (TCP), DiG doesn't start the next query.
This is a mistake, because in NSSEARCH mode the queries are independent
and DiG shouldn't stop the lookup process just because setting up (or
connecting to) one of the name servers returns an error code in the
`udp_ready()` or `tcp_connected()` callbacks.

Write a new `nssearch_next()` function which takes care of starting the
next query in NSSEARCH mode, so it can be used in several places without
code repetition.

Make sure that the `udp_ready()` and `tcp_connected()` functions call
`nssearch_next()` in case they won't be calling `send_udp()` and
`send_tcp()` respectively, because in that case the `send_done()`
callback, which usually does the job, won't be called.

Refactor `send_done()` to use the newly written `nssearch_next()`
function.

(cherry picked from commit 76bee507b7415b176897b2fb1a3497bfb8ab194a)
2022-07-22 09:41:47 +00:00
Aram Sargsyan
8fecc9dc1e dig +nssearch: send more queries even if sending the previous one fails
In the NSSEARCH followup lookup, when one of the queries fails to be
sent, DiG doesn't start the next query. This is a mistake, because in
NSSEARCH mode the queries are independent and DiG shouldn't stop the
lookup process just because sending a query to one of the name servers
returns an error code.

Restructure the `send_done()` function to unconditionally send the next
query in NSSEARCH mode, if it exists.

(cherry picked from commit 49ac879dfad91ac08201be3e351450fd9d83b9f5)
2022-07-22 09:41:41 +00:00
Arаm Sаrgsyаn
5d47d4e342 Merge branch '3407-dighost-udp-fail-over-other-nameservers-v9_18' into 'v9_18'
[v9_18] Fix DiG UDP query retry and fail-over bug

See merge request isc-projects/bind9!6608
2022-07-22 09:37:53 +00:00
Aram Sargsyan
c0bb75e9ef Suppress warning/error comments in dig outputs for "rrsetorder" test
In the CI dig sometimes produces warning/error comments when
communicating with the server, which produces problems when comparing
the outputs.

Here is an example of a dig output with a warning message which
is benign, because dig, after a retry, managed to query the server.

;; communications error to 10.53.0.3#7529: timed out
1.2.3.1
1.2.3.2
1.2.3.3
1.2.3.4

When comparing this to the expected output, which doesn't contain
the comment line (starting with double ';'), the outputs don't match.

Use grep inverse logic to strip the comments from the dig outputs.

(cherry picked from commit a5b2aa7c977b5c40b62698a8f46ffd839b764814)
2022-07-22 09:03:54 +00:00
Aram Sargsyan
8bdc4e40de Add CHANGES note for [GL #3407]
(cherry picked from commit 1554faa47659d68dc6c48fe177faba95ba57adb7)
2022-07-22 09:03:39 +00:00
Aram Sargsyan
048a035267 Add "digdelv" test to simulate DiG network unreachable error
There are existing tests for simulating timeouts, read errors, and
refused connecion errors. Implement also "network unreachable"
simulation.

Use "fixed" string search mode `-F` for `grep` in more places where
it is appropriate to do so.

(cherry picked from commit 626fbf325e048158625d197cd9734da932f6011d)
2022-07-22 09:00:31 +00:00
Aram Sargsyan
29057d9911 DiG: use the same retry and fail-over logic for different failure types
DiG implements different logic in the `recv_done()` callback function
when processing a failure:

1. For a timed-out query it applies the "retries" logic first, then,
   when it fails, fail-overs to the next server.

2. For an EOF (end-of-file, or unexpected disconnect) error it tries to
   make a single retry attempt (even if the user has requested more
   retries), then, when it fails, fail-overs to the next server.

3. For other types of failures, DiG does not apply the "retries" logic,
   and tries to fail-over to the next servers (again, even if the user
   has requested to make retries).

Simplify the logic and apply the same logic (1) of first retries, and
then fail-over, for different types of failures in `recv_done()`.

(cherry picked from commit abfd0d363f4f495de00dc4bd41f74726370369ba)
2022-07-22 09:00:21 +00:00
Aram Sargsyan
6efb73d4bb Fix DiG query retry and fail-over bug
When the `send_done()` callback function gets called with a failure
result code, DiG erroneously cancels the lookup.

Stop canceling the lookup and give DiG a chance to retry the failed
query, or fail-over to another server, using the logic implemented in
the `recv_done()` callback function.

(cherry picked from commit c2329dd110e88a194be4d9a3fe1571dbae8af178)
2022-07-22 09:00:15 +00:00
Aram Sargsyan
be8ec6ef18 Fix DiG UDP query retry and fail-over bug
When the `udp_ready()` callback function gets called with a failure
result code, DiG erroneously cancels the lookup.

Copy the logic behind `tcp_connected()` callback function into
`udp_ready()` so that DiG will now retry the failed query (if retries
are enabled) and then, if it fails again, it will fail-over to the next
server in the list, which synchronizes the behavior between TCP and UDP
modes.

Also, `udp_ready()` was calling `lookup_detach()` without calling
`lookup_attach()` first, but the issue was masked behind the fact
that `clear_current_lookup()` wasn't being called when needed, and
`lookup_detach()` was compensating for that. This also has been fixed.

(cherry picked from commit 3f3108552577c326b4dab6c3b631c51cf0040144)
2022-07-22 09:00:08 +00:00
Petr Špaček
c003127717 Merge branch 'pspacek/arm-zombie-support-v9_18' into 'v9_18'
Support ancient build tools for the ARM [v9_18]

See merge request isc-projects/bind9!6605
2022-07-21 13:30:27 +00:00