Commit graph

36690 commits

Author SHA1 Message Date
Aram Sargsyan
e20cda5928 Document dynamic update forwarding limitation when XoT is enabled
BIND 9.18 does not support sending forwarded DDNS update requests
through DoT.
2022-09-22 10:54:56 +00:00
Evan Hunt
f05297fe5a Merge branch '3553-httpd-cleanup-v9_18' into 'v9_18'
additional code cleanups in httpd.c

See merge request isc-projects/bind9!6799
2022-09-21 20:14:31 +00:00
Evan Hunt
357b59ec68 additional code cleanups in httpd.c
- use isc_buffer functions when appropriate, rather than converting
  to and from isc_region unnecessarily
- use the zlib total_out value instead of calculating it
- use c99 struct initialization

(cherry picked from commit 4b7248545e)
2022-09-21 12:54:27 -07:00
Michał Kępień
0a53f61727 BIND 9.18.7
-----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCgAtFiEENKwGS3ftSQfs1TU17QVz/8hFYQUFAmMZ4qIPHG1pY2hhbEBp
 c2Mub3JnAAoJEO0Fc//IRWEFpl0QAItVxvXJ2yQw+06QhlmA7l0pmKgAqKzgwzcD
 hpOsYsglMGhkyry+eWr+XOSEyU/MAIHSvhaKvvlicZMrthe4wmip4O0M24BldVmL
 Vvqb8/0vg2/8hom9aJu9NgRaGX/ybewauIG21drPR4O6MnLfX+8m0c0bbO1I60bn
 xSL5OX1DzDYJhMQ+hBlG2hTlEhovtXBFZYpTR2H9ITvXMrDJNbs3VQZLKFrD56Ge
 WitoPeE4lkGpDcPTtFys3siRJjIOAl9jKUZWqfnhmiYGC0USMmXneEEuM9/sMXFv
 jh0AtymJbe0s9bceYD961RE1pd9cdbrUg+6EJIhoGqNL+ANtj61jtdpLtWwWWKgU
 3MiEJF7YQLQ0lWXArUtMTRwWUYeVpxPprzwXIdQfiTp35fTBoOzL3rslq4HdVCxA
 SPtAunI8OFsr2Njglf2VsJfcX0x7V4lbftnmY3e24b+C+YXddRVc+83cGZvh2kvB
 NKY2Y8/Op8BsFyUoJ69Umcrx+xZSmO0ngEA62lKjJ/oAZ/WaQ8bkcajCdtLYKFJd
 rTXw/UsdKQDlUQ/rCU/Ge+Y/BKFRn3f7UA0D0Mvp+DpTus9DYMvy/nWWphVgWNGP
 E2j/1orf/dGdWojvFLGe4zPl8BCRHqgoxfGBaizR4N3eTKHcOS2uVJJ0x4WfY9xe
 nUKGK+iw
 =OVc+
 -----END PGP SIGNATURE-----

Merge tag 'v9_18_7' into v9_18

BIND 9.18.7
2022-09-21 13:13:30 +02:00
Evan Hunt
c00f22e8b2 Merge branch 'each-cleanup-dns_request-v9_18' into 'v9_18'
remove dns_request_create(), rename dns_request_createvia()

See merge request isc-projects/bind9!6784
2022-09-15 23:53:42 +00:00
Evan Hunt
8f61d07918 merge dns_request_createvia() into dns_request_create()
dns_request_create() was a front-end to dns_request_createvia() that
was only used by test binaries. dns_request_createvia() has been
renamed to dns_request_create(), and the test programs that formerly
used dns_request_create() have been updated to use the new parameters.

(cherry picked from commit ebf7b31aa3)
2022-09-15 16:49:04 -07:00
Mark Andrews
af27dd052d 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
2022-09-15 23:42:39 +00:00
Mark Andrews
ea1d3476a8 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.
2022-09-16 09:17:14 +10:00
Evan Hunt
9ac426db8f Merge branch '3522-update-detach-v9_18' into 'v9_18'
fix an incorrect detach in update processing

See merge request isc-projects/bind9!6782
2022-09-15 18:53:30 +00:00
Evan Hunt
16fbe33478 CHANGES for [GL #3522]
(cherry picked from commit fdc35928eb)
2022-09-15 11:34:33 -07:00
Evan Hunt
592c7b1049 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 00e0758e12)
2022-09-15 11:34:33 -07:00
Michal Nowak
bc53176c54 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
2022-09-15 10:46:58 +00:00
Michal Nowak
ec3a17f718
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 658cae9fad)
2022-09-15 12:21:28 +02:00
Ondřej Surý
47a40b48dc 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
2022-09-15 09:49:10 +00:00
Ondřej Surý
c9c4de0626
Add CHANGES and release note for [GL #3542]
(cherry picked from commit e29563173b)
2022-09-15 10:58:28 +02:00
Ondřej Surý
474676a38c
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 6869c98d36)
2022-09-15 10:58:09 +02:00
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ń
85a6eb108e Update BIND version for release 2022-09-08 14:39:47 +02:00
Michał Kępień
3d55ae3d2f Add a CHANGES marker 2022-09-08 14:39:47 +02:00
Michał Kępień
f0f3c56cd5 Merge branch 'michal/prepare-documentation-for-bind-9.18.7' into 'security-v9_18'
Prepare documentation for BIND 9.18.7

See merge request isc-private/bind9!459
2022-09-08 12:26:53 +00:00
Michał Kępień
212c9f1239 Tweak and reword release notes 2022-09-08 14:03:54 +02:00
Michał Kępień
364bdb5ec8 Prepare release notes for BIND 9.18.7 2022-09-08 14:03:54 +02:00
Michał Kępień
c58fb22a74 Merge branch '3487-eddsa-verify-leak-v9_18' into 'security-v9_18'
[v9_18] [CVE-2022-38178] eddsa verify leak

See merge request isc-private/bind9!439
2022-09-08 09:57:42 +00:00
Mark Andrews
06e13c5a8d Add release note for [GL #3487]
(cherry picked from commit e6cb1de20b)
2022-09-08 11:55:29 +02:00
Mark Andrews
79655301ab Add CHANGES note for [GL #3487]
(cherry picked from commit b3277f2e10)
2022-09-08 11:55:29 +02:00
Mark Andrews
7c0028cfad Free ctx on invalid siglen
(cherry picked from commit 6ddb480a84)
2022-09-08 11:55:29 +02:00
Michał Kępień
21af7869d1 Merge branch '3517-serve-stale-client-timeout-0-cname-crash-v9_18' into 'security-v9_18'
[v9_18] [CVE-2022-3080] Fix serve-stale-client-timeout 0 CNAME crash

See merge request isc-private/bind9!447
2022-09-08 09:53:06 +00:00
Matthijs Mekking
175e4e963b Add release notes for #3517
(cherry picked from commit 97c6c3712e)
2022-09-08 11:50:44 +02:00
Matthijs Mekking
55946cebb6 Add CHANGES entry for 3517
(cherry picked from commit e394902965)
2022-09-08 11:50:44 +02:00
Matthijs Mekking
b9e2f3333d Only refresh RRset once
Don't attempt to resolve DNS responses for intermediate results. This
may create multiple refreshes and can cause a crash.

One scenario is where for the query there is a CNAME and canonical
answer in cache that are both stale. This will trigger a refresh of
the RRsets because we encountered stale data and we prioritized it over
the lookup. It will trigger a refresh of both RRsets. When we start
recursing, it will detect a recursion loop because the recursion
parameters will eventually be the same. In 'dns_resolver_destroyfetch'
the sanity check fails, one of the callers did not get its event back
before trying to destroy the fetch.

Move the call to 'query_refresh_rrset' to 'ns_query_done', so that it
is only called once per client request.

Another scenario is where for the query there is a stale CNAME in the
cache that points to a record that is also in cache but not stale. This
will trigger a refresh of the RRset (because we encountered stale data
and we prioritized it over the lookup).

We mark RRsets that we add to the message with
DNS_RDATASETATTR_STALE_ADDED to prevent adding a duplicate RRset when
a stale lookup and a normal lookup conflict with each other. However,
the other non-stale RRset when following a CNAME chain will be added to
the message without setting that attribute, because it is not stale.

This is a variant of the bug in #2594. The fix covered the same crash
but for stale-answer-client-timeout > 0.

Fix this by clearing all RRsets from the message before refreshing.
This requires the refresh to happen after the query is send back to
the client.

(cherry picked from commit d939d2ecde)
2022-09-08 11:50:44 +02:00