Commit Graph

34630 Commits

Author SHA1 Message Date
Michał Kępień
fe0b04d8d3 Fix the description of named's -n option
Since the advent of netmgr, named no longer creates a single thread per
CPU, but rather a set of two threads per CPU.  Update the man page for
named accordingly to prevent confusion.
2022-09-21 19:47:13 +02:00
Petr Špaček
9d5e7aca9c Merge branch '3542-arm-stats-socket-caution' into 'v9_16'
Provide stronger wording about the security of statistics channel

See merge request isc-projects/bind9!6795
2022-09-21 16:06:04 +00:00
Ondřej Surý
f830737c51 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-21 17:49:49 +02:00
Michał Kępień
69c38b5e1c Merge tag 'v9_16_33' into v9_16
BIND 9.16.33
2022-09-21 13:21:29 +02:00
Mark Andrews
6711d7d179 Merge branch '3525-key-id-clashes-across-algorithms-cause-problems-with-statistics-v9_18-v9_16' into 'v9_16'
Suppress manykeys test on duplicate key ids [v9_16]

See merge request isc-projects/bind9!6785
2022-09-16 00:21:12 +00:00
Mark Andrews
ff883fd75f 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.

(cherry picked from commit ea1d3476a8)
2022-09-16 09:49:41 +10:00
Evan Hunt
d244ff84ac Merge branch '3522-update-detach-v9_16' into 'v9_16'
fix an incorrect detach in update processing

See merge request isc-projects/bind9!6783
2022-09-15 20:14:30 +00:00
Evan Hunt
338663b1cd CHANGES for [GL #3522] 2022-09-15 11:36:37 -07:00
Evan Hunt
17924f4bdf 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:35:42 -07:00
Michal Nowak
97ea818086 Merge branch '3427-tcp-system-test-bump-socket.create_connection-timeout-v9_16' into 'v9_16'
[v9_16] Bump socket.create_connection() timeout to 10 seconds

See merge request isc-projects/bind9!6781
2022-09-15 12:41:03 +00:00
Michal Nowak
9b41b63607 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:36:14 +02:00
Tony Finch
f3766061e7 Merge branch '3531-initialize-struct-server-v9_16' into 'v9_16'
Ensure that named_server_t is properly initialized

See merge request isc-projects/bind9!6761
2022-09-12 10:40:40 +00:00
Tony Finch
dff843199f 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:21:37 +01:00
Michał Kępień
208fc897b1 Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.34' into 'v9_16'
Set up version and release notes for BIND 9.16.34

See merge request isc-projects/bind9!6760
2022-09-09 18:23:14 +00:00
Michał Kępień
666d315087 Set up release notes for BIND 9.16.34 2022-09-09 20:00:15 +02:00
Michał Kępień
990bd74104 Update BIND version to 9.16.34-dev 2022-09-09 20:00:15 +02:00
Michał Kępień
35e9c6e31d Merge branch 'prep-release' into security-v9_16 v9.16.33 2022-09-08 15:01:23 +02:00
Michał Kępień
31fdc767f7 prep 9.16.33 2022-09-08 15:01:10 +02:00
Michał Kępień
f4ad07e82d Merge branch 'michal/prepare-documentation-for-bind-9.16.33' into 'security-v9_16'
Prepare documentation for BIND 9.16.33

See merge request isc-private/bind9!460
2022-09-08 12:40:59 +00:00
Michał Kępień
907b764b2a Tweak and reword release notes 2022-09-08 14:33:43 +02:00
Michał Kępień
b54ee83d50 Prepare release notes for BIND 9.16.33 2022-09-08 14:33:43 +02:00
Michał Kępień
0657c81d59 Merge branch '3487-eddsa-verify-leak-v9_16' into 'security-v9_16'
[v9_16] [CVE-2022-38178] eddsa verify leak

See merge request isc-private/bind9!440
2022-09-08 10:18:54 +00:00
Mark Andrews
ffd69ff780 Add release note for [GL #3487]
(cherry picked from commit e6cb1de20b)
2022-09-08 12:16:36 +02:00
Mark Andrews
a385e884f5 Add CHANGES note for [GL #3487]
(cherry picked from commit b3277f2e10)
2022-09-08 12:16:36 +02:00
Mark Andrews
1af23378eb Free ctx on invalid siglen
(cherry picked from commit 6ddb480a84)
2022-09-08 12:16:36 +02:00
Michał Kępień
1f1c4734fb Merge branch '3487-ecdsa-verify-leak' into 'security-v9_16'
[v9_16][CVE-2022-38177] ecdsa verify leak

See merge request isc-private/bind9!421
2022-09-08 10:14:18 +00:00
Mark Andrews
62c45573ba Add release note for [GL #3487] 2022-09-08 12:12:36 +02:00
Mark Andrews
21518e169a Add CHANGES note for [GL #3487] 2022-09-08 12:12:36 +02:00
Mark Andrews
5b2282afff Free eckey on siglen mismatch 2022-09-08 12:12:36 +02:00
Michał Kępień
b3abc2a844 Merge branch '3517-serve-stale-client-timeout-0-cname-crash-v9_16' into 'security-v9_16'
[v9_16] [CVE-2022-3080] Fix serve-stale-client-timeout 0 CNAME crash

See merge request isc-private/bind9!448
2022-09-08 10:10:34 +00:00
Matthijs Mekking
8ee4c3bbdc Add release notes for #3517
(cherry picked from commit 97c6c3712e)
2022-09-08 12:08:28 +02:00
Matthijs Mekking
57bf78e1ea Add CHANGES entry for 3517
(cherry picked from commit e394902965)
2022-09-08 12:08:28 +02:00
Matthijs Mekking
3f68e2ad83 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 12:08:28 +02:00
Michał Kępień
0d5aecf3be Merge branch '3394-security-cve-2022-2795-mitigation-v9_16' into 'security-v9_16'
[CVE-2022-2795] [v9_16] Bound the amount of work performed for delegations

See merge request isc-private/bind9!453
2022-09-08 10:06:06 +00:00
Michał Kępień
315d35589a Add release note for GL #3394
(cherry picked from commit 672072812c)
2022-09-08 11:11:30 +02:00
Michał Kępień
ed6aa5c503 Add CHANGES entry for GL #3394
(cherry picked from commit e802beedfc)
2022-09-08 11:11:30 +02:00
Michał Kępień
bf2ea6d852 Bound the amount of work performed for delegations
Limit the amount of database lookups that can be triggered in
fctx_getaddresses() (i.e. when determining the name server addresses to
query next) by setting a hard limit on the number of NS RRs processed
for any delegation encountered.  Without any limit in place, named can
be forced to perform large amounts of database lookups per each query
received, which severely impacts resolver performance.

The limit used (20) is an arbitrary value that is considered to be big
enough for any sane DNS delegation.

(cherry picked from commit 3a44097fd6)
2022-09-08 11:11:30 +02:00
Michał Kępień
65245d8b3d Merge branch '3459-rrl-wildcard-handling-v9_16' into 'v9_16'
[v9_16] Make RRL code treat all QNAMEs subject to wildcard processing within a given zone as the same name

See merge request isc-projects/bind9!6749
2022-09-08 08:23:57 +00:00
Aram Sargsyan
5b6e4465be Add CHANGES and release notes for [GL #3459]
(cherry picked from commit 0b0cf12741)
2022-09-08 09:41:15 +02:00
Aram Sargsyan
6f46bfe705 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:41:15 +02:00
Aram Sargsyan
3ad0f165ab 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:41:15 +02:00
Matthijs Mekking
f917f9480e Merge branch 'matthijs-fix-intermittent-inline-system-test-failure-v9_16' into 'v9_16'
[v9_16] Fix intermittent inline system test failure

See merge request isc-projects/bind9!6740
2022-09-07 15:34:24 +00:00
Matthijs Mekking
d1336d49b3 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:30:19 +02:00
Evan Hunt
559c9c2e33 Merge branch '3521-interface-cleanup' into 'v9_16'
clean up properly when interface creation fails

See merge request isc-projects/bind9!6723
2022-09-07 00:10:10 +00:00
Evan Hunt
80a8322d65 clean up properly when interface creation fails
previously, if ns_clientmgr_create() failed, the interface was not
cleaned up correctly and an assertion or segmentation fault could
follow. this has been fixed.
2022-09-06 13:53:44 -07:00
Arаm Sаrgsyаn
f3e0915261 Merge branch '3518-libxml2-deprecated-functions-v9_16' into 'v9_16'
[v9_16] Do not use libxml2 deprecated functions

See merge request isc-projects/bind9!6732
2022-09-06 10:31:48 +00:00
Aram Sargsyan
c1be3bda3a Add CHANGES note for [GL #3518]
(cherry picked from commit 87920661b1)
2022-09-06 09:22:42 +00:00
Aram Sargsyan
8b328f0049 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:22:35 +00:00
Matthijs Mekking
3e041d15a1 Merge branch '3381-dnssec-policy-explicit-inline-signing-v9_16' into 'v9_16'
[v9_16] dnssec-policy now requires inline-signing

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

(cherry picked from commit 2b95c11905a1a5faff9efa97a4f2498aadfa467b)
2022-09-06 10:27:34 +02:00