Commit graph

37860 commits

Author SHA1 Message Date
Mark Andrews
1e7f5eb161
Add CHANGES note for [GL #3325]
(cherry picked from commit f378e02423)
2023-06-28 12:32:50 +02:00
Mark Andrews
5739b4817a
In rctx_answer return DNS_R_DELEGATION on NOFOLLOW
When DNS_FETCHOPT_NOFOLLOW is set DNS_R_DELEGATION needs to be
returned to restart the resolution process rather than converting
it to ISC_R_SUCCESS.

(cherry picked from commit ea11650376)
2023-06-28 12:32:26 +02:00
Mark Andrews
7f2eeb60ee
Skip some QNAME mininisation queries if possible
If we know that the NS RRset for an intermediate label doesn't exist
on cache contents don't query using that name when looking for a
referral.

(cherry picked from commit 80bc0ee075)
2023-06-28 12:32:23 +02:00
Mark Andrews
b3a97da7a7
Use NS rather than A records for qname-minimization relaxed
Remove all references to DNS_FETCHOPT_QMIN_USE_A and adjust
the expected tests results in the qmin system test.

(cherry picked from commit dd00b3c50b)
2023-06-28 12:31:49 +02:00
Mark Andrews
0eb73bb6a3 Merge branch '4047-assertion-failure-in-dns_resolver_attach-at-resolver-c-10599' into 'bind-9.18'
Resolve "Assertion failure in dns_resolver_attach() at resolver.c:10599"

See merge request isc-projects/bind9!8045
2023-06-27 06:53:41 +00:00
Mark Andrews
0d3693f08f Remove unnecessary REQUIRE in dns_resolver_attach
There is no harm in aquiring an additional reference to the resolver
after it has started shutting down.  All the REQUIRE was doing was
introducing a point of failure when shutting down the server.
2023-06-27 05:19:56 +00:00
Evan Hunt
adf199b309 Merge branch '950-test-validation-bind-9.18' into 'bind-9.18'
[9.18] explicitly set dnssec-validation in system tests

See merge request isc-projects/bind9!8063
2023-06-27 00:18:29 +00:00
Evan Hunt
a31dd61b0f explicitly set dnssec-validation in system tests
the default value of dnssec-validation is 'auto', which causes
a server to send a key refresh query to the root zone when starting
up. this is undesirable behavior in system tests, so this commit
sets dnssec-validation to either 'yes' or 'no' in all tests where
it had not previously been set.

this change had the mostly-harmless side effect of changing the cached
trust level of unvalidated answer data from 'answer' to 'authanswer',
which caused a few test cases in which dumped cache data was examined in
the serve-stale system test to fail. those test cases have now been
updated to expect 'authanswer'.

(cherry picked from commit 0b09ee8cdc)
2023-06-26 15:03:06 -07:00
Ondřej Surý
f6ee78c61a Merge branch '4049-detect-formerr-with-an-echoed-dns-cookie-client-cookie-and-retry-without-dns-cookie-9.18' into 'bind-9.18'
[9.18] Handle FORMERR on unknown EDNS option that are echoed

See merge request isc-projects/bind9!8061
2023-06-26 17:05:44 +00:00
Michał Kępień
74ef08a7b5
Add release note for #4049
(cherry picked from commit 466530c73b)
2023-06-26 18:52:37 +02:00
Mark Andrews
20db7497b1
Add CHANGES note for [GL #4049]
(cherry picked from commit 97e1bb0e98)
2023-06-26 16:36:36 +02:00
Mark Andrews
b19bb84116
Check fallback on FORMERR to EDNS options
(cherry picked from commit 9d95cd427d)
2023-06-26 16:36:11 +02:00
Mark Andrews
d65feb0796
Add a server which returns FORMERR to all EDNS options
The server also echoes back the EDNS options and EDNS flags.

(cherry picked from commit 3328ddaf7a)
2023-06-26 16:36:11 +02:00
Mark Andrews
e7e29278a8
Handle FORMERR on unknown EDNS option that are echoed
If the resolver received a FORMERR response to a request with
an DNS COOKIE option present that echoes the option back, resend
the request without an DNS COOKIE option present.

(cherry picked from commit f3b24ba789)
2023-06-26 16:36:11 +02:00
Tom Krizek
a0d672f0c5 Merge branch 'tkrizek-system-test-fixes-9.18' into 'bind-9.18'
[9.18] Fix a couple of oversights in system tests

See merge request isc-projects/bind9!8056
2023-06-26 14:27:09 +00:00
Tom Krizek
ad5006cef4
Check for proper file size output in dnstap test
Previously, the first check silently failed, as 450 is apparently (in
the CI setup) the minimum output size for the dnstap output, rather than
470 which the test was expecting. Effectively, the check served as a 5
second sleep rather than waiting for the proper file size.

Additionally, check the expected file sizes and fail if expectations
aren't met.

(manually picked from commit 5f809e50b6)

On main, the minimum file size seems to 454 bytes, while on EL7 in our
CI setup for the 9.18 branch, it appears to be 450 instead.
2023-06-26 14:36:55 +02:00
Tom Krizek
d1caa0b4f0
Check for proper log message in kasp test
The log message is supposed to contain the zone name which was
erroneously omitted, but didn't pop up during tests, since return code
was silently ignored.

Now it actually waits for the proper log message rather than being an
equivalent of 3 second sleep (which was also sufficient to make the test
pass, thus we detected no failure).

(cherry picked from commit 1dd4c2b9e2)
2023-06-26 13:07:29 +02:00
Michal Nowak
d527fca768 BIND 9.18.16
-----BEGIN SSH SIGNATURE-----
 U1NIU0lHAAAAAQAAARcAAAAHc3NoLXJzYQAAAAMBAAEAAAEBANamVSTMToLcHCXRu1f52e
 tTJWV3T1GSVrPYXwAGe6EVC7m9CTl06FZ9ZG/ymn1S1++dk4ByVZXf6dODe2Mu0RuqGmyf
 MUEMKXVdj3cEQhgRaMjBXvIZoYAsQlbHO2BEttomq8PhrpLRizDBq4Bv2aThM0XN2QqSGS
 ozwYMcPiGUoMVNcVrC4ZQ+Cptb5C4liqAcpRqrSo8l1vcNg5b1Hk6r7NFPdx542gsGMLae
 wZrnKn3LWz3ZXTGeK2cRmBxm/bydiVSCsc9XjB+tWtIGUpQsfaXqZ7Hs6t+1f1vsnu88oJ
 oi1dRBo3YNRl49UiCukXWayQrPJa8wwxURS9W28JMAAAADZ2l0AAAAAAAAAAZzaGE1MTIA
 AAEUAAAADHJzYS1zaGEyLTUxMgAAAQCvKOzeCryYGKi7lhj2xQB8mNVPoyQtUV9h1BgFRR
 AxBbFhIfDW2LnZWJmYspWT+6u5m3E/F5bk2JxngQWrTwRQ3N4ur8IxdPytw8R9oixxR3a6
 TVVXAM29dtEWf+nrGQQsLd8pYA0C1HpIW0m8h6IuSjl08aSQzs7c7/G4T5F2+vbxqSjMpR
 uP4w7AweBpT/Jb1oBmSCAiBeGnfKtQVXwW5qDph10y3+ZinYmoRRf97xIk2Au79TyQHmi3
 NCVpSKmJdfs4Uqe4dIhevjiITBCsm60BsL4RC0ABNcbtxX/Ui9IGbC+OxI6csa2eOB5hYx
 894SXj9vAjSJIdql8YxIDd
 -----END SSH SIGNATURE-----
gpgsig -----BEGIN SSH SIGNATURE-----
 U1NIU0lHAAAAAQAAARcAAAAHc3NoLXJzYQAAAAMBAAEAAAEBANamVSTMToLcHCXRu1f52e
 tTJWV3T1GSVrPYXwAGe6EVC7m9CTl06FZ9ZG/ymn1S1++dk4ByVZXf6dODe2Mu0RuqGmyf
 MUEMKXVdj3cEQhgRaMjBXvIZoYAsQlbHO2BEttomq8PhrpLRizDBq4Bv2aThM0XN2QqSGS
 ozwYMcPiGUoMVNcVrC4ZQ+Cptb5C4liqAcpRqrSo8l1vcNg5b1Hk6r7NFPdx542gsGMLae
 wZrnKn3LWz3ZXTGeK2cRmBxm/bydiVSCsc9XjB+tWtIGUpQsfaXqZ7Hs6t+1f1vsnu88oJ
 oi1dRBo3YNRl49UiCukXWayQrPJa8wwxURS9W28JMAAAADZ2l0AAAAAAAAAAZzaGE1MTIA
 AAEUAAAADHJzYS1zaGEyLTUxMgAAAQBELZ30W2rUZkbIql8Lz0scLApeCnAdR10MIpvxZ2
 K+nbAhkovhD3zERJv7zdQVfv2WFykDwNGeY5kwo1fxLtVaVguwe+teJM3olG16VXQM9jpu
 iztHDD28Jm3o5/gZH51MYROXx+RMzhc6g9DcUY4+fpjySNW+SREoF46C0O8J1QO2p2h7Rk
 VYqlP6FuTLtyzOlNXjoPkVycLQvTCj+MS483OXymUOqqaufCIGZ2u10f/8NzBR9b9exjWp
 jP5WzFgFz20LZO4ZIhlDnzva60Jxtr5QOzRtAt3f7NPtQWKfVUepo09GlhpdL/tYBMrHkA
 on25nJIj95wPid00X6+Cw/
 -----END SSH SIGNATURE-----

Merge tag 'v9.18.16' into bind-9.18

BIND 9.18.16
2023-06-21 19:51:22 +02:00
Arаm Sаrgsyаn
4b97081fca Merge branch '4044-nslookup-reports-timeout-if-input-lookup-is-delayed' into 'bind-9.18'
[9.18] Update the event loop's time after executing a task

See merge request isc-projects/bind9!7891
2023-06-20 11:06:35 +00:00
Aram Sargsyan
7f70809d91 Add a CHANGES note for [GL #4044] 2023-06-20 10:22:46 +00:00
Aram Sargsyan
0c751ce72e Update the event loop's time after executing a task
Tasks can block for a long time, especially when used by tools in
interactive mode. Update the event loop's time to avoid unexpected
errors when processing later events during the same callback.
For example, newly started timers can fire too early, because the
current time was stale. See the note about uv_update_time() in the
https://docs.libuv.org/en/v1.x/timer.html#c.uv_timer_start page.
2023-06-20 10:21:54 +00:00
Aram Sargsyan
7f5beb751d Add nslookup test with a delayed input
The added test checks the stdin input mode of nslookup with an
added delay to confirm that [GL #4044] is fixed.
2023-06-20 10:21:54 +00:00
Michał Kępień
e1a9db5fa6 Merge branch '2354-add-a-tool-for-reproducing-isc-spnego-bugs-9.18' into 'bind-9.18'
[9.18] [CVE-2020-8625] [CVE-2021-25216] Add a tool for reproducing ISC SPNEGO bugs

See merge request isc-projects/bind9!8042
2023-06-19 09:08:20 +00:00
Michał Kępień
f046e415bf
Add a tool for reproducing ISC SPNEGO bugs
Extend the "tsiggss" system test with reproducers for CVE-2020-8625 and
CVE-2021-25216.

(cherry picked from commit a47dc810f7)
2023-06-19 10:34:56 +02:00
Ondřej Surý
b855432686 Merge branch '4149-make-isc_result-tables-more-compact-9.18' into 'bind-9.18'
[9.18] Make isc_result tables smaller

See merge request isc-projects/bind9!8038
2023-06-15 14:28:47 +00:00
Ondřej Surý
a1413c2faf
Add CHANGES note for [GL #4149]
(cherry picked from commit 0a35c0da9b)
2023-06-15 16:27:17 +02:00
Ondřej Surý
be0f38553e
Make isc_result tables smaller
The isc_result_t enum was to sparse when each library code would skip to
next << 16 as a base.  Remove the huge holes in the isc_result_t enum to
make the isc_result tables more compact.

This change required a rewrite how we map dns_rcode_t to isc_result_t
and back, so we don't ever return neither isc_result_t value nor
dns_rcode_t out of defined range.

(cherry picked from commit a8e6c3b8f7)
2023-06-15 16:27:17 +02:00
Ondřej Surý
a29de517fa
Refactor how we map isc_result_t <-> dns_rcode_t
The mapping functions between isc_result_t and dns_rcode_t could return
both isc_result_t values not defined in the header and dns_rcode_t
values not defined in the header because it blindly maps anything
withing full 12-bits defined for RCODEs to isc_result_t and back.

Refactor the dns_result_{from,to}rcode() functions to always return
valid isc_result_t and dns_rcode_t values by explicitly mapping the
values to each other and returning DNS_R_SERVFAIL (dns_rcode_servfail)
when encountering value out of the defined range.

(cherry picked from commit b53d1d7069)
2023-06-15 16:27:17 +02:00
Michał Kępień
01fc746996 Merge branch '4150-fix-entity-renumbering-in-parse_tsan.py-9.18' into 'bind-9.18'
[9.18] Fix entity renumbering in util/parse_tsan.py

See merge request isc-projects/bind9!8039
2023-06-15 14:22:20 +00:00
Michał Kępień
9b764ab0e9
Fix entity renumbering in util/parse_tsan.py
util/parse_tsan.py builds tables of mutexes, threads, and pointers it
finds in the TSAN report provided to it as a command-line argument and
then replaces all mentions of each of these entities so that they are
numbered sequentially in the processed report.  For example, this line:

    Cycle in lock order graph: M0 (...) => M5 (...) => M9 (...) => M0

is expected to become:

    Cycle in lock order graph: M1 (...) => M2 (...) => M3 (...) => M1

Problems arise when the gaps between mutex/thread identifiers present on
a single line are smaller than the total number of mutexes/threads found
by the script so far.  For example, the following line:

    Cycle in lock order graph: M0 (...) => M1 (...) => M2 (...) => M0

first gets turned into:

    Cycle in lock order graph: M1 (...) => M1 (...) => M2 (...) => M1

and then into:

    Cycle in lock order graph: M2 (...) => M2 (...) => M2 (...) => M2

In other words, lines like this become garbled due to information loss.

The problem stems from the fact that the numbering scheme the script
uses for identifying mutexes and threads is exactly the same as the one
used by TSAN itself.  Update util/parse_tsan.py so that it uses
zero-padded numbers instead, making the "overlapping" demonstrated above
impossible.

(cherry picked from commit 7f0790c82f)
2023-06-15 16:18:49 +02:00
Tony Finch
9813e6d006 Merge branch '4134-zonefile-erofs-bind-9.18' into 'bind-9.18'
Translate POSIX errorcode EROFS to ISC_R_NOPERM

See merge request isc-projects/bind9!8033
2023-06-14 13:20:18 +00:00
Tony Finch
dde068c2a0 CHANGES note for [GL #4134]
[cleanup]	Report "permission denied" instead of "unexpected error"
		when trying to update a zone file is on a read-only file
		system. Thanks to Midnight Veil. [GL #4134]

(cherry picked from commit 82401f0f0e)
2023-06-14 13:49:27 +01:00
Midnight Veil
5172f4c32a Translate POSIX errorcode EROFS to ISC_R_NOPERM
Report "permission denied" instead of "unexpected error"
when trying to update a zone file on a read-only file system.

(cherry picked from commit dd6acc1cac)
2023-06-14 13:48:25 +01:00
Arаm Sаrgsyаn
025110b07a Merge branch '4136-catz-db-update-notify-bug-9.18' into 'bind-9.18'
[9.18] Fix catz db update callback registration logic error

See merge request isc-projects/bind9!8030
2023-06-14 09:25:44 +00:00
Aram Sargsyan
2ab73c3a94 Add a CHANGES note for [GL #4136]
(cherry picked from commit 23f609ba59)
2023-06-14 09:24:41 +00:00
Aram Sargsyan
6154eab679 Fix catz db update callback registration logic error
When a catalog zone is updated using AXFR, the zone database is changed,
so it is required to unregister the update notification callback from
the old database, and register it for the new one.

Currently, here is the order of the steps happening in such scenario:

1. The zone.c:zone_startload() function registers the notify callback
   on the new database using dns_zone_catz_enable_db()
2. The callback, when called, notices that the new 'db' is different
   than 'catz->db', and unregisters the old callback for 'catz->db',
   marks that it's unregistered by setting 'catz->db_registered' to
   false, then it schedules an update if it isn't already scheduled.
3. The offloaded update process, after completing its job, notices that
   'catz->db_registered' is false, and (re)registers the update callback
   for the current database it is working on. There is no harm here even
   if it was registered also on step 1, and we can't skip it, because
   this function can also be called "artificially" during a
   reconfiguration, and in that case the registration step is required
   here.

A problem arises when before step 1 an update process was already
in a running state, operating on the old database, and finishing its
work only after step 2. As described in step 3, dns__catz_update_cb()
notices that 'catz->db_registered' is false and registers the callback
on the current database it is working on, which, at that state, is
already obsolete and unused by the zone. When it detaches the database,
the function which is responsible for its cleanup (e.g. free_rbtdb())
asserts because there is a registered update notify callback there.

To fix the problem, instead of delaying the (re)registration to step 3,
make sure that the new callback is registered and 'catz->db_registered'
is accordingly marked on step 2.

(cherry picked from commit 998765fea5)
2023-06-14 09:24:41 +00:00
Tom Krizek
eee589f5ee Merge branch 'tkrizek/remove-trailing-whitespace-9.18' into 'bind-9.18'
[9.18] Remove trailing whitespace from all text files

See merge request isc-projects/bind9!8013
2023-06-14 08:53:05 +00:00
Tom Krizek
6f4afe238c
Add utility script to detect trailing whitespace
Run the script in CI as well to ensure we don't accidentally add
trailing whitespace again.

(cherry picked from commit 034a32a4f3)
2023-06-14 09:52:58 +02:00
Tom Krizek
0820bedbd8
Ignore trailing whitespace removal commit in git blame 2023-06-14 09:52:58 +02:00
Tom Krizek
644a0b80c8
Remove trailing whitespace from all text files
I've used the following command to remove the trailing whitespace for
all tracked text files:

git grep -Il '' | xargs sed -i 's/[ \t]*$//'
2023-06-13 16:13:16 +02:00
Tom Krizek
e0c4f5b60f Merge branch '4117-serve-stale-check-9.18' into 'bind-9.18'
[9.18] Avoid false positive in serve-stale system test check

See merge request isc-projects/bind9!8027
2023-06-13 12:54:26 +00:00
Tom Krizek
c911aef622
Avoid false positive in serve-stale system test check
The purpose of the check is to verify the server has survived the
previous barrage of queries. This is done by sending a query and
checking we get a NOERROR response back.

Previously, that query could've been affected by a servfail cache - the
server would return a SERVFAIL answer, thus failing the check, despite
being up and running. Use version.bind txt ch query to avoid the
interference of servfail cache.

(cherry picked from commit dd7bcd2855)
2023-06-13 14:16:00 +02:00
Michal Nowak
6f23eef2d5 Merge branch 'mnowak/set-up-version-and-release-notes-for-bind-9.18.17' into 'bind-9.18'
Set up version and release notes for BIND 9.18.17

See merge request isc-projects/bind9!8022
2023-06-12 15:14:45 +00:00
Michal Nowak
1184301d24
Set up release notes for BIND 9.18.17 2023-06-12 16:33:46 +02:00
Michal Nowak
af92f44561
Update BIND version to 9.18.17-dev 2023-06-12 16:32:22 +02:00
Michal Nowak
8193c9b862
Update BIND version for release 2023-06-09 15:38:48 +02:00
Michal Nowak
7488850de1
Add a CHANGES marker 2023-06-09 15:38:05 +02:00
Michal Nowak
1264eb6da8 Merge branch 'mnowak/prepare-documentation-for-bind-9.18.16' into 'security-bind-9.18'
Prepare documentation for BIND 9.18.16

See merge request isc-private/bind9!543
2023-06-09 13:36:40 +00:00
Michał Kępień
7e2c9d2747
Tweak and reword release notes 2023-06-09 15:17:23 +02:00
Michal Nowak
ddfa545022
Prepare release notes for BIND 9.18.16 2023-06-09 15:17:23 +02:00