]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 years agoMerge branch '3525-key-id-clashes-across-algorithms-cause-problems-with-statistics...
Mark Andrews [Thu, 15 Sep 2022 23:42:39 +0000 (23:42 +0000)] 
Merge branch '3525-key-id-clashes-across-algorithms-cause-problems-with-statistics-v9_18' into 'v9_18'

Resolve "key id clashes across algorithms cause problems with statistics" [v9_18]

See merge request isc-projects/bind9!6746

3 years agoSuppress manykeys test on duplicate key ids
Mark Andrews [Thu, 8 Sep 2022 00:35:31 +0000 (10:35 +1000)] 
Suppress manykeys test on duplicate key ids

If there are duplicate key ids across multiple algorithms expected
output is no met.  We have fixed this in on main but decided to not
back port the fix as it will change the statistics channel output.

This change detects when there are duplicate key id across algorithms
as skips the sub test.

3 years agoMerge branch '3522-update-detach-v9_18' into 'v9_18'
Evan Hunt [Thu, 15 Sep 2022 18:53:30 +0000 (18:53 +0000)] 
Merge branch '3522-update-detach-v9_18' into 'v9_18'

fix an incorrect detach in update processing

See merge request isc-projects/bind9!6782

3 years agoCHANGES for [GL #3522]
Evan Hunt [Fri, 2 Sep 2022 21:47:12 +0000 (14:47 -0700)] 
CHANGES for [GL #3522]

(cherry picked from commit fdc35928ebc6e4373196d8956becd068cb019151)

3 years agofix an incorrect detach in update processing
Evan Hunt [Fri, 2 Sep 2022 21:44:58 +0000 (14:44 -0700)] 
fix an incorrect detach in update processing

when processing UDPATE requests, hold the request handle until
we either drop the request or respond to it.

(cherry picked from commit 00e0758e1218f82fd1fe995c161ce4243bbbbb89)

3 years agoMerge branch '3427-tcp-system-test-bump-socket.create_connection-timeout-v9_18' into...
Michal Nowak [Thu, 15 Sep 2022 10:46:58 +0000 (10:46 +0000)] 
Merge branch '3427-tcp-system-test-bump-socket.create_connection-timeout-v9_18' into 'v9_18'

[v9_18] Bump socket.create_connection() timeout to 10 seconds

See merge request isc-projects/bind9!6780

3 years agoBump socket.create_connection() timeout to 10 seconds
Michal Nowak [Fri, 9 Sep 2022 14:41:00 +0000 (16:41 +0200)] 
Bump socket.create_connection() timeout to 10 seconds

The tcp Pytest on OpenBSD fairly reliably fails when receive_tcp()
on a socket is attempted:

    >           (response, rtime) = dns.query.receive_tcp(sock, timeout())

    tests-tcp.py:50:
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    /usr/local/lib/python3.9/site-packages/dns/query.py:659: in receive_tcp
        ldata = _net_read(sock, 2, expiration)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    sock = <socket.socket [closed] fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>
    count = 2, expiration = 1662719959.8106785

        def _net_read(sock, count, expiration):
            """Read the specified number of bytes from sock.  Keep trying until we
            either get the desired amount, or we hit EOF.
            A Timeout exception will be raised if the operation is not completed
            by the expiration time.
            """
            s = b''
            while count > 0:
                try:
    >               n = sock.recv(count)
    E               socket.timeout: timed out

This is because the socket is already closed.

Bump the socket connection timeout to 10 seconds.

(cherry picked from commit 658cae9fad87284a09b6170135a87c5510e019ae)

3 years agoMerge branch '3542-gracefuly-handle-cancelled-http-read-during-sending-v9_18' into...
Ondřej Surý [Thu, 15 Sep 2022 09:49:10 +0000 (09:49 +0000)] 
Merge branch '3542-gracefuly-handle-cancelled-http-read-during-sending-v9_18' into 'v9_18'

Handle canceled read during sending data over stats channel

See merge request isc-projects/bind9!6779

3 years agoAdd CHANGES and release note for [GL #3542]
Ondřej Surý [Fri, 9 Sep 2022 08:48:13 +0000 (10:48 +0200)] 
Add CHANGES and release note for [GL #3542]

(cherry picked from commit e29563173bf931830d0a2eba0d0aaebfadbfad8e)

3 years agoProvide stronger wording about the security of statistics channel
Ondřej Surý [Wed, 14 Sep 2022 12:18:32 +0000 (14:18 +0200)] 
Provide stronger wording about the security of statistics channel

Add more text about the importance of properly securing the statistics
channel and what is and what is not considered a security vulnerability.

(cherry picked from commit 6869c98d369270e4efbc3ffa0cd21526b32907de)

3 years agoHandle canceled read during sending data over stats channel
Ondřej Surý [Thu, 8 Sep 2022 16:24:57 +0000 (18:24 +0200)] 
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 6562227cc8a0732002c01cfc045129bf6080b94c)

3 years agoMerge branch 'pspacek/log-no-recursion-reason-v9_18' into 'v9_18'
Petr Špaček [Thu, 15 Sep 2022 08:08:23 +0000 (08:08 +0000)] 
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

3 years agoAdd tests for the new log messages with refusal reason
Evan Hunt [Wed, 14 Sep 2022 19:49:20 +0000 (12:49 -0700)] 
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 a2bbe578bf9f1c0a8726a50baca4f6ee38a5565b)

3 years agoCHANGES note for [GL !6669]
Petr Špaček [Wed, 14 Sep 2022 10:32:41 +0000 (12:32 +0200)] 
CHANGES note for [GL !6669]

(cherry picked from commit 67c3a3439bddf25b72793b04aeb2e0618c8c9be7)

3 years agoLog reason why cache peek is not available
Petr Špaček [Fri, 5 Aug 2022 13:21:35 +0000 (15:21 +0200)] 
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 fdf74566432a67761bf940224e6145ea435f5edf)

3 years agoLog reason why recursion is not available
Petr Špaček [Fri, 5 Aug 2022 12:03:30 +0000 (14:03 +0200)] 
Log reason why recursion is not available

Log which ACL caused RA=0 condition.
Expected performance impact is negligible.

(cherry picked from commit 95fc05c45468d023f302dc0d1ea8ab1a2f1d1c84)

3 years agoMerge branch '3399-random-device-obsolete' into 'v9_18'
Evan Hunt [Wed, 14 Sep 2022 16:49:41 +0000 (16:49 +0000)] 
Merge branch '3399-random-device-obsolete' into 'v9_18'

flag "random-device" as obsolete

See merge request isc-projects/bind9!6768

3 years agoCHANGES for [GL #3399]
Evan Hunt [Wed, 14 Sep 2022 01:17:55 +0000 (18:17 -0700)] 
CHANGES for [GL #3399]

3 years agoflag "random-device" as obsolete
Evan Hunt [Wed, 14 Sep 2022 01:29:20 +0000 (18:29 -0700)] 
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.

3 years agoMerge branch '3519-macos-tests-v9_18' into 'v9_18'
Tony Finch [Wed, 14 Sep 2022 12:06:28 +0000 (12:06 +0000)] 
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

3 years agoSkip the xfer test when Net::DNS is too old
Tony Finch [Thu, 1 Sep 2022 11:08:52 +0000 (12:08 +0100)] 
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 d8053785b0d60c158b14f1ddda3b6ef608abc541)

3 years agoThe system tests are using another IP address
Tony Finch [Wed, 31 Aug 2022 20:09:06 +0000 (21:09 +0100)] 
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 258a896a0cf9b26be64f80c3b9fba7b0d5d43f50)

3 years agoMerge branch '3520-rndc-detach' into 'v9_18'
Evan Hunt [Mon, 12 Sep 2022 21:25:59 +0000 (21:25 +0000)] 
Merge branch '3520-rndc-detach' into 'v9_18'

fix a possible use-after-detach bug in rndc

See merge request isc-projects/bind9!6724

3 years agofix a possible use-after-detach bug in rndc
Evan Hunt [Fri, 2 Sep 2022 23:20:33 +0000 (16:20 -0700)] 
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.

3 years agoMerge branch '3520-rndc-shutdown-hang-v9_18' into 'v9_18'
Evan Hunt [Mon, 12 Sep 2022 21:02:36 +0000 (21:02 +0000)] 
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

3 years agoprevent a possible shutdown hang in rndc
Evan Hunt [Tue, 6 Sep 2022 21:13:23 +0000 (14:13 -0700)] 
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 9683439d7399e1e525853c42f7cc337b3081405e)

3 years agoMerge branch '3531-initialize-struct-server-v9_18' into 'v9_18'
Tony Finch [Mon, 12 Sep 2022 11:21:57 +0000 (11:21 +0000)] 
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

3 years agoEnsure that named_server_t is properly initialized
Tony Finch [Fri, 9 Sep 2022 07:21:10 +0000 (08:21 +0100)] 
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.

3 years agoMerge branch 'michal/set-up-version-and-release-notes-for-bind-9.18.8' into 'v9_18'
Michał Kępień [Fri, 9 Sep 2022 18:23:11 +0000 (18:23 +0000)] 
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

3 years agoSet up release notes for BIND 9.18.8
Michał Kępień [Fri, 9 Sep 2022 17:58:46 +0000 (19:58 +0200)] 
Set up release notes for BIND 9.18.8

3 years agoUpdate BIND version to 9.18.8-dev
Michał Kępień [Fri, 9 Sep 2022 17:58:46 +0000 (19:58 +0200)] 
Update BIND version to 9.18.8-dev

3 years agoMerge branch '3459-rrl-wildcard-handling-v9_18' into 'v9_18'
Michał Kępień [Thu, 8 Sep 2022 08:14:29 +0000 (08:14 +0000)] 
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

3 years agoAdd CHANGES and release notes for [GL #3459]
Aram Sargsyan [Mon, 25 Jul 2022 14:59:41 +0000 (14:59 +0000)] 
Add CHANGES and release notes for [GL #3459]

(cherry picked from commit 0b0cf12741f4d975328c1e4fe95ee1bbc4af46ba)

3 years agoDocument RRL processing for wildcard names
Aram Sargsyan [Mon, 25 Jul 2022 14:13:28 +0000 (14:13 +0000)] 
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 89c2032421e6d64dbf1655dccce7faccad9eaf87)

3 years agoFix RRL responses-per-second bypass using wildcard names
Aram Sargsyan [Mon, 25 Jul 2022 13:55:03 +0000 (13:55 +0000)] 
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 baa9698c9d4bed741cdff14a07f1c71c81b21908)

3 years agoMerge branch 'matthijs-fix-intermittent-inline-system-test-failure-v9_18' into 'v9_18'
Matthijs Mekking [Wed, 7 Sep 2022 15:12:22 +0000 (15:12 +0000)] 
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

3 years agoUpdate inline system test, zone 'retransfer3.'
Matthijs Mekking [Tue, 30 Aug 2022 08:04:16 +0000 (10:04 +0200)] 
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 8b71cbd09c33209ff55fc38fa1ea5b01fb7e0cc2)

3 years agoMerge branch 'each-interface-magic-v9_18' into 'v9_18'
Evan Hunt [Wed, 7 Sep 2022 06:14:56 +0000 (06:14 +0000)] 
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

3 years agowhen creating an interface, set magic before linking
Evan Hunt [Wed, 7 Sep 2022 00:12:14 +0000 (17:12 -0700)] 
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 8c01662048bbdb36c671c210183d7eecedd69e05)

3 years agoMerge branch '3518-libxml2-deprecated-functions-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Tue, 6 Sep 2022 10:03:31 +0000 (10:03 +0000)] 
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

3 years agoAdd CHANGES note for [GL #3518]
Aram Sargsyan [Mon, 5 Sep 2022 10:01:33 +0000 (10:01 +0000)] 
Add CHANGES note for [GL #3518]

(cherry picked from commit 87920661b11a25b4499f30f98ba39d5c47af6e44)

3 years agoDo not use libxml2 deprecated functions
Aram Sargsyan [Mon, 5 Sep 2022 09:59:44 +0000 (09:59 +0000)] 
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 a5d412d9243dc0404a321276364d5967fd69ea3a)

3 years agoMerge branch '3381-dnssec-policy-explicit-inline-signing-v9_18' into 'v9_18'
Matthijs Mekking [Tue, 6 Sep 2022 08:48:46 +0000 (08:48 +0000)] 
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

3 years agoAdd change and release note for #3381
Matthijs Mekking [Tue, 7 Jun 2022 13:44:36 +0000 (15:44 +0200)] 
Add change and release note for #3381

Because folks want to know.

(cherry picked from commit 2b95c11905a1a5faff9efa97a4f2498aadfa467b)

3 years agoRemove implicit inline-signing code
Matthijs Mekking [Tue, 7 Jun 2022 13:35:49 +0000 (15:35 +0200)] 
Remove implicit inline-signing code

Remove the code that sets implicit inline-signing on zones using
dnssec-policy.

(cherry picked from commit a6b09c9c69186e81a9be54e8b7bb413b1ac4d650)

3 years agoUpdate system tests
Matthijs Mekking [Tue, 7 Jun 2022 12:49:16 +0000 (14:49 +0200)] 
Update system tests

Update checkconf and kasp related system tests after requiring
inline-signing.

(cherry picked from commit 8fd75e8a4e1035ce0e81bf47d954a3f5b8a4d571)

3 years agodnssec-policy now requires inline-signing
Matthijs Mekking [Tue, 7 Jun 2022 12:46:05 +0000 (14:46 +0200)] 
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)

3 years agoMerge branch '3485-dig-fallback-to-idna2003-v9_18' into 'v9_18'
Ondřej Surý [Mon, 5 Sep 2022 09:43:43 +0000 (09:43 +0000)] 
Merge branch '3485-dig-fallback-to-idna2003-v9_18' into 'v9_18'

Allow fallback to IDNA2003 processing

See merge request isc-projects/bind9!6725

3 years agoAdd CHANGES and release note for [GL #3485]
Ondřej Surý [Fri, 26 Aug 2022 10:28:10 +0000 (12:28 +0200)] 
Add CHANGES and release note for [GL #3485]

(cherry picked from commit 0fe7acb4e628162e36b24bbe40ac5a4151a05b2a)

3 years agoEnable the IDNA2003 domain names in the idna system test
Ondřej Surý [Fri, 26 Aug 2022 11:10:22 +0000 (13:10 +0200)] 
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 87de726f5ccec7de0f56ad2253624cea6d184ed6)

3 years agoAllow fallback to IDNA2003 processing
Ondřej Surý [Fri, 26 Aug 2022 10:24:07 +0000 (12:24 +0200)] 
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 10923f9d8725c8d776b591f90a5f7e82dbae6752)

3 years agoMerge branch '3515-mctx-attach-detach-for-isc_mempool_t-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Fri, 2 Sep 2022 09:03:31 +0000 (09:03 +0000)] 
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

3 years agoAdd CHANGES note for [GL #3515]
Aram Sargsyan [Wed, 31 Aug 2022 12:35:53 +0000 (12:35 +0000)] 
Add CHANGES note for [GL #3515]

(cherry picked from commit 362ead8d85ade3923aaa0346bf7443c811c22bb7)

3 years agoAdd mctx attach/detach when creating/destroying a memory pool
Aram Sargsyan [Wed, 31 Aug 2022 12:30:38 +0000 (12:30 +0000)] 
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 e97c3eea954e055634b72c21325d2611e960ee94)

3 years agoMerge branch '3511-quote-yaml-addresses-v9_18' into 'v9_18'
Evan Hunt [Wed, 31 Aug 2022 23:39:50 +0000 (23:39 +0000)] 
Merge branch '3511-quote-yaml-addresses-v9_18' into 'v9_18'

quote addresses in YAML output

See merge request isc-projects/bind9!6717

3 years agoCHANGES for [GL #3511]
Evan Hunt [Sat, 27 Aug 2022 01:00:50 +0000 (18:00 -0700)] 
CHANGES for [GL #3511]

(cherry picked from commit f72bf1375a23d5dc0c622f07016186a9d36877f5)

3 years agoquote addresses in YAML output
Evan Hunt [Sat, 27 Aug 2022 00:58:55 +0000 (17:58 -0700)] 
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 66eaf6bb738cd146662f6198f4d720dfb06bb9da)

3 years agoMerge branch '3501-dnstap-response-v9_18' into 'v9_18'
Evan Hunt [Wed, 31 Aug 2022 22:44:41 +0000 (22:44 +0000)] 
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

3 years agoCHANGES for [GL #3501]
Evan Hunt [Fri, 26 Aug 2022 23:01:31 +0000 (16:01 -0700)] 
CHANGES for [GL #3501]

(cherry picked from commit fea9751f1372472ce50cd54a96922628c714b248)

3 years agodnstap query_message field was erroneously set with responses
Evan Hunt [Fri, 26 Aug 2022 22:38:34 +0000 (15:38 -0700)] 
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 3ccfff8ab6bb0d38fa727334d5171221e3c38beb)

3 years agoMerge branch 'aram/rpz-doc-update-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Wed, 31 Aug 2022 08:54:04 +0000 (08:54 +0000)] 
Merge branch 'aram/rpz-doc-update-v9_18' into 'v9_18'

[v9_18] Update RPZ documentation in ARM

See merge request isc-projects/bind9!6709

3 years agoUpdate RPZ documentation
Aram Sargsyan [Fri, 26 Aug 2022 09:20:02 +0000 (09:20 +0000)] 
Update RPZ documentation

The RPZ documentation section with response policy rules and actions
is incomplete.

Add information about the 'RPZ-CLIENT-IP' rule, and 'TCP-Only' and
'DROP' actions.

(cherry picked from commit 0fbd07ac2214cb830715391850934fc149541588)

3 years agoMerge branch '3505-missing-isc_mutex_destroy-v9_18' into 'v9_18'
Mark Andrews [Wed, 24 Aug 2022 07:38:01 +0000 (07:38 +0000)] 
Merge branch '3505-missing-isc_mutex_destroy-v9_18' into 'v9_18'

Call isc_mutex_destroy(&lasttime_mx); [v9_18]

See merge request isc-projects/bind9!6697

3 years agoCall isc_mutex_destroy(&lasttime_mx);
Mark Andrews [Wed, 24 Aug 2022 06:41:55 +0000 (16:41 +1000)] 
Call isc_mutex_destroy(&lasttime_mx);

(cherry picked from commit 8109f495c8b5d7c7f88d581f7905650add0c184e)

3 years agoMerge branch '3500-nsec3-missing-detach-node-9_18' into 'v9_18'
Matthijs Mekking [Tue, 23 Aug 2022 11:24:56 +0000 (11:24 +0000)] 
Merge branch '3500-nsec3-missing-detach-node-9_18' into 'v9_18'

nsec3.c: Add a missing dns_db_detachnode() call

See merge request isc-projects/bind9!6693

3 years agoAdd CHANGES entry for #3500
Matthijs Mekking [Tue, 23 Aug 2022 09:04:00 +0000 (11:04 +0200)] 
Add CHANGES entry for #3500

There is no need for a release because this case was nearly impossible
to trigger (except for when 'sig-signing-type' was set to 0).

(cherry picked from commit 545ecb64b043617ea609f4f115d280bb5990e221)

3 years agonsec3.c: Add a missing dns_db_detachnode() call
Matthijs Mekking [Tue, 23 Aug 2022 08:54:42 +0000 (10:54 +0200)] 
nsec3.c: Add a missing dns_db_detachnode() call

There is one case in 'dns_nsec3_activex()' where it returns but forgets
to detach the db node. Add the missing 'dns_db_detachnode()' call.

This case only triggers if 'sig-signing-type' (privatetype) is set to 0
(which by default is not), or if the function is called with 'complete'
is set to 'true' (which at this moment do not exist).

(cherry picked from commit 0cf6c18ccb2205a1fc81431f908c8310f6136bbb)

3 years agoMerge branch '3486-checkconf-dnssec-policy-nsec3-incompatible-algorithm-v9_18' into...
Matthijs Mekking [Mon, 22 Aug 2022 17:42:11 +0000 (17:42 +0000)] 
Merge branch '3486-checkconf-dnssec-policy-nsec3-incompatible-algorithm-v9_18' into 'v9_18'

[v9_18]  Graceful dnssec-policy transition from NSEC only to NSEC3

See merge request isc-projects/bind9!6691

3 years agoFix nsec3 system test issues
Matthijs Mekking [Fri, 19 Aug 2022 12:42:47 +0000 (14:42 +0200)] 
Fix nsec3 system test issues

The wait_for_zone_is_signed function was never called, which could lead
to test failures due to timing issues (where a zone was not fully signed
yet, but the test was trying to verify the zone).

Also add two missing set_nsec3param calls to ensure the ITERATIONS
value is set for these test cases.

(cherry picked from commit 08505651d1d9278314f61076ac7cd119a7790428)

3 years agoAdd change entry and release note for #3486
Matthijs Mekking [Wed, 10 Aug 2022 14:52:53 +0000 (16:52 +0200)] 
Add change entry and release note for #3486

News worthy.

(cherry picked from commit 2669eb2a34ef65935f8045a6c9d271af486f38d5)

3 years agoAdd test case for #3486
Matthijs Mekking [Wed, 10 Aug 2022 14:41:30 +0000 (16:41 +0200)] 
Add test case for #3486

Add two scenarios where we change the dnssec-policy from using RSASHA1
to something with NSEC3.

The first case should work, as the DS is still in hidden state and we
can basically do anything with DNSSEC.

The second case should fail, because the DS of the predecessor is
published and we can't immediately remove the predecessor DNSKEY. So
in this case we should keep the NSEC chain for a bit longer.

Add two more scenarios where we change the dnssec-policy from using
NSEC3 to something NSEC only. Both should work because there are no
restrictions on using NSEC when it comes to algorithms, but in the
cases where the DS is published we can't bluntly remove the predecessor.

Extend the nsec3 system test by also checking the DNSKEY RRset for the
expected DNSKEY records. This requires some "kasp system"-style setup
for each test (setting key properties and key states). Also move the
dnssec-verify check inside the check_nsec/check_nsec3 functions because
we will have to do that every time.

(cherry picked from commit 21729dd94efc9fc7b7317688dd9ff0ec45181bfd)

3 years agoWait with NSEC3 during a DNSSEC policy change
Matthijs Mekking [Wed, 10 Aug 2022 13:29:59 +0000 (15:29 +0200)] 
Wait with NSEC3 during a DNSSEC policy change

When doing a dnssec-policy reconfiguration from a zone with NSEC only
keys to a zone that uses NSEC3, figure out to wait with building the
NSEC3 chain.

Previously, BIND 9 would attempt to sign such a zone, but failed to
do so because the NSEC3 chain conflicted with existing DNSKEY records
in the zone that were not compatible with NSEC3.

There exists logic for detecting such a case in the functions
dnskey_sane() (in lib/dns/zone.c) and check_dnssec() (in
lib/ns/update.c). Both functions look very similar so refactor them
to use the same code and call the new function (called
dns_zone_check_dnskey_nsec3()).

Also update the dns_nsec_nseconly() function to take an additional
parameter 'diff' that, if provided, will be checked whether an
offending NSEC only DNSKEY will be deleted from the zone. If so,
this key will not be considered when checking the zone for NSEC only
DNSKEYs. This is needed to allow a transition from an NSEC zone with
NSEC only DNSKEYs to an NSEC3 zone.

(cherry picked from commit 09a81dc84ce0fee37442f03cdbd63c2398215376)

3 years agoTest checkconf NSEC3 and incompatible algorithm
Matthijs Mekking [Wed, 10 Aug 2022 13:24:21 +0000 (15:24 +0200)] 
Test checkconf NSEC3 and incompatible algorithm

The check code for this already exists, but was untested.

(cherry picked from commit 1996eaee547e046c8314cdb4a50a02eb9e59ce3f)

3 years agoMerge branch '3463-httpd.c-non-empty-post-requests-bugfix-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Fri, 19 Aug 2022 09:01:19 +0000 (09:01 +0000)] 
Merge branch '3463-httpd.c-non-empty-post-requests-bugfix-v9_18' into 'v9_18'

[v9_18] Fix statistics channel multiple request processing with non-empty HTTP bodies

See merge request isc-projects/bind9!6689

3 years agoAdd pipelined POST requests check in the statschannel system test
Aram Sargsyan [Wed, 20 Jul 2022 13:33:40 +0000 (13:33 +0000)] 
Add pipelined POST requests check in the statschannel system test

Use `nc` to check that multiple POST requests with non-empty HTTP
body are serviced normally by the statistics channel.

(cherry picked from commit bc32885ba981cab6308981936f49ab625af84bf2)

3 years agoReplace expr commands with $((expression)) shell constucts
Aram Sargsyan [Wed, 20 Jul 2022 13:21:27 +0000 (13:21 +0000)] 
Replace expr commands with $((expression)) shell constucts

Update the "statschannel" system test to use the $((expression))
shell constucts instead of executing the `expr` program.

(cherry picked from commit 8034819b53789b52dd1c80b0256880b506a3f31b)

3 years agoAdd CHANGES not for [GL #3463]
Aram Sargsyan [Wed, 20 Jul 2022 10:27:29 +0000 (10:27 +0000)] 
Add CHANGES not for [GL #3463]

(cherry picked from commit a00d787f2cf909fe0d8dce016488916997e8d67e)

3 years agoFix statistics channel multiple request processing with non-empty bodies
Aram Sargsyan [Wed, 20 Jul 2022 10:18:56 +0000 (10:18 +0000)] 
Fix statistics channel multiple request processing with non-empty bodies

When the HTTP request has a body part after the HTTP headers, it is
not getting processed and is being prepended to the next request's data,
which results in an error when trying to parse it.

Improve the httpd.c:process_request() function with the following
additions:

1. Require that HTTP POST requests must have Content-Length header.
2. When Content-Length header is set, extract its value, and make sure
   that it is valid and that the whole request's body is received before
   processing the request.
3. Discard the request's body by consuming Content-Length worth of data
   in the buffer.

(cherry picked from commit c2bbdc8a648c9630b2c9cea5227ad5c309c2ade5)

3 years agoEnhance the have_header() function to find the HTTP header's value
Aram Sargsyan [Wed, 20 Jul 2022 10:06:56 +0000 (10:06 +0000)] 
Enhance the have_header() function to find the HTTP header's value

Add a new `const char **fvalue` parameter to the httpd.c:have_header()
function which, when set, will point to the found header's value.

(cherry picked from commit 376e698dc21f4117d6461101c4cfbaef2b724592)

3 years agoMerge branch 'bug/main/delv-cfg_parser_reset-v9_18' into 'v9_18'
Mark Andrews [Fri, 19 Aug 2022 05:42:24 +0000 (05:42 +0000)] 
Merge branch 'bug/main/delv-cfg_parser_reset-v9_18' into 'v9_18'

Reset parser before parsing of internal trust anchor [v9_18]

See merge request isc-projects/bind9!6688

3 years agoAdd CHANGES entry for [GL !6468]
Mark Andrews [Fri, 19 Aug 2022 04:38:32 +0000 (14:38 +1000)] 
Add CHANGES entry for [GL !6468]

(cherry picked from commit 23a8c15cb2efd3486a4e7ea41c1581cb2ed07912)

3 years agoReset parser before parsing of internal trust anchor
Petr Menšík [Thu, 11 Aug 2022 09:41:30 +0000 (11:41 +0200)] 
Reset parser before parsing of internal trust anchor

It might be reused if /etc/bind.keys exists, but failed correct parsing.
Release traces of previous parsing attempt of different data.

(cherry picked from commit dc07394c4724c1e1235af85dd8c044af70da93ae)

3 years agoMerge branch '3499-duration-c-66-6-warning-array-subscript-is-of-type-char-on-netbsd...
Mark Andrews [Fri, 19 Aug 2022 04:30:06 +0000 (04:30 +0000)] 
Merge branch '3499-duration-c-66-6-warning-array-subscript-is-of-type-char-on-netbsd-9-v9_18' into 'v9_18'

Silence negative array index warning with toupper [v9_18]

See merge request isc-projects/bind9!6686

3 years agoSilence negative array index warning with toupper
Mark Andrews [Fri, 19 Aug 2022 01:13:59 +0000 (11:13 +1000)] 
Silence negative array index warning with toupper

Cast to (unsigned char).

(cherry picked from commit d3f790340e8590ad5da1472c99d25acbc9818496)

3 years agoMerge branch 'mnowak/freebsd-13.1-v9_18' into 'v9_18'
Michal Nowak [Thu, 18 Aug 2022 15:57:42 +0000 (15:57 +0000)] 
Merge branch 'mnowak/freebsd-13.1-v9_18' into 'v9_18'

[v9_18] Add FreeBSD 13.1

See merge request isc-projects/bind9!6683

3 years agoAdd FreeBSD 13.1
Michal Nowak [Fri, 12 Aug 2022 12:34:49 +0000 (14:34 +0200)] 
Add FreeBSD 13.1

(cherry picked from commit bc425be55e1736d4f2ffada5e8d76f96b08c8351)

3 years agoMerge branch 'artem-dig-http-plain-get-post-support-fix-v9-18' into 'v9_18'
Artem Boldariev [Thu, 18 Aug 2022 11:47:36 +0000 (11:47 +0000)] 
Merge branch 'artem-dig-http-plain-get-post-support-fix-v9-18' into 'v9_18'

[Backport to 9.18] DIG: fix handling of +http-plain-get and +http-plain-post options

See merge request isc-projects/bind9!6682

3 years agoModify CHANGES (+http-plain-{get, post} support fix in dig)
Artem Boldariev [Wed, 17 Aug 2022 10:34:52 +0000 (13:34 +0300)] 
Modify CHANGES (+http-plain-{get, post} support fix in dig)

This commit modifies the CHANGES file to mention that +http-plain-get
and +http-plain-post options support in dig was fixed.

(cherry picked from commit 0ab40c223b524b2d65a2b67a2eb76f4d63fbfb3e)

3 years agoModify the doth system test to verify HTTP method usage
Artem Boldariev [Wed, 17 Aug 2022 14:36:50 +0000 (17:36 +0300)] 
Modify the doth system test to verify HTTP method usage

Before the commit some checks in the system test would try to verify
that different HTTP methods can be used and are functional. However,
until recently, it was not possible to tell from the output which
method was in fact used, so it turned out that +http-plain-get option
is broken.

This commit add the additional checks to prevent that from happening
in the future.

(cherry picked from commit 625991c810b4086a5fbfc48ecb54974f6b6e3f9a)

3 years agoDIG: mark HTTP GET method in output
Artem Boldariev [Wed, 17 Aug 2022 14:35:28 +0000 (17:35 +0300)] 
DIG: mark HTTP GET method in output

This commit makes dig mark the usage of HTTP(S) GET protocol usage in
its output.

(cherry picked from commit f86d8c62b01a7ae88a3543ba85c41834e64d011a)

3 years agoDIG: fix handling of +http-plain-{get, post} options
Artem Boldariev [Wed, 17 Aug 2022 10:19:32 +0000 (13:19 +0300)] 
DIG: fix handling of +http-plain-{get, post} options

Support for parsing +http-plain-get and +http-plain-post options was
broken. This commit fixes that.

(cherry picked from commit fb135867644684a21d79bc3a5cebe3c83217a221)

3 years agoMerge tag 'v9_18_6' into v9_18
Michal Nowak [Thu, 18 Aug 2022 09:43:29 +0000 (11:43 +0200)] 
Merge tag 'v9_18_6' into v9_18

BIND 9.18.6

3 years agoMerge branch '3494-dnssec-awk-test-is-not-precise-enough-v9_18' into 'v9_18'
Mark Andrews [Thu, 18 Aug 2022 04:40:10 +0000 (04:40 +0000)] 
Merge branch '3494-dnssec-awk-test-is-not-precise-enough-v9_18' into 'v9_18'

Improve awk tests to prevent false negatives [v9_18]

See merge request isc-projects/bind9!6676

3 years agoImprove awk tests to prevent false negatives
Mark Andrews [Wed, 17 Aug 2022 02:08:16 +0000 (12:08 +1000)] 
Improve awk tests to prevent false negatives

The old code could incorrectly match "INSOA" in the RRSIG rdata
when looking for the SOA record.

(cherry picked from commit 2fc5f6fb2831697c79f75c50a769449ac561aad0)

3 years agoMerge branch 'mnowak/coverity-scan-2022.06-v9_18' into 'v9_18'
Michal Nowak [Wed, 17 Aug 2022 14:00:38 +0000 (14:00 +0000)] 
Merge branch 'mnowak/coverity-scan-2022.06-v9_18' into 'v9_18'

[v9_18] Use Coverity Scan 2022.06

See merge request isc-projects/bind9!6673

3 years agoUse Coverity Scan 2022.06
Michal Nowak [Wed, 17 Aug 2022 08:34:14 +0000 (10:34 +0200)] 
Use Coverity Scan 2022.06

(cherry picked from commit 3d683c704e271f1c8107a5b108c93db4bde7db7f)

3 years agoMerge branch '3492-fix-tkey.c-buildquery-cleanup-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Wed, 17 Aug 2022 09:10:38 +0000 (09:10 +0000)] 
Merge branch '3492-fix-tkey.c-buildquery-cleanup-v9_18' into 'v9_18'

[v9_18] Fix tkey.c:buildquery() function's error handling

See merge request isc-projects/bind9!6664

3 years agoAdd CHANGES note for [GL #3492]
Aram Sargsyan [Mon, 15 Aug 2022 11:40:38 +0000 (11:40 +0000)] 
Add CHANGES note for [GL #3492]

(cherry picked from commit 8dd12db505892640d885e81dc6701607da1df67f)

3 years agoFix tkey.c:buildquery() function's error handling
Aram Sargsyan [Mon, 15 Aug 2022 11:40:21 +0000 (11:40 +0000)] 
Fix tkey.c:buildquery() function's error handling

Add the missing cleanup code.

(cherry picked from commit 4237ab9550eeaea7121e3e3392fd14c26b5150f0)

3 years agoMerge branch 'mnowak/openbsd-7.1-v9_18' into 'v9_18'
Michal Nowak [Tue, 16 Aug 2022 15:17:14 +0000 (15:17 +0000)] 
Merge branch 'mnowak/openbsd-7.1-v9_18' into 'v9_18'

[v9_18] Add OpenBSD 7.1

See merge request isc-projects/bind9!6665