2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00
Commit Graph

34095 Commits

Author SHA1 Message Date
Michał Kępień
f9e8c8057d Set up release notes for BIND 9.17.15 2021-06-16 22:18:12 +02:00
Michał Kępień
7e0e2dd667 Update BIND version to 9.17.14 2021-06-16 22:18:12 +02:00
Michał Kępień
2f3b74dec9 Add a CHANGES marker 2021-06-16 22:18:12 +02:00
Michał Kępień
1408f3572d Merge branch 'michal/prepare-documentation-for-bind-9.17.14' into 'v9_17_14-release'
Prepare documentation for BIND 9.17.14

See merge request isc-private/bind9!298
2021-06-16 22:18:12 +02:00
Michał Kępień
652d4a74fe Prepare release notes for BIND 9.17.14 2021-06-16 22:18:12 +02:00
Michał Kępień
54842d6349 Reorder release notes 2021-06-16 22:18:12 +02:00
Michał Kępień
451b29cbbf Tweak and reword release notes 2021-06-16 22:18:12 +02:00
Michał Kępień
59a9fa4863 Tweak and reword recent CHANGES entries 2021-06-16 22:18:12 +02:00
Michał Kępień
0439e92fa0 Remove leftover release note for GL #2603 2021-06-16 22:18:12 +02:00
Artem Boldariev
3549eed088 Merge branch 'artem/doh-memmove-null-asan-fix' into 'main'
Fix undefined behaviour in DoH (passing NULL to memmove())

See merge request isc-projects/bind9!5182
2021-06-16 15:51:02 +00:00
Artem Boldariev
dc356bb196 Fix ASAN error in DoH (passing NULL to memmove())
The warning was produced by an ASAN build:

runtime error: null pointer passed as argument 2, which is declared to
never be null

This commit fixes it by checking if nghttp2_session_mem_send() has
actually returned anything.
2021-06-16 17:46:10 +03:00
Mark Andrews
629d8a3096 Merge branch '2755-bad-tkey-samples-in-genzone-sh-comment' into 'main'
Resolve "Bad TKEY samples in genzone.sh comment"

Closes #2755

See merge request isc-projects/bind9!5152
2021-06-16 05:54:30 +00:00
Mark Andrews
47ca495108 make it clear algorithm field is a domain name 2021-06-16 05:26:00 +00:00
Mark Andrews
f035a22c42 Merge branch '2739-threadsanitizer-data-race-lib-isc-task-c-435-in-task_send-unprotected-access-to-task-threadid' into 'main'
Resolve "ThreadSanitizer: data race lib/isc/task.c:435 in task_send (unprotected access to `task->threadid`)"

Closes #2739

See merge request isc-projects/bind9!5149
2021-06-15 00:39:03 +00:00
Mark Andrews
234ad2d075 Lock access to task->threadid 2021-06-15 00:01:58 +00:00
Artem Boldariev
8d36cac81a Merge branch 'artem/dig-large-doh-responses-support' into 'main'
Fix BIND and dig to support large DNS messages over DoH, disable XFRs over DoH

See merge request isc-projects/bind9!5148
2021-06-14 09:22:40 +00:00
Evan Hunt
f8caebe152 CHANGES
Mention that XFRs over DoH are explicitly disabled for now.
2021-06-14 11:38:35 +03:00
Artem Boldariev
ccd2267b1c Set sock->iface and sock->peer properly for layered connection types
This change sets the mentioned fields properly and gets rid of klusges
added in the times when we were keeping pointers to isc_sockaddr_t
instead of copies. Among other things it helps to avoid a situation
when garbage instead of an address appears in dig output.
2021-06-14 11:37:36 +03:00
Artem Boldariev
b84fa122ce Make BIND refuse to serve XFRs over DoH
We cannot use DoH for zone transfers.  According to RFC8484 a DoH
request contains exactly one DNS message (see Section 6: Definition of
the "application/dns-message" Media Type,
https://datatracker.ietf.org/doc/html/rfc8484#section-6).  This makes
DoH unsuitable for zone transfers as often (and usually!) these need
more than one DNS message, especially for larger zones.

As zone transfers over DoH are not (yet) standardised, nor discussed
in RFC8484, the best thing we can do is to return "not implemented."

Technically DoH can be used to transfer small zones which fit in one
message, but that is not enough for the generic case.

Also, this commit makes the server-side DoH code ensure that no
multiple responses could be attempted to be sent over one HTTP/2
stream. In HTTP/2 one stream is mapped to one request/response
transaction. Now the write callback will be called with failure error
code in such a case.
2021-06-14 11:37:36 +03:00
Artem Boldariev
009752cab0 Pass an HTTP handle to the read callback when finishing a stream
This commit fixes a leftover from an earlier version of the client-side
DoH code when the underlying transport handle was used directly.
2021-06-14 11:37:36 +03:00
Artem Boldariev
d5d20cebb2 Fix a crash in the client-side DoH code (header processing callback)
Support a situation in header processing callback when client side
code could receive a belated response or part of it. That could
happen when the HTTP/2 session was already closed, but there were some
response data from server in flight. Other client-side nghttp2
callbacks code already handled this case.

The bug became apparent after HTTP/2 write buffering was supported,
leading to rare unit test failures.
2021-06-14 11:37:33 +03:00
Artem Boldariev
2dfc0d9afc Nullify connect.cstream in time and keep track of all client streams
This commit ensures that sock->h2.connect.cstream gets nullified when
the object in question is deleted. This fixes a nasty crash in dig
exposed when receiving large responses leading to double free()ing.

Also, it refactors how the client-side code keeps track of client
streams (hopefully) preventing from similar errors appearing in the
future.
2021-06-14 11:37:29 +03:00
Artem Boldariev
5b507c1136 Fix BIND to serve large HTTP responses
This commit makes NM code to report HTTP as a stream protocol. This
makes it possible to handle large responses properly. Like:

dig +https @127.0.0.1 A cmts1-dhcp.longlines.com
2021-06-14 11:37:17 +03:00
Ondřej Surý
b68121adbf Merge branch 'ondrej/bump-clang-dependency-to-llvm-12' into 'main'
Change the LLVM tools version to 12

See merge request isc-projects/bind9!5174
2021-06-13 08:51:12 +00:00
Ondřej Surý
b3de93e54c Update the source code formatting using clang-format-12
clang-format now tries to keep the type-cast on the same line as the
variable.  Update the formatting.
2021-06-13 08:46:28 +02:00
Ondřej Surý
9f7855322c Change the LLVM tools version to 12
LLVM 12 stable was released on 15. April 2021, change the default
version to the current stable.
2021-06-12 08:56:37 +02:00
Michał Kępień
e5673b89e3 Merge branch '2759-fix-no-ds-proofs-for-wildcard-cname-delegations' into 'main'
Fix "no DS" proofs for wildcard+CNAME delegations

Closes #2759

See merge request isc-projects/bind9!5155
2021-06-10 08:37:37 +00:00
Michał Kępień
16708682ad Add release note 2021-06-10 10:13:23 +02:00
Michał Kępień
c223d81691 Add CHANGES entry 2021-06-10 10:13:23 +02:00
Michał Kępień
7a87bf468b Fix "no DS" proofs for wildcard+CNAME delegations
When answering a query requires wildcard expansion, the AUTHORITY
section of the response needs to include NSEC(3) record(s) proving that
the QNAME does not exist.

When a response to a query is an insecure delegation, the AUTHORITY
section needs to include an NSEC(3) proof that no DS record exists at
the parent side of the zone cut.

These two conditions combined trip up the NSEC part of the logic
contained in query_addds(), which expects the NS RRset to be owned by
the first name found in the AUTHORITY section of a delegation response.
This may not always be true, for example if wildcard expansion causes an
NSEC record proving QNAME nonexistence to be added to the AUTHORITY
section before the delegation is added to the response.  In such a case,
named incorrectly omits the NSEC record proving nonexistence of QNAME
from the AUTHORITY section.

The same block of code is affected by another flaw: if the same NSEC
record proves nonexistence of both the QNAME and the DS record at the
parent side of the zone cut, this NSEC record will be added to the
AUTHORITY section twice.

Fix by looking for the NS RRset in the entire AUTHORITY section and
adding the NSEC record to the delegation using query_addrrset() (which
handles duplicate RRset detection).
2021-06-10 10:13:23 +02:00
Michał Kępień
26ec4b9a89 Add AUTHORITY tests for CNAME-sourced delegations
Add a set of system tests which check the contents of the AUTHORITY
section for signed, insecure delegation responses constructed from CNAME
records and wildcards, both for zones using NSEC and NSEC3.
2021-06-10 10:13:23 +02:00
Michał Kępień
439efc6e55 Merge branch 'michal/fix-the-variable-checked-by-a-post-load-assertion' into 'main'
Fix the variable checked by a post-load assertion

See merge request isc-projects/bind9!5164
2021-06-10 08:03:50 +00:00
Mark Andrews
098639dc59 Fix the variable checked by a post-load assertion
Instead of checking the value of the variable modified two lines earlier
(the number of SOA records present at the apex of the old version of the
zone), one of the RUNTIME_CHECK() assertions in zone_postload() checks
the number of SOA records present at the apex of the new version of the
zone, which is already checked before.  Fix the assertion by making it
check the correct variable.
2021-06-10 10:01:34 +02:00
Michał Kępień
9ec886bc53 Merge branch 'michal/update-release-checklist' into 'main'
Update release checklist

See merge request isc-projects/bind9!5165
2021-06-10 06:58:54 +00:00
Michał Kępień
d0886bd9c3 Update release checklist
Add two items to the release checklist to ensure that the start and the
end of the code freeze for each release cycle is announced on
Mattermost.
2021-06-10 08:49:38 +02:00
Mark Andrews
b3ef45127b Merge branch '2760-db-unit-test-failure' into 'main'
Resolve "db unit test failure"

Closes #2760

See merge request isc-projects/bind9!5156
2021-06-09 22:29:46 +00:00
Mark Andrews
2bc454dc2d Adjust acceptable count values
usleep(100000) can be slightly less than 10ms so allow the count
to reach 11.
2021-06-09 22:05:55 +00:00
Mark Andrews
efacee3d09 Merge branch '2720-threadsanitizer-data-race-lib-isc-unix-time-c-110-in-isc_time_isepoch' into 'main'
Resolve "ThreadSanitizer: data race lib/isc/unix/time.c:110 in isc_time_isepoch"

Closes #2720

See merge request isc-projects/bind9!5124
2021-06-09 13:51:10 +00:00
Mark Andrews
3d66e97a28 Address race between zone_settimer and set_key_expiry_warning by
adding missing lock.

    WARNING: ThreadSanitizer: data race
    Read of size 4 at 0x000000000001 by thread T1 (mutexes: read M1, write M2):
    #0 isc_time_isepoch lib/isc/unix/time.c:110
    #1 zone_settimer lib/dns/zone.c:14649
    #2 dns_zone_maintenance lib/dns/zone.c:6281
    #3 dns_zonemgr_forcemaint lib/dns/zone.c:18190
    #4 view_loaded server.c:9654
    #5 call_loaddone lib/dns/zt.c:301
    #6 doneloading lib/dns/zt.c:575
    #7 zone_asyncload lib/dns/zone.c:2259
    #8 task_run lib/isc/task.c:845
    #9 isc_task_run lib/isc/task.c:938
    #10 isc__nm_async_task lib/isc/netmgr/netmgr.c:855
    #11 process_netievent lib/isc/netmgr/netmgr.c:934
    #12 process_queue lib/isc/netmgr/netmgr.c:1003
    #13 process_all_queues lib/isc/netmgr/netmgr.c:775
    #14 async_cb lib/isc/netmgr/netmgr.c:804
    #15 <null> <null>
    #16 isc__trampoline_run lib/isc/trampoline.c:191
    #17 <null> <null>

    Previous write of size 4 at 0x000000000001 by thread T2:
    #0 isc_time_set lib/isc/unix/time.c:93
    #1 set_key_expiry_warning lib/dns/zone.c:6430
    #2 del_sigs lib/dns/zone.c:6711
    #3 zone_resigninc lib/dns/zone.c:7113
    #4 zone_maintenance lib/dns/zone.c:11111
    #5 zone_timer lib/dns/zone.c:14588
    #6 task_run lib/isc/task.c:845
    #7 isc_task_run lib/isc/task.c:938
    #8 isc__nm_async_task lib/isc/netmgr/netmgr.c:855
    #9 process_netievent lib/isc/netmgr/netmgr.c:934
    #10 process_queue lib/isc/netmgr/netmgr.c:1003
    #11 process_all_queues lib/isc/netmgr/netmgr.c:775
    #12 async_cb lib/isc/netmgr/netmgr.c:804
    #13 <null> <null>
    #14 isc__trampoline_run lib/isc/trampoline.c:191
    #15 <null> <null>

    SUMMARY: ThreadSanitizer: data race lib/isc/unix/time.c:110 in isc_time_isepoch
2021-06-09 13:31:05 +00:00
Ondřej Surý
0f47ad87c2 Merge branch '2690-remove-windows-support-for-bind-9-17-9-18' into 'main'
Completely remove BIND 9 Windows support

Closes #2690

See merge request isc-projects/bind9!5073
2021-06-09 12:59:33 +00:00
Ondřej Surý
0b5f205b57 Add CHANGES and release note for GL #2690 2021-06-09 14:35:35 +02:00
Ondřej Surý
440fb3d225 Completely remove BIND 9 Windows support
The Windows support has been completely removed from the source tree
and BIND 9 now no longer supports native compilation on Windows.

We might consider reviewing mingw-w64 port if contributed by external
party, but no development efforts will be put into making BIND 9 compile
and run on Windows again.
2021-06-09 14:35:14 +02:00
Matthijs Mekking
ad130e4509 Merge branch '2725-nsec3param-changes-on-restart' into 'main'
Fix NSEC3 resalt on restart

Closes #2725

See merge request isc-projects/bind9!5126
2021-06-09 08:29:51 +00:00
Matthijs Mekking
d51aed7112 Add release note and change entry for [#2725] 2021-06-09 09:14:51 +02:00
Matthijs Mekking
0ae3ffdc1c Fix NSEC3 resalting upon restart
When named restarts, it will examine signed zones and checks if the
current denial of existence strategy matches the dnssec-policy. If not,
it will schedule to create a new NSEC(3) chain.

However, on startup the zone database may not be read yet, fooling
BIND that the denial of existence chain needs to be created. This
results in a replacement of the previous NSEC(3) chain.

Change the code such that if the NSEC3PARAM lookup failed (the result
did not return in ISC_R_SUCCESS or ISC_R_NOTFOUND), we will try
again later. The nsec3param structure has additional variables to
signal if the lookup is postponed. We also need to save the signal
if an explicit resalt was requested.

In addition to the two added boolean variables, we add a variable to
store the NSEC3PARAM rdata. This may have a yet to be determined salt
value. We can't create the private data yet because there may be a
mismatch in salt length and the NULL salt value.
2021-06-09 09:14:09 +02:00
Matthijs Mekking
08a9e7add1 Add test for NSEC3PARAM not changed after restart
Add a test case where 'named' is restarted and ensure that an already
signed zone does not change its NSEC3 parameters.

The test case first tests the current zone and saves the used salt
value. Then after restart it checks if the salt (and other parameters)
are the same as before the restart.

This test case changes 'set_nsec3param'. This will now reset the salt
value, and when checking for NSEC3PARAM we will store the salt and
use it when testing the NXDOMAIN response. This does mean that for
every test case we now have to call 'set_nsec3param' explicitly (and
can not omit it because it is the same as the previous zone).

Finally, slightly changed some echo output to make debugging friendlier.
2021-06-09 09:14:09 +02:00
Ondřej Surý
be01f589d9 Merge branch '2732-pause-the-dbiterator-in-dumptostream' into 'main'
Pause the dbiterator when dumping the zone to the disk

Closes #2732

See merge request isc-projects/bind9!5150
2021-06-04 09:05:52 +00:00
Ondřej Surý
7e59b8a4a1 Pause the dbiterator when dumping the zone to the disk
When we rewrote the zone dumping to use the separate threadpool, the
dumping would acquire the read lock for the whole time the zone dumping
process is dumping the zone.

When combined with incoming IXFR that tries to acquire the write lock on
the same rwlock, we would end up blocking all the other readers.

In this commit, we pause the dbiterator every time we get next record
and before start dumping it to the disk.
2021-06-04 08:25:05 +00:00
Mark Andrews
7fef01201d Merge branch '2751-serve-stale-tests-false-negative' into 'main'
Resolve "serve-stale tests false negative"

Closes #2751

See merge request isc-projects/bind9!5143
2021-06-03 08:40:38 +00:00
Mark Andrews
af95cb8ccc Address test race condition in serve-stale
the dig.out.test# files could still be being written when the
content greps where being made.
2021-06-03 18:20:14 +10:00