2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-05 00:55:24 +00:00
Commit Graph

38263 Commits

Author SHA1 Message Date
Mark Andrews
71dbd09796 Allow some time to the root trust anchor to appear
Following deleting the root trust anchor and reconfiguring the
server it takes some time to for trust anchor to appear in 'rndc
managed-keys status' output.  Retry several times.
2023-02-07 12:59:49 +00:00
Mark Andrews
5746232b02 Merge branch '3836-missing-ossl_store_info_free-calls-in-dst__openssl_fromlabel_provider-on-error-path' into 'main'
Resolve "Missing OSSL_STORE_INFO_free calls in dst__openssl_fromlabel_provider on error path"

Closes #3836

See merge request isc-projects/bind9!7456
2023-02-07 12:59:06 +00:00
Mark Andrews
7f12c0884f Call OSSL_STORE_INFO_free on error path 2023-02-07 12:29:34 +00:00
Arаm Sаrgsyаn
80b88df4d3 Merge branch '3839-fix-resume_dslookup-bug' into 'main'
Fix a bug in resolver's resume_dslookup() function

Closes #3839

See merge request isc-projects/bind9!7476
2023-02-07 12:22:31 +00:00
Mark Andrews
4d465e9c0c check that delv handles REFUSED when chasing DS records 2023-02-07 10:41:21 +00:00
Aram Sargsyan
2a1f937536 Add a CHANGES note for [GL #3839] 2023-02-07 10:41:21 +00:00
Aram Sargsyan
410fcbfcfe Fix a bug in resolver's resume_dslookup() function
A recent refactoring in 7e4e125e5e
had introduced a logical error which could result in calling the
dns_resolver_createfetch() function with 'nameservers' pointer set
to NULL, but with 'domain' not set to NULL, which is not allowed
by the function.

Make sure 'domain' is set only when 'nsrdataset' is valid.
2023-02-07 10:41:21 +00:00
Michal Nowak
351aef8c3a Merge branch 'mnowak/set-up-version-and-release-notes-for-bind-9.19.11' into 'main'
Set up version and release notes for bind 9.19.11

See merge request isc-projects/bind9!7495
2023-02-07 10:03:17 +00:00
Michal Nowak
8e7fc75a3d Set up release notes for BIND 9.19.11 2023-02-07 10:25:44 +01:00
Michal Nowak
8965002255 Update BIND version to 9.19.11-dev 2023-02-07 10:22:26 +01:00
Mark Andrews
7e6611da8f Merge branch '3838-named-rrchecker-should-cleanup-when-it-detects-an-error' into 'main'
Resolve "named-rrchecker should cleanup when it detects an error"

Closes #3838

See merge request isc-projects/bind9!7473
2023-02-07 00:00:54 +00:00
Mark Andrews
dbe82813e6 named-rrchecker: have fatal cleanup
It is trivial to fully cleanup memory on all the error paths in
named-rrchecker, many of which are triggered by bad user input.
This involves freeing lex and mctx if they exist when fatal is
called.
2023-02-06 23:29:12 +00:00
Evan Hunt
a9cc88b8d6 Merge branch '3790-use-configured-udp-port' into 'main'
use configured source ports for UDP requests

Closes #3790

See merge request isc-projects/bind9!7479
2023-02-06 23:28:13 +00:00
Evan Hunt
4f50854e7a CHANGES for [GL #3790] 2023-02-06 15:04:24 -08:00
Evan Hunt
9cffd5c431 add source port configuration tests
check in the log files of receiving servers that the originating
ports for notify and SOA query messages were set correctly from
configured notify-source and transfer-source options.
2023-02-06 15:03:58 -08:00
Evan Hunt
4d50c912ba use configured source ports for UDP requests
the optional 'port' option, when used with notify-source,
transfer-source, etc, is used to set up UDP dispatches with a
particular source port, but when the actual UDP connection was
established the port would be overridden with a random one. this
has been fixed.

(configuring source ports is deprecated in 9.20 and slated for
removal in 9.22, but should still work correctly until then.)
2023-02-06 15:03:58 -08:00
Evan Hunt
e46d5d84fc Merge branch 'each-remove-bindkeys' into 'main'
remove /etc/bind.keys

Closes #3850

See merge request isc-projects/bind9!7484
2023-02-06 23:03:08 +00:00
Evan Hunt
c144fd2871 CHANGES for [GL #3850] 2023-02-06 14:39:43 -08:00
Evan Hunt
9bb46262af remove /etc/bind.keys
the built-in trust anchors in named and delv are sufficent for
validation. named still needs to be able to load trust anchors from
a bind.keys file for testing purposes, but it doesn't need to be
the default behavior.

we now only load trust anchors from a file if explicitly specified
via the "bindkeys-file" option in named or the "-a" command line
argument to delv. documentation has been cleaned up to remove references
to /etc/bind.keys.

Closes #3850.
2023-02-06 14:39:31 -08:00
Evan Hunt
f291b77cd2 Merge branch '3673-delay-trust-anchor-management' into 'main'
delay trust anchor management until zones are loaded

Closes #3673

See merge request isc-projects/bind9!7441
2023-02-06 22:12:32 +00:00
Evan Hunt
bafbbd2465 delay trust anchor management until zones are loaded
it was possible for a managed trust anchor needing to send a key
refresh query to be unable to do so because an authoritative zone
was not yet loaded. this has been corrected by delaying the
synchronization of managed-keys zones until after all zones are
loaded.
2023-02-06 13:50:03 -08:00
Tony Finch
7e8e2d55b0 Merge branch 'fanf-unused-fromwire-downcase' into 'main'
Remove unused support for fromwire(DNS_NAME_DOWNCASE)

See merge request isc-projects/bind9!7467
2023-02-06 14:20:42 +00:00
Tony Finch
50ab648f8a Remove unused support for fromwire(DNS_NAME_DOWNCASE)
Most of this change is fixing dns_rdata_fromwire() so
it does not propagate the unused options variable.
2023-02-06 13:26:36 +00:00
Tony Finch
ecd428240b Merge branch 'fanf-bitstring-cleanup' into 'main'
Remove some remnants of bitstring labels

See merge request isc-projects/bind9!7196
2023-02-06 13:23:46 +00:00
Tony Finch
c70bb3deb5 Remove some remnants of bitstring labels
* rbt node chains were sized to allow for bitstring labels, so they
  had 256 levels; but in the absence of bistrings, 128 is enough.

* dns_byaddr_createptrname() had a redundant options argument,
  and a very outdated doc comment.

* A number of comments referred to bitstring labels in a way that is
  no longer helpful. (A few informative comments remain.)
2023-02-06 13:22:30 +00:00
Tony Finch
8088728c90 Merge branch 'fanf-named-compilezone-stray-backtick' into 'main'
Fix the reference to RFC 1035 in named-compilezone(1)

See merge request isc-projects/bind9!7485
2023-02-06 12:31:08 +00:00
Tony Finch
ef1170b3fc Fix the reference to RFC 1035 in named-compilezone(1)
There was a stray backquote
2023-02-06 12:31:01 +00:00
Tony Finch
10ff56b345 Merge branch 'fanf-time-monotonic' into 'main'
Add isc_time_monotonic()

See merge request isc-projects/bind9!7486
2023-02-06 12:23:14 +00:00
Tony Finch
ff63b53ff4 Add isc_time_monotonic()
This is to simplify measurements of how long things take.
2023-02-06 12:14:51 +00:00
Tony Finch
89a3ff1d06 Merge branch '3845-mem-zero-non-zero' into 'main'
Fix ISC_MEM_ZERO on allocators with malloc_usable_size()

Closes #3845

See merge request isc-projects/bind9!7481
2023-02-06 12:09:28 +00:00
Tony Finch
b8e71f9580 Fix ISC_MEM_ZERO on allocators with malloc_usable_size()
ISC_MEM_ZERO requires great care to use when the space returned by
the allocator is larger than the requested space, and when memory is
reallocated. You must ensure that _every_ call to allocate or
reallocate a particular block of memory uses ISC_MEM_ZERO, to ensure
that the extra space is zeroed as expected. (When ISC_MEMFLAG_FILL
is set, the extra space will definitely be non-zero.)

When BIND is built without jemalloc, ISC_MEM_ZERO is implemented in
`jemalloc_shim.h`. This had a bug on systems that have malloc_size()
or malloc_usable_size(): memory was only zeroed up to the requested
size, not the allocated size. When an oversized allocation was
returned, and subsequently reallocated larger, memory between the
original requested size and the original allocated size could
contain unexpected nonzero junk. The realloc call does not know the
original requested size and only zeroes from the original allocated
size onwards.

After this change, `jemalloc_shim.h` always zeroes up to the
allocated size, not the requested size.
2023-02-06 11:21:12 +00:00
Michał Kępień
a695d14150 Merge branch '3827-fix-dnsrps-builds' into 'main'
Fix DNSRPS builds

Closes #3827

See merge request isc-projects/bind9!7450
2023-02-01 10:24:22 +00:00
Michał Kępień
493eadd1ae Add CHANGES entry for GL #3827 2023-02-01 11:22:59 +01:00
Michał Kępień
183cd1bbe5 Fix 'view' variable scope in load_configuration()
Commit b69e783164 changed the scope of the
local 'view' variable in load_configuration(), but the code section
guarded by the #ifdef USE_DNSRPS directive was not adjusted accordingly,
causing build errors for DNSRPS-enabled builds.  Fix the latter by
declaring the 'view' variable inside the loop in the DNSRPS-specific
block of code.
2023-02-01 11:22:59 +01:00
Michał Kępień
f3def4e4ed Handle iterator options in rpsdb_allrdatasets()
Commit 7695c36a5d added a new parameter,
'options', to the prototype of the 'allrdatasets' function pointer in
struct dns_dbmethods.  Handle this new parameter accordingly in
rpsdb_allrdatasets().
2023-02-01 11:22:59 +01:00
Michał Kępień
e688ca5316 Add DNSRPS builds to pairwise testing
The --enable-dnsrps-dl switch for ./configure enables preparing a
DNSRPS-enabled build of BIND 9 that is not directly linked against a
DNSRPS provider library (dlopen() at runtime is used instead).  Employ
this switch to test DNSRPS-enabled builds in the pairwise testing job in
GitLab CI.
2023-02-01 11:22:59 +01:00
Evan Hunt
6398059af3 Merge branch '3797-part2-ratelimiter-refactoring' into 'main'
refactor isc_ratelimiter to use loop callbacks

See merge request isc-projects/bind9!7366
2023-02-01 09:05:38 +00:00
Evan Hunt
7fd78344e0 refactor isc_ratelimiter to use loop callbacks
the rate limter now uses loop callbacks rather than task events.
the API for isc_ratelimiter_enqueue() has been changed; we now pass
in a loop, a callback function and a callback argument, and
receive back a rate limiter event object (isc_rlevent_t). it
is no longer necessary for the caller to allocate the event.

the callback argument needs to include a pointer to the rlevent
object so that it can be freed using isc_rlevent_free(), or by
dequeueing.
2023-01-31 21:41:19 -08:00
Mark Andrews
d6c3d9e04a Merge branch '3828-fuzz-dns_message_checksig-c-fails-to-call-dst_lib_destroy' into 'main'
Resolve "fuzz/dns_message_checksig.c fails to call dst_lib_destroy"

Closes #3828

See merge request isc-projects/bind9!7442
2023-01-31 14:16:41 +00:00
Mark Andrews
13e0dfbae2 Add CHANGES for [GL #3828] 2023-02-01 00:35:11 +11:00
Mark Andrews
897e0cd6f4 Call dst_lib_destroy if we have called dst_lib_init
This returns BIGNUMs to OpenSSL allowing libcrypto to fully clean up.
2023-02-01 00:34:33 +11:00
Mark Andrews
41f3466307 Merge branch '3830-nsupdate-failed-to-handle-primary-server-address-lookup-gracefully' into 'main'
Resolve "nsupdate failed to handle primary server address lookup gracefully"

Closes #3830

See merge request isc-projects/bind9!7444
2023-01-31 13:13:18 +00:00
Mark Andrews
fda7858e74 Add CHANGES for [GL #3830] 2023-01-31 23:52:19 +11:00
Mark Andrews
f1387514c6 Handle address lookup failure more gracefully
If the address lookup of the primary server fails just abort
the current update request rather than calling exit.  This allows
nsupdate to cleanup gracefully.
2023-01-31 23:51:44 +11:00
Mark Andrews
fa21157bc1 Merge branch '3829-named-v-leaks-memory-when-shutting-down' into 'main'
Resolve "'named -V' leaks memory when shutting down"

Closes #3829

See merge request isc-projects/bind9!7443
2023-01-30 23:02:51 +00:00
Mark Andrews
1d258e2fb8 Add CHANGES for [GL #3829] 2023-01-30 22:26:50 +00:00
Mark Andrews
8b3c018f54 Call dns_lib_destroy in bin/named/main.c:printversion
There were unbalanced calls to dns_lib_init and dns_lib_destroy
leading to an OpenSSL memory leak.
2023-01-30 22:26:50 +00:00
Ondřej Surý
cd03a842b4 Merge branch '3806-give-named-log-memory-context-a-name' into 'main'
Properly name ADB hashmap and named log memory contexts

Closes #3806

See merge request isc-projects/bind9!7449
2023-01-30 11:56:39 +00:00
Ondřej Surý
acab74882c Properly name ADB hashmap and named log memory contexts
The ADB hashmaps are stored in extra memory contexts, so the hash
tables are excluded from the overmem accounting.  The new memory
context was unnamed, give it a proper name.

Same thing has happened with extra memory context used for named
global log context - give the extra memory context a proper name.
2023-01-30 12:54:57 +01:00
Ondřej Surý
a90b3c040f Merge branch '3806-give-ADB-heap-memory-context-a-name' into 'main'
Properly name ADB hashmap memory context

Closes #3806

See merge request isc-projects/bind9!7447
2023-01-30 11:37:34 +00:00