Commit graph

36650 commits

Author SHA1 Message Date
Ondřej Surý
2adaa53619
Handle canceled read during sending data over stats channel
An assertion failure would be triggered when the TCP connection
is canceled during sending the data back to the client.

Don't require the state to be `RECV` on non successful read to
gracefully handle canceled TCP connection during the SEND state of the
HTTPD channel.

(cherry picked from commit 6562227cc8)
2022-09-15 10:58:09 +02:00
Petr Špaček
5e51ccf9b6 Merge branch 'pspacek/log-no-recursion-reason-v9_18' into 'v9_18'
Log reasons why ACL denied recursion or cache peek [v9_18]

See merge request isc-projects/bind9!6775
2022-09-15 08:08:23 +00:00
Evan Hunt
4bf1dcc96a
Add tests for the new log messages with refusal reason
Update the allow-query test to check for the new log messages.

(cherry picked from commit a2bbe578bf)
2022-09-15 09:41:32 +02:00
Petr Špaček
d1d1bc67bd
CHANGES note for [GL !6669]
(cherry picked from commit 67c3a3439b)
2022-09-15 09:41:31 +02:00
Petr Špaček
c095ac9ad1
Log reason why cache peek is not available
Log which ACL caused RD=0 query into cache to be refused.
Expected performance impact is negligible.

(cherry picked from commit fdf7456643)
2022-09-15 09:41:01 +02:00
Petr Špaček
e067d11396
Log reason why recursion is not available
Log which ACL caused RA=0 condition.
Expected performance impact is negligible.

(cherry picked from commit 95fc05c454)
2022-09-15 09:40:57 +02:00
Evan Hunt
c8ac45057b Merge branch '3399-random-device-obsolete' into 'v9_18'
flag "random-device" as obsolete

See merge request isc-projects/bind9!6768
2022-09-14 16:49:41 +00:00
Evan Hunt
90117edc49 CHANGES for [GL #3399] 2022-09-14 09:37:25 -07:00
Evan Hunt
17da7dee5c flag "random-device" as obsolete
the "random-device" option was made non-functional in 9.13, but was
not marked as obsolete at that time. this is now fixed; configuring
"random-device" will trigger a warning.
2022-09-14 09:37:25 -07:00
Tony Finch
0ffef8ceba Merge branch '3519-macos-tests-v9_18' into 'v9_18'
The system tests are using another IP address

See merge request isc-projects/bind9!6772
2022-09-14 12:06:28 +00:00
Tony Finch
1c6627f6e3 Skip the xfer test when Net::DNS is too old
This allows the system tests to run to completion on macOS
without requiring extra modules from CPAN.

(cherry picked from commit d8053785b0)
2022-09-14 11:49:43 +01:00
Tony Finch
de747f9b6b The system tests are using another IP address
Reduce the number of places that know about the number of IP addresses
required by the system tests, by changing `testsock.pl` to read the
`max` from `ifconfig.sh.in`. This should make the test runner fail
early with a clear message when the interfaces have been set up by an
obsolete script.

Add comments to cross-reference `ifconfig.sh.in`, `testsock.pl`, and
`org.isc.bind.system` to make it easier to remember what needs
updating when an IP address is added.

(cherry picked from commit 258a896a0c)
2022-09-14 11:49:43 +01:00
Evan Hunt
db830aa8aa Merge branch '3520-rndc-detach' into 'v9_18'
fix a possible use-after-detach bug in rndc

See merge request isc-projects/bind9!6724
2022-09-12 21:25:59 +00:00
Evan Hunt
7513aeead8 fix a possible use-after-detach bug in rndc
we need to detach the rndc task when calling isc_app_shutdown(),
otherwise it may be detached before the last reference to it.
while this does not prevent rndc from working, it causes a spurious
core dump on shutdown.
2022-09-12 14:03:05 -07:00
Evan Hunt
4252ee5c5f Merge branch '3520-rndc-shutdown-hang-v9_18' into 'v9_18'
prevent a possible shutdown hang in rndc

See merge request isc-projects/bind9!6764
2022-09-12 21:02:36 +00:00
Evan Hunt
9e0af151e9 prevent a possible shutdown hang in rndc
In rndc_recvdone(), if 'sends' was not 0, then 'recvs' was not
decremented, in which case isc_loopmgr_shutdown() was never reached,
which could cause a hang. (This has not been observed to happen, but
the code was incorrect on examination.)

(cherry picked from commit 9683439d73)
2022-09-12 13:34:58 -07:00
Tony Finch
de40d702b0 Merge branch '3531-initialize-struct-server-v9_18' into 'v9_18'
Ensure that named_server_t is properly initialized

See merge request isc-projects/bind9!6762
2022-09-12 11:21:57 +00:00
Tony Finch
0470a4f521 Ensure that named_server_t is properly initialized
There was a ubsan error reporting an invalid value for interface_auto
(a boolean value cannot be 190) because it was not initialized. To
avoid this problem happening again, ensure the whole of the server
structure is initialized to zero before setting the (relatively few)
non-zero elements.
2022-09-12 11:26:33 +01:00
Michał Kępień
f2fc2cef60 Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.18.8' into 'v9_18'
Set up version and release notes for BIND 9.18.8

See merge request isc-projects/bind9!6759
2022-09-09 18:23:11 +00:00
Michał Kępień
6081ba7604 Set up release notes for BIND 9.18.8 2022-09-09 19:58:46 +02:00
Michał Kępień
7cea6c4211 Update BIND version to 9.18.8-dev 2022-09-09 19:58:46 +02:00
Michał Kępień
7e27db0023 Merge branch '3459-rrl-wildcard-handling-v9_18' into 'v9_18'
[v9_18] Make RRL code treat all QNAMEs subject to wildcard processing within a given zone as the same name

See merge request isc-projects/bind9!6748
2022-09-08 08:14:29 +00:00
Aram Sargsyan
bcf0f951e0 Add CHANGES and release notes for [GL #3459]
(cherry picked from commit 0b0cf12741)
2022-09-08 09:36:50 +02:00
Aram Sargsyan
f2982a5d3f Document RRL processing for wildcard names
All valid wildcard domain names are interpreted as the zone's origin
name concatenated to the "*" name.

(cherry picked from commit 89c2032421)
2022-09-08 09:36:50 +02:00
Aram Sargsyan
35e37505f0 Fix RRL responses-per-second bypass using wildcard names
It is possible to bypass Response Rate Limiting (RRL)
`responses-per-second` limitation using specially crafted wildcard
names, because the current implementation, when encountering a found
DNS name generated from a wildcard record, just strips the leftmost
label of the name before making a key for the bucket.

While that technique helps with limiting random requests like
<random>.example.com (because all those requests will be accounted
as belonging to a bucket constructed from "example.com" name), it does
not help with random names like subdomain.<random>.example.com.

The best solution would have been to strip not just the leftmost
label, but as many labels as necessary until reaching the suffix part
of the wildcard record from which the found name is generated, however,
we do not have that information readily available in the context of RRL
processing code.

Fix the issue by interpreting all valid wildcard domain names as
the zone's origin name concatenated to the "*" name, so they all will
be put into the same bucket.

(cherry picked from commit baa9698c9d)
2022-09-08 09:36:50 +02:00
Matthijs Mekking
fe162c74c1 Merge branch 'matthijs-fix-intermittent-inline-system-test-failure-v9_18' into 'v9_18'
[v9_18]  Fix intermittent inline system test failure

See merge request isc-projects/bind9!6739
2022-09-07 15:12:22 +00:00
Matthijs Mekking
d1315d1bc4 Update inline system test, zone 'retransfer3.'
The zone 'retransfer3.' tests whether zones that 'rndc signing
-nsec3param' requests are queued even if the zone is not loaded.

The test assumes that if 'rndc signing -list' shows that the zone is
done signing with two keys, and there are no NSEC3 chains pending, the
zone is done handling the '-nsec3param' queued requests. However, it
is possible that the 'rndc signing -list' command is received before
the corresponding privatetype records are added to the zone (the records
that are used to retrieve the signing status with 'rndc signing').

This is what happens in test failure
https://gitlab.isc.org/isc-projects/bind9/-/jobs/2722752.

The 'rndc signing -list retransfer3' is thus an unreliable check.
It is simpler to just remove the check and wait for a certain amount
of time and check whether ns3 has re-signed the zone using NSEC3.

(cherry picked from commit 8b71cbd09c)
2022-09-07 16:26:12 +02:00
Evan Hunt
d245253eb8 Merge branch 'each-interface-magic-v9_18' into 'v9_18'
when creating an interface, set magic before linking

See merge request isc-projects/bind9!6736
2022-09-07 06:14:56 +00:00
Evan Hunt
acfca3f4fa when creating an interface, set magic before linking
set the magic number in a newly-created interface object
before appending it to mgr->interfaces in order to prevent
a possible assertion.

(cherry picked from commit 8c01662048)
2022-09-06 21:48:28 -07:00
Arаm Sаrgsyаn
5c44aad640 Merge branch '3518-libxml2-deprecated-functions-v9_18' into 'v9_18'
[v9_18] Do not use libxml2 deprecated functions

See merge request isc-projects/bind9!6731
2022-09-06 10:03:31 +00:00
Aram Sargsyan
93c39696f4 Add CHANGES note for [GL #3518]
(cherry picked from commit 87920661b1)
2022-09-06 09:21:02 +00:00
Aram Sargsyan
97197ef78e Do not use libxml2 deprecated functions
The usage of xmlInitThreads() and xmlCleanupThreads() functions in
libxml2 is now marked as deprecated, and these functions will be made
private in the future.

Use xmlInitParser() and xmlCleanupParser() instead of them.

(cherry picked from commit a5d412d924)
2022-09-06 09:20:55 +00:00
Matthijs Mekking
7be0594be9 Merge branch '3381-dnssec-policy-explicit-inline-signing-v9_18' into 'v9_18'
[v9_18] dnssec-policy now requires inline-signing

See merge request isc-projects/bind9!6729
2022-09-06 08:48:46 +00:00
Matthijs Mekking
b232fabe89 Add change and release note for #3381
Because folks want to know.

(cherry picked from commit 2b95c11905a1a5faff9efa97a4f2498aadfa467b)
2022-09-06 09:55:06 +02:00
Matthijs Mekking
5c4c32114f Remove implicit inline-signing code
Remove the code that sets implicit inline-signing on zones using
dnssec-policy.

(cherry picked from commit a6b09c9c69186e81a9be54e8b7bb413b1ac4d650)
2022-09-06 09:55:06 +02:00
Matthijs Mekking
c6e2d7d54d Update system tests
Update checkconf and kasp related system tests after requiring
inline-signing.

(cherry picked from commit 8fd75e8a4e1035ce0e81bf47d954a3f5b8a4d571)
2022-09-06 09:55:06 +02:00
Matthijs Mekking
d7175c41a7 dnssec-policy now requires inline-signing
Having implicit inline-signing set for dnssec-policy when there is no
update policy is confusing, so lets make this explicit.

(cherry picked from commit 5ca02fe6e7e591d1fb85936ea4dda720c3d741ef)
2022-09-06 09:02:59 +02:00
Ondřej Surý
a6b6a1c9dd Merge branch '3485-dig-fallback-to-idna2003-v9_18' into 'v9_18'
Allow fallback to IDNA2003 processing

See merge request isc-projects/bind9!6725
2022-09-05 09:43:43 +00:00
Ondřej Surý
05499232a7
Add CHANGES and release note for [GL #3485]
(cherry picked from commit 0fe7acb4e6)
2022-09-05 10:21:28 +02:00
Ondřej Surý
a22b0bebc2
Enable the IDNA2003 domain names in the idna system test
Allow the IDNA2003 tests to succeed after the fallback to IDNA2003 was
implemented.

(cherry picked from commit 87de726f5c)
2022-09-05 10:21:28 +02:00
Ondřej Surý
abc0382738
Allow fallback to IDNA2003 processing
In several cases where IDNA2008 mappings do not exist whereas IDNA2003
mappings do, dig was failing to process the suplied domain name.  Take a
backwards compatible approach, and convert the domain to IDNA2008 form,
and if that fails try the IDNA2003 conversion.

(cherry picked from commit 10923f9d87)
2022-09-05 10:21:28 +02:00
Arаm Sаrgsyаn
bf70a66ed8 Merge branch '3515-mctx-attach-detach-for-isc_mempool_t-v9_18' into 'v9_18'
[v9_18] Add mctx attach/detach when creating/destroying a memory pool

See merge request isc-projects/bind9!6720
2022-09-02 09:03:31 +00:00
Aram Sargsyan
1017083de7 Add CHANGES note for [GL #3515]
(cherry picked from commit 362ead8d85)
2022-09-02 08:17:54 +00:00
Aram Sargsyan
982b491d7c Add mctx attach/detach when creating/destroying a memory pool
This should make sure that the memory context is not destroyed
before the memory pool, which is using the context.

(cherry picked from commit e97c3eea95)
2022-09-02 08:17:47 +00:00
Evan Hunt
19b98dc74f Merge branch '3511-quote-yaml-addresses-v9_18' into 'v9_18'
quote addresses in YAML output

See merge request isc-projects/bind9!6717
2022-08-31 23:39:50 +00:00
Evan Hunt
3ea267f29d CHANGES for [GL #3511]
(cherry picked from commit f72bf1375a)
2022-08-31 16:17:56 -07:00
Evan Hunt
3304c694c8 quote addresses in YAML output
YAML strings should be quoted if they contain colon characters.
Since IPv6 addresses do, we now quote the query_address and
response_address strings in all YAML output.

(cherry picked from commit 66eaf6bb73)
2022-08-31 16:17:56 -07:00
Evan Hunt
d84cff6d4b Merge branch '3501-dnstap-response-v9_18' into 'v9_18'
dnstap query_message field was erroneously set with responses

See merge request isc-projects/bind9!6715
2022-08-31 22:44:41 +00:00
Evan Hunt
07b3cbbba1 CHANGES for [GL #3501]
(cherry picked from commit fea9751f13)
2022-08-31 15:24:23 -07:00
Evan Hunt
7bb503ca75 dnstap query_message field was erroneously set with responses
The dnstap query_message field was in some cases being filled in
with response messages, along with the response_message field.
The query_message field should only be used when logging requests,
and the response_message field only when logging responses.

(cherry picked from commit 3ccfff8ab6)
2022-08-31 15:24:00 -07:00