Commit Graph

40076 Commits

Author SHA1 Message Date
Michal Nowak
cddd9dcb53 Merge branch '4152-reproducer-stack-exhaustion' into 'main'
Add test for CVE-2023-3341

See merge request isc-projects/bind9!8410
2023-10-20 14:23:20 +00:00
Michal Nowak
7d1834b250 Add test for CVE-2023-3341 2023-10-20 15:42:10 +02:00
Mark Andrews
45f088fea7 Merge branch '4372-assertion-failure-in-dispatch-c' into 'main'
Resolve "Assertion failure in dispatch.c"

Closes #4372

See merge request isc-projects/bind9!8397
2023-10-20 09:26:07 +00:00
Mark Andrews
c00c1e9a72 Add CHANGES note for [GL #4372] 2023-10-20 18:16:51 +11:00
Mark Andrews
84fd3e3808 Test xfrin's handing of EDNS failure scenarios
We test EDNS requests returning FORMERR where named is expected
to retry without EDNS.

We test EDNS requests returning NOTIMP where named is expected
to fail the transfer as the remote end is not protocol compliant.
2023-10-20 18:16:25 +11:00
Evan Hunt
aacea440c3 handle pre-existing disp/dispentry when retrying
when xfrin_start() is called to retry a transfer, close the existing
dispatch entry and reuse the existing dispatch.
2023-10-20 18:16:25 +11:00
Mark Andrews
a99adb9efa Test NOTIMP being returned to an IXFR request in xfrin
The server is expected to retry the transfer using SOA and if
the returned serial is greater than the current serial AXFR.

Check the log that IXFR is request.
2023-10-20 18:16:25 +11:00
Mark Andrews
30e182ea56 Merge branch '4101-update-b-root-server-net-addresses' into 'main'
Resolve "Update b.root-server.net addresses"

Closes #4101

See merge request isc-projects/bind9!8371
2023-10-20 03:44:36 +00:00
Mark Andrews
c7a06b1fa1 Add release note for [GL #4101] 2023-10-20 14:06:25 +11:00
Mark Andrews
b9bba29c5e Add CHANGES note for [GL #4101] 2023-10-20 14:06:24 +11:00
Mark Andrews
b69100b747 Suppress reporting upcoming changes in root hints
To reduce the amount of log spam when root servers change their
addresses keep a table of upcoming changes by expected date and time
and suppress reporting differences for them until then.

Add initial entry for B.ROOT-SERVERS.NET, Nov 27, 2023.
2023-10-20 14:05:56 +11:00
Mark Andrews
2ca2f7e985 Update b.root-servers.net IP addresses
This covers both root hints and the default primaries for the root
zone mirror.  The official change date is Nov 27, 2023.
2023-10-20 14:05:56 +11:00
Ondřej Surý
2728b8100c Merge branch '4367-offload-ixfr-processing' into 'main'
Offload AXFR and IXFR processing

Closes #4367

See merge request isc-projects/bind9!8399
2023-10-19 13:40:09 +00:00
Ondřej Surý
ec41e8c763 Add CHANGES and release note for [GL #4367] 2023-10-19 14:57:25 +02:00
Ondřej Surý
3737ea592b Offload AXFR and IXFR processing
Instead of processing received data synchronously, store the incoming
differences in the list and process them asynchronously when we need to
commit the data into the database and/or journal.
2023-10-19 14:57:25 +02:00
Ondřej Surý
e5c79261c0 Remove all locking from XFR
Instead of locking the struct dns_xfrin members that get accessed from
the statistics, convert those into atomic types and use atomic accesses
to prevent ThreadSanitizer from blowing up.

In fact, even the atomic operations are not really needed here, because
all writes are done from a single thread and we don't really require
consistency from the statistics.  It's easier to use atomics here, but
it is slightly confusing as it suggests there might be multithreaded
accesses to those variables while in fact, the only off-thread access
happens when collecting the statistics.
2023-10-19 14:57:25 +02:00
Ondřej Surý
109dc883e7 Cleanup wrong whitespace in dns/diff.h 2023-10-19 14:57:25 +02:00
Ondřej Surý
e3892805d6 Remove the logic that applies differences when over limit
The ixfr_putdata() and axfr_putdata() had a logic to apply dns_diff when
the number of pending tuples went over 100.  Since we are going to
offload the XFR data processing, we don't need to do that anymore.
2023-10-19 14:57:25 +02:00
Ondřej Surý
8a590d1605 Cleanup the FAIL() macro in the dns_xfrin
The FAIL() macro was just setting the result and jumping to failure,
unobfuscate the code by removing the macro.
2023-10-19 14:57:25 +02:00
Ondřej Surý
d233fc1730 Merge branch 'ondrej/disable-memory-context-for-OpenSSL-1.x' into 'main'
Disable OpenSSL memory contexts for OpenSSL < 3.0.0

See merge request isc-projects/bind9!8402
2023-10-19 12:56:39 +00:00
Ondřej Surý
74f9f5f821 Disable OpenSSL memory contexts for OpenSSL < 3.0.0
OpenSSL 1.1 has already reached end-of-life and since we are
experiencing a weird memory leak in the mirror system test on just
Ubuntu 20.04 (Focal) with OpenSSL 1.1, we disable the legacy code for
enabling memory contexts for OpenSSL < 3.0.0 in this commit.
2023-10-19 12:54:40 +02:00
Arаm Sаrgsyаn
d0a03db850 Merge branch '4375-qp_test-fix' into 'main'
Fix an error in the qp_test.c unit test

Closes #4375

See merge request isc-projects/bind9!8401
2023-10-19 09:30:59 +00:00
Aram Sargsyan
b535843bb7 Fix an error in the qp_test.c unit test
In order to check whether there are enough inserted values the
code uses the 'tests' variable (loop counter), which is unreliable,
because the loop sometimes removes an item instead of inserting
one (when the randomly generated item already exists).

Instead of the loop counter, use the existing variable 'inserted',
which should indicate the correct number of the inserted items.
2023-10-19 08:46:58 +00:00
Mark Andrews
671e524aef Merge branch '4260-adjust-udp-refresh-timeouts' into 'main'
Adjust UDP zone maintenance timeouts

Closes #4260

See merge request isc-projects/bind9!8205
2023-10-18 06:07:32 +00:00
Mark Andrews
1a9791b4d8 add CHANGES for [GL #4260] 2023-10-18 13:07:24 +11:00
Mark Andrews
29f399797d Adjust UDP timeouts used in zone maintenance
Drop timeout before resending a UDP request from 15 seconds to 5
seconds and add 1 second to the total time to allow for the reply
to the third request to arrive.  This will speed up the time it
takes for named to recover from a lost packet when refreshing a
zone and for it to determine that a primary is down.
2023-10-18 13:06:28 +11:00
Michal Nowak
85ee12f60e Merge branch 'mnowak/llvm-17' into 'main'
Update clang to version 17

See merge request isc-projects/bind9!8366
2023-10-17 15:55:09 +00:00
Michal Nowak
dd234c60fe Update the source code formatting using clang-format-17 2023-10-17 17:47:46 +02:00
Michal Nowak
625a4ffc7a Update clang to version 17 2023-10-17 17:47:46 +02:00
Matthijs Mekking
591d7c32d1 Merge branch '4349-document-inline-signing-defaults' into 'main'
Resolve "Document the complex defaults of inline-signing"

Closes #4349

See merge request isc-projects/bind9!8372
2023-10-17 09:26:09 +00:00
Matthijs Mekking
a97e088ec5 Add release note and CHANGES for #4349 2023-10-17 10:52:43 +02:00
Matthijs Mekking
ca6171b2f5 Update addzone test
Now that inline-signing is ignored when there is no dnssec-policy,
add 'dnssec-policy default;' to the zones when attempting to add them
via 'rndc addzone'.
2023-10-17 10:52:43 +02:00
Matthijs Mekking
0512ca0ad8 Update inline-signing documentation
Add the missing documentation for 'dnssec-policy/inline-signing'.
Update the zone-only option 'inline-signing' to indicate that the
use of inline signing should be set in 'dnssec-policy' and that this
is merely a way to override the value for the given zone.

(cherry picked from commit 2b7381950d17fe4d289959e5f76f020cc462200a)
2023-10-17 10:52:43 +02:00
Matthijs Mekking
e6a454ad12 Ignore inline-signing by default
Ignore the option 'inline-signing' unless there is a 'dnssec-policy'
configured for the zone. Having inline signing enabled while the zone
is not DNSSEC signed does not make sense.

If there is a 'dnssec-policy' the 'inline-signing' zone-only option
can be used to override the value for the given zone.
2023-10-17 10:52:36 +02:00
Mark Andrews
0d58ce93e5 Merge branch '4365-update-dangerfile-py-to-know-about-cve' into 'main'
Resolve "Update dangerfile.py to know about `:cve:`"

Closes #4365

See merge request isc-projects/bind9!8387
2023-10-17 01:58:06 +00:00
Mark Andrews
dbc2167325 Update dangerfile.py to know about ':cve:' 2023-10-17 01:05:46 +00:00
Matthijs Mekking
86915a1f40 Merge branch 'matthijs-kasp-system-test-nit-fixes' into 'main'
Two minor fixes in the kasp system test

See merge request isc-projects/bind9!8389
2023-10-16 10:33:05 +00:00
Matthijs Mekking
21d04f556d Two minor fixes in the kasp system test
The 'dynamic-signed-inline-signing.kasp' zone was set up with
the environment variable 'ksktimes', but that should be 'csktimes'
which is set one line above. Since the values are currently the same
the behavior is identical, but of course it should use the correct
variable.

The 'step4.enable-dnssec.autosign' zone was set up twice. This is
unnecessary.
2023-10-16 11:08:59 +02:00
Matthijs Mekking
65d97a54ef Merge branch '4350-resign-triggered-on-raw-dnssec-zone' into 'main'
Don't schedule resign for raw version of an inline-signing zone

Closes #4350

See merge request isc-projects/bind9!8385
2023-10-16 08:21:25 +00:00
Matthijs Mekking
a8306b541b Add changes and release note for #4350 2023-10-16 09:26:56 +02:00
Matthijs Mekking
741ce2d07a Don't resign raw version of the zone
Update the function 'set_resigntime()' so that raw versions of
inline-signing zones are not scheduled to be resigned.

Also update the check in the same function for zone is dynamic, there
exists a function 'dns_zone_isdynamic()' that does a similar thing
and is more complete.

Also in 'zone_postload()' check whether the zone is not the raw
version of an inline-signing zone, preventing calculating the next
resign time.
2023-10-16 09:26:56 +02:00
Matthijs Mekking
c90b622648 Add test case for GL #4350
Add a test scenario for a dynamic zone that uses inline-signing which
accidentally has signed the raw version of the zone.

This should not trigger resign scheduling on the raw version of the
zone.
2023-10-16 09:26:56 +02:00
Ondřej Surý
7a3ba34475 Merge branch 'ondrej/convert-dns_acl-rwlock-to-rcu' into 'main'
Convert rwlock in dns_acl to RCU

See merge request isc-projects/bind9!8378
2023-10-13 12:44:53 +00:00
Ondřej Surý
96bbf95b83 Convert rwlock in dns_acl to RCU
The dns_aclenv_t contains two dns_acl_t - localhost and localnets that
can be swapped with a different ACLs as we configure BIND 9.  Instead of
protecting those two pointers with heavyweight read-write lock, use RCU
mechanism to dereference and swap the pointers.
2023-10-13 14:44:40 +02:00
Ondřej Surý
546c327349 Convert manual dns_{acl,aclenv}_{attach,detach} to ISC_REFCOUNT_IMPL
Instead of having a manual set of functions, use ISC_REFCOUNT_IMPL macro
to implement the attach, detach, ref and unref functions.
2023-10-13 14:44:40 +02:00
Ondřej Surý
b3a8f0048f Refactor dns_{acl,aclenv}_create to return void
The dns_{acl,aclenv}_create() can't fail, so change it to return void.
2023-10-13 14:44:40 +02:00
Ondřej Surý
f5b0bd9b1b Convert manual dns_iptable_{attach,detach} to ISC_REFCOUNT_IMPL
Instead of having a manual set of functions, use ISC_REFCOUNT_IMPL macro
to implement the attach, detach, ref and unref functions.
2023-10-13 14:44:40 +02:00
Ondřej Surý
613ada72b6 Refactor dns_iptable_create() to return void
The dns_iptable_create() cannot fail now, so change it to return void.
2023-10-13 14:44:40 +02:00
Ondřej Surý
d46d51be78 Refactor isc_radix_create to return void
The isc_radix_create() can't fail, so change it to return void.
2023-10-13 14:44:40 +02:00
Arаm Sаrgsyаn
b54498abf6 Merge branch '4360-fix-undefined-behaviours-detected-by-llvm-17' into 'main'
Resolve "Undefined behaviours detected by LLVM 17 (noop_accept_cb, dns__nta_shutdown_cb)"

Closes #4360

See merge request isc-projects/bind9!8376
2023-10-13 11:15:02 +00:00