2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00
Commit Graph

39204 Commits

Author SHA1 Message Date
Evan Hunt
f58b9e9d2c CHANGES and release notes for [GL #4012] 2023-05-30 15:36:15 -07:00
Evan Hunt
26b4acde16 remove win2k gss-tsig hacks
Remove the code implementing nonstardard behaviors that were formerly
needed to allow GSS-TSIG to work with Windows 2000, which passed
End-of-Life in 2010.

Deprecate the "oldgsstsig" command and "-o" command line option
to nsupdate; these are now treated as synonyms for "gsstsig" and "-g"
respectively.
2023-05-30 15:36:01 -07:00
Michal Nowak
1e3bafde51 Merge branch 'mnowak/custom-userspace-rcu-library' into 'main'
Drop liburcu-related TSAN suppressions

See merge request isc-projects/bind9!7971
2023-05-30 18:27:12 +00:00
Michal Nowak
04dda8661f Change images for TSAN jobs
Fedora 38 and Debian "bullseye" images were "forked" to images used only
for TSAN CI jobs. The new images contain TSAN-aware liburcu that does
not fit well with ASAN CI jobs for which original images were also used.

Also, drop liburcu-related TSAN suppressions because they are
unnecessary with TSAN-aware liburcu.
2023-05-30 20:13:19 +02:00
Michal Nowak
1b7ed2da1a Merge branch 'mnowak/look-for-core-files-in-TOP_BUILDDIR' into 'main'
Look for core files in $TOP_BUILDDIR

See merge request isc-projects/bind9!7869
2023-05-30 17:54:48 +00:00
Michal Nowak
a13448a769 Look for core files in $TOP_BUILDDIR
The get_core_dumps.sh script couldn't find and process core files of
out-of-tree configurations because it looked for them in the source
instead of the build directory.
2023-05-30 19:41:31 +02:00
Tom Krizek
7b863f9621 Merge branch 'tkrizek-fix-pytest-base-port' into 'main'
Fix base_port calculation in pytest runner

See merge request isc-projects/bind9!7981
2023-05-30 13:36:42 +00:00
Tom Krizek
e8ea6b610b Fix base_port calculation in pytest runner
The selected base port should be in the range <port_min, port_max), the
formula was incorrect.

Credit for discovering this fault goes to Ondrej Sury.
2023-05-30 14:11:14 +02:00
Matthijs Mekking
7b35586047 Merge branch '3950-serve-stale-strikes-again' into 'main'
Fix serve-stale bug when cache has no data

Closes #3950

See merge request isc-projects/bind9!7856
2023-05-30 11:02:13 +00:00
Matthijs Mekking
23dbb6ba72 Add release note and changes for #3950
Fixing another serve-stale bug is still news.
2023-05-30 11:58:50 +02:00
Matthijs Mekking
74d30879ba Extend serve-stale logging
Print the database lookup result in serve-stale logs for debugging
potential future serve-stale issues.
2023-05-30 11:58:19 +02:00
Matthijs Mekking
bbd163acf6 Fix serve-stale bug when cache has no data
We recently fixed a bug where in some cases (when following an
expired CNAME for example), named could return SERVFAIL if the target
record is still valid (see isc-projects/bind9#3678, and
isc-projects/bind9!7096). We fixed this by considering non-stale
RRsets as well during the stale lookup.

However, this triggered a new bug because despite the answer from
cache not being stale, the lookup may be triggered by serve-stale.
If the answer from database is not stale, the fix in
isc-projects/bind9!7096 erroneously skips the serve-stale logic.

Add 'answer_found' checks to the serve-stale logic to fix this issue.
2023-05-30 11:58:19 +02:00
Matthijs Mekking
c3d4fd3449 Add serve-stale test case for GL #3950
Add a test case where when priming the cache with a slow authoritative
resolver, the stale-answer-client-timeout option should not return
a delegation to the client (it should wait until an applicable answer
is found, if no entry is found in the cache).
2023-05-30 11:58:19 +02:00
Ondřej Surý
efa8cbbf68 Merge branch '3905-placeholder' into 'main'
Add CHANGES placeholder for [GL #3905]

Closes #3905

See merge request isc-projects/bind9!7976
2023-05-29 06:02:51 +00:00
Ondřej Surý
e497cb485c Add CHANGES placeholder for [GL #3905] 2023-05-29 08:00:16 +02:00
Ondřej Surý
d98cfe7f8b Merge branch '4098-remove-cruft-epoll-kqueue-configure-options' into 'main'
Remove obsolete epoll/kqueue/devpoll configure options

Closes #4098

See merge request isc-projects/bind9!7973
2023-05-29 05:57:03 +00:00
Ondřej Surý
0266760fdd Add CHANGES note for [GL #4098] 2023-05-29 07:44:24 +02:00
Ondřej Surý
051f3d612f Remove obsolete epoll/kqueue/devpoll configure options
Since we don't use networking directly but rather via libuv, these
configure options were no-op.  Remove the configure checks for epoll
(Linux), kqueue (BSDs) and /dev/poll (Solaris).
2023-05-29 07:44:24 +02:00
Mark Andrews
3bcc25abf0 Merge branch '4090-corrected-bad-insist-logic-in-isc_radix_remove' into 'main'
Resolve "Corrected bad INSIST logic in isc_radix_remove()"

Closes #4090

See merge request isc-projects/bind9!7966
2023-05-29 02:22:18 +00:00
Mark Andrews
03ebe96110 Add regression test for [GL # 4090]
These insertions are added to produce a radix tree that will trigger
the INSIST reported in [GL #4090].  Due to fixes added since BIND 9.9
an extra insert in needed to ensure node->parent is non NULL.
2023-05-29 01:40:57 +00:00
Mark Andrews
ac2e0bc3ff Move isc_mem_put to after node is checked for equality
isc_mem_put NULL's the pointer to the memory being freed.  The
equality test 'parent->r == node' was accidentally being turned
into a test against NULL.
2023-05-29 01:40:57 +00:00
Evan Hunt
5c30012a83 Merge branch '4085-httpd-shutdown-issue' into 'main'
don't set SHUTTINGDOWN until after calling the request callbacks

Closes #4085

See merge request isc-projects/bind9!7961
2023-05-27 04:12:09 +00:00
Evan Hunt
512e5e786b don't set SHUTTINGDOWN until after calling the request callbacks
if we set ISC_HTTPDMGR_SHUTTINGDOWN in the http manager before
calling the pending request callbacks, it can trigger an assertion.
2023-05-27 00:41:37 +00:00
Artem Boldariev
45b3a4a4cb Merge branch '4091-syncrhonise-access-to-the-client-tlsctx-cache' into 'main'
ZMGR: TLS contexts cache - properly synchronise access

Closes #4091

See merge request isc-projects/bind9!7967
2023-05-26 12:07:43 +00:00
Artem Boldariev
0b95cf74ff ZMGR: TLS contexts cache - properly synchronise access
This commit ensures that access to the TLS context cache within zone
manager is properly synchronised.

Previously there was a possibility for it to get unexpectedly
NULLified for a brief moment by a call to
dns_zonemgr_set_tlsctx_cache() from one thread, while being accessed
from another (e.g. from got_transfer_quota()). This behaviour could
lead to server abort()ing on configuration reload (under very rare
circumstances).

That behaviour has been fixed.
2023-05-26 14:18:03 +03:00
Tom Krizek
714d722604 Merge branch '4082-rrl-would-limit-log-line' into 'main'
Disable rrl check in slow environments

Closes #4082

See merge request isc-projects/bind9!7963
2023-05-26 10:26:41 +00:00
Tom Krizek
d8997db5d5 Disable rrl check in slow environments
The check for 'would limit' log message is triggered by sending at least
three messages within one second. However, in extremely slow conditions
(currently when running with clang+TSAN in CI), the individual queries
might take too much time to send enough of them within one second.

Since this is a pretty rare condition, let's just silently skip this
test in environments where a single query takes more than 500 ms, since
there's no way to perform the check under such conditions.

Closes #4082
2023-05-26 12:25:36 +02:00
Michal Nowak
6efe11bcec Merge branch 'mnowak/gitlab-runner-autoscaling' into 'main'
Run most Docker CI jobs in AWS with autoscaler

See merge request isc-projects/bind9!7960
2023-05-26 09:45:53 +00:00
Michal Nowak
f09cf69594 Run most Docker CI jobs in AWS with autoscaler
All but the "respdiff-long" job, for which our AWS instances do not have
enough memory, are now being spawned in the AWS by the autoscaler
executor.
2023-05-26 11:37:58 +02:00
Evan Hunt
ee5ee5a994 Merge branch '4072-tcp-dispatch-timeout' into 'main'
fix handling of TCP timeouts

Closes #4072

See merge request isc-projects/bind9!7937
2023-05-26 08:49:52 +00:00
Evan Hunt
0e800467ee fix handling of TCP timeouts
when a TCP dispatch times out, we call tcp_recv() with a result
value of ISC_R_TIMEDOUT; this cancels the oldest dispatch
entry in the dispatch's active queue, plus any additional entries
that have waited longer than their configured timeouts. if, at
that point, there were more dispatch entries still on the active
queue, it resumes reading, but until now it failed to restart
the timer.

this has been corrected: we now calculate a new timeout
based on the oldest dispatch entry still remaining.  this
requires us to initialize the start time of each dispatch entry
when it's first added to the queue.

in order to ensure that the handling of timed-out requests is
consistent, we now calculate the runtime of each dispatch
entry based on the same value for 'now'.

incidentally also fixed a compile error that turned up when
DNS_DISPATCH_TRACE was turned on.
2023-05-26 00:41:01 -07:00
Evan Hunt
2f75605698 Merge branch '4079-multiple-keyrings' into 'main'
prevent TSIG keys from being added to multiple rings

Closes #4079

See merge request isc-projects/bind9!7955
2023-05-25 22:01:33 +00:00
Evan Hunt
03a9aa95bf CHANGES for [GL #4079] 2023-05-25 11:59:37 -07:00
Evan Hunt
e436d84408 prevent TSIG keys from being added to multiple rings
it was possible to add a TSIG key to more than one TSIG
keyring at a time, and this was in fact happening with the
session key, which was generated once and then added to the
keyrings for each view as it was configured.

this has been corrected and a REQUIRE added to dns_tsigkeyring_add()
to prevent it from happening again.
2023-05-25 11:59:02 -07:00
Arаm Sаrgsyаn
80eb7c2d21 Merge branch '3765-interfacemgr-use-after-afree-on-shutdown' into 'main'
Fix an interfacemgr use-after-free error in zoneconf.c:isself()

Closes #3765

See merge request isc-projects/bind9!7962
2023-05-25 08:29:01 +00:00
Aram Sargsyan
b409db08cf Add a CHANGES note for [GL #3765] 2023-05-24 14:38:53 +00:00
Aram Sargsyan
64d69e4adc Fix an interfacemgr use-after-free error in zoneconf.c:isself()
The 'named_g_server->interfacemgr' pointer is saved in the zone
structure using dns_zone_setisself(), as a void* argument to be
passed to the isself() callback, so there is no attach/detach,
and when shutting down, the interface manager can be destroyed
by the shutdown_server(), running in exclusive mode, and causing
isself() to crash when trying to use the pointer.

Instead of keeping the interface manager pointer in the zone
structure, just check and use the 'named_g_server->interfacemgr'
itself, as it was implemented originally in the
3aca8e5bf3 commit. Later, in the
8eb88aafee commit, the code was
changed to pass the interface manager pointer using the additional
void* argument, but the commit message doesn't mention if there
was any practical reason for that.

Additionally, don't pass the interfacemgr pointer to the
ns_interfacemgr_getaclenv() function before it is checked
against NULL.
2023-05-24 14:26:04 +00:00
Tom Krizek
5f62932bb1 Merge branch 'tkrizek/ci-clang-tsan-allow-failure' into 'main'
Allow the system:clang:tsan job to fail in CI

See merge request isc-projects/bind9!7958
2023-05-24 08:38:46 +00:00
Tom Krizek
83a0c3d858 Allow the system:clang:tsan job to fail in CI
There are couple of known failures currently affecting this test:
- rrl (GL #4082)
- upforwd (GL #4072)
2023-05-24 10:37:45 +02:00
Matthijs Mekking
bf6fbf9ee5 Merge branch '2710-fix-inline-signing-multisigner-bugs-matthijs' into 'main'
Make multisigner server capabilities work with inline-signing

Closes #2710

See merge request isc-projects/bind9!6901
2023-05-23 12:05:46 +00:00
Matthijs Mekking
7ab3bfd596 Fix dnssec system test
The 'update-nsec3.example' requires to be DNSSEC maintained via
dynamic update. Commit 03b22983cd20cec51ad8b9f25f2e7d0e472dc79c adds
checks to make sure the raw zone is not signed. So the test case neesd
to be updated to allow for DNSSEC maintenance.
2023-05-23 08:53:23 +02:00
Matthijs Mekking
ef58f2444f Add new dns_rdatatype_iskeymaterial() function
The following code block repeats quite often:

    if (rdata.type == dns_rdatatype_dnskey ||
        rdata.type == dns_rdatatype_cdnskey ||
        rdata.type == dns_rdatatype_cds)

Introduce a new function to reduce the repetition.
2023-05-23 08:53:23 +02:00
Matthijs Mekking
81cb18b8a2 Make make_dnskey() a public funcion
It can be used to compare DNSKEY, CDNSKEY, and CDS records with
signing keys.
2023-05-23 08:53:23 +02:00
Matthijs Mekking
f636aceb50 Add more multisigner tests, removing records
A zone in multisigner model 2 should also be possible to remove
previously added DNSKEY, CDS and CDNSKEY records from the zone operated
by the other provider.
2023-05-23 08:53:23 +02:00
Matthijs Mekking
70e10b3c50 Add bump in the wire multisigner test
Add a test case where updates are being made against a hidden primary
and two bump in the wire signers (the providers in the multisigner
model) serve the zone.

The test covers the same cases as for two primary providers that is:
- Add DNSKEY
- Remove (previously added) DNSKEY
- Add CDNSKEY
- Remove (previously added) CDNSKEY
- Add CDS
- Remove (previously added) CDS
2023-05-23 08:53:23 +02:00
Mark Andrews
d24297343f Don't sign the raw zone
The raw zone is not supposed to be signed.  DNSKEY records in a raw zone
should not trigger zone signing.  The update code needs to be able to
identify when it is working on a raw zone.  Add dns_zone_israw() and
dns_zone_issecure() enable it to do this. Also, we need to check the
case for 'auto-dnssec maintain'.
2023-05-23 08:53:23 +02:00
Matthijs Mekking
508c60ad90 Ensure no DNSSEC records are in the raw journal
Add checks to the multisigner test to make sure no DNSSEC related
records (NSEC, NSEC3, NSEC3PARAM, RRSIG) end up in the raw journal.
2023-05-23 08:53:23 +02:00
Matthijs Mekking
7a39651da5 Add notes and change entry 2023-05-23 08:53:22 +02:00
Matthijs Mekking
a565cb9c31 Add more multisigner tests
A zone in multisigner model 2 should also be possible to publish the
CDS and CDNSKEY records from their KSK into the zone operated by the
other provider.
2023-05-23 08:52:01 +02:00
Matthijs Mekking
b493c8505e Fix dns_zone_getkasp() function
For inline-signing zones, sometimes kasp was not detected because
the function was called on the raw (unsigned) version of the zone,
but the kasp is only set on the secure (signed) version of the zone.

Fix the dns_zone_getkasp() function to check whether the zone
structure is inline_raw(), and if so, use the kasp from the
secure version.

In zone.c we can access the kasp pointer directly.
2023-05-23 08:52:01 +02:00