Commit Graph
35887 Commits
Author SHA1 Message Date
JINMEI TatuyaandOndřej Surý aca98dfaa5 add a trivial wrapper for uv_stream_get_write_queue_size
(cherry picked from commit b9bef2cc89)
2024-08-05 10:31:15 +00:00
Ondřej Surý d420df5fa2 fix: dev: Pull the doc/misc/options{,.active} from the CI
The doc/misc/options{,.active} were built on system with different
configuration than we have in the CI, so the docs job just keeps
failing.  Pull the files from the CI, so they match what we have
in the CI images.

Merge branch 'ondrej/make-docs-job-happy-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9242
2024-08-05 09:11:51 +00:00
Ondřej Surý 881612de2d Pull the doc/misc/options{,.active} from the CI
The doc/misc/options{,.active} were built on system with different
configuration than we have in the CI, so the docs job just keeps
failing.  Pull the files from the CI, so they match what we have
in the CI images.
2024-08-05 09:11:45 +00:00
Ondřej Surý 6652066f31 [9.16] fix: test: Use LC_ALL to override all system locales
The system tests were overriding the local locale by setting LANG to C.
This does not override the locale in case there are individual LC_<*>
variables like LC_CTYPE explicitly set.

Use LC_ALL=C instead which is the proper way of overriding all currently
set locales.

Backport of MR !9109

Merge branch 'backport-ondrej/use-LC_ALL-not-LANG-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9237
2024-08-05 08:38:57 +00:00
Ondřej Surý 8fca60cbb9 Use LC_ALL to override all system locales
The system tests were overriding the local locale by setting LANG to C.
This does not override the locale in case there are individual LC_<*>
variables like LC_CTYPE explicitly set.

Use LC_ALL=C instead which is the proper way of overriding all currently
set locales.
2024-08-05 09:41:57 +02:00
Petr Špaček 8a7eb06d40 [9.16] new: test: Import fuzzers from bind-9.18 branch
Merge branch 'pspacek/9.16-fuzzers' into 'bind-9.16'

See merge request isc-projects/bind9!8685
2024-08-02 11:21:12 +00:00
Petr Špaček d6acd06249 Import fuzzers from bind-9.18 branch
It required minor resync of other auxiliary files in fuzz/ directory.
2024-08-02 11:18:25 +02:00
Ondřej SurýandPetr Špaček e5a62e9407 Add the ability specify the signing / verification time
When fuzzing it is useful for all signing operations to happen
at a specific time for reproducability.  Add two variables to
the message structure (fuzzing and fuzztime) to specify if a
fixed time should be used and the value of that time.

(cherry picked from commit 3e85d8c3d6)
2024-08-02 11:18:25 +02:00
Nicki Křížek 0673d10cc7 [9.16] chg: test: Retry job in case of AWS Spot Instance interruption event
Closes #4777

Backport of MR !9107

Merge branch '4777-retry-job-aws-spot-instance-interruption-event-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9186
2024-07-29 14:53:29 +00:00
Emanuel PetrandNicki Křížek 3ac3aef2fa Retry job in case of AWS Spot Instance interruption
(cherry picked from commit bbcce1bfc1)
2024-07-29 13:26:58 +00:00
Ondřej Surý 3f1826f2f7 [9.16] chg: usr: Backport max-types-per-name to BIND 9.16
This aligns the fix for large number of RRs in RRSet with 9.18 and up
by backporting to `max-records-per-type` configuration option to
BIND 9.16.

Merge branch 'ondrej/max-types-per-rr-backport-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9178
2024-07-29 10:56:27 +00:00
Ondřej Surý d3ca4be21c Add more tests for adding many RR types to the database
More reclimit tests that test various scenarios adding combinations of
priority and non-priority RR types into the database.
2024-07-29 12:27:25 +02:00
Matthijs MekkingandOndřej Surý d72adf4b92 Log error when update fails
The new "too many records" error can make an update fail without the
error being logged. This commit fixes that.

(cherry picked from commit 558923e5405894cf976d102f0d246a28bdbb400c)
2024-07-29 12:27:25 +02:00
Petr ŠpačekandOndřej Surý e08f268387 Remove duplicated empty zone files
(cherry picked from commit 1456b4fc7778b851256107dbc79fb67d45f752f5)
2024-07-29 12:27:25 +02:00
Petr ŠpačekandOndřej Surý da5bac8104 masterformat: rename zone names to reflect intended meaning
(cherry picked from commit d34bfb1eeaa2f8faab80b1620b992b5495e6f88c)
2024-07-29 12:27:25 +02:00
Petr ŠpačekandOndřej Surý eb4355c9f3 Test owner name rename: a b c d e -> <number>-txt
(cherry picked from commit 6ce03f75d1935c2e1991e9c0a01c49b0099a58cb)
2024-07-29 12:27:25 +02:00
Petr ŠpačekandOndřej Surý 6516c92c07 Test variable rename i->_attempt
(cherry picked from commit 13417eb277cc8a30ee4ddbb6fc02442b0d8e6d3c)
2024-07-29 12:27:25 +02:00
Petr ŠpačekandOndřej Surý 747da63896 Test variable rename a->rrcount
(cherry picked from commit 338b45ae713cded921fd3e5494ca38bd59ff9ee8)
2024-07-29 12:27:25 +02:00
Ondřej Surý b6f6e12bbf Add test for not-loading many RRsets per name on a secondary
This tests makes sure the zone with many RRsets per name is not loaded
via XFR on the secondary server.

(cherry picked from commit 4cfeed912a5e7440f04cb088a461ff47305da2e7)
2024-07-29 12:27:25 +02:00
Ondřej Surý a36ab2eb36 Add a test for not caching large number of RRsets
Send a recursive query for a large number of RRsets, which should
fail when using the default max-types-per-name setting of 100, but
succeed when the cap is disabled.

(cherry picked from commit 7e4530f847c8dc541c5e5bf9f790deed520aaa16)
2024-07-29 12:27:25 +02:00
Ondřej Surý 92a680a3ef Be smarter about refusing to add many RR types to the database
Instead of outright refusing to add new RR types to the cache, be a bit
smarter:

1. If the new header type is in our priority list, we always add either
   positive or negative entry at the beginning of the list.

2. If the new header type is negative entry, and we are over the limit,
   we mark it as ancient immediately, so it gets evicted from the cache
   as soon as possible.

3. Otherwise add the new header after the priority headers (or at the
   head of the list).

4. If we are over the limit, evict the last entry on the normal header
   list.

(cherry picked from commit 57cd34441a)
2024-07-29 12:27:25 +02:00
Evan HuntandOndřej Surý a080317de0 fix a memory leak that could occur when signing
when signatures were not added because of too many types already
existing at a node, the diff was not being cleaned up; this led to
a memory leak being reported at shutdown.

(cherry picked from commit 2825bdb1ae5be801e7ed603ba2455ed9a308f1f7)
2024-07-29 12:27:25 +02:00
Ondřej Surý 89f1779bc2 Add a limit to the number of RR types for single name
Previously, the number of RR types for a single owner name was limited
only by the maximum number of the types (64k).  As the data structure
that holds the RR types for the database node is just a linked list, and
there are places where we just walk through the whole list (again and
again), adding a large number of RR types for a single owner named with
would slow down processing of such name (database node).

Add a configurable limit to cap the number of the RR types for a single
owner.  This is enforced at the database (rbtdb, qpzone, qpcache) level
and configured with new max-types-per-name configuration option that
can be configured globally, per-view and per-zone.

(cherry picked from commit 00d16211d6368b99f070c1182d8c76b3798ca1db)
2024-07-29 12:27:25 +02:00
Ondřej Surý 2f2f0a900b [9.16] chg: usr: Backport max-records-per-type to BIND 9.16
This aligns the fix for large number of RRs in RRSet with 9.18 and up
by backporting to `max-records-per-type` configuration option to
BIND 9.16.

Merge branch 'ondrej/max-records-per-type-backport-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9177
2024-07-29 10:04:45 +00:00
Ondřej Surý 89d26ded37 Disable Windows checks in the misc job
We don't care about the Windows symbols not the Windows configure
anymore.
2024-07-29 11:32:22 +02:00
Evan HuntandOndřej Surý 4a0fe202a9 Add a test for not caching large RRset
Send a recursive query for a large (2500 record) RRset, which should
fail when using the default max-records-per-type setting of 100, but
succeed when the cap is disabled.

(cherry picked from commit 8e3efb4e06ba68cc3f9bc5be2bacb2596bd74cb3)
2024-07-29 11:27:54 +02:00
Ondřej Surý bf0df5322c Add test for not-loading and not-transfering huge RRSets
Add two new masterformat tests - the 'huge' zone fits within the ns1
limit and loads on the primary ns1 server, but must not transfer to the
ns2 secondary, and the 'uber' zone should not even load on the primary
ns1 server.

(cherry picked from commit cee9ad81db6e5a1167b311e5c2f42cf65ba457cd)
2024-07-29 11:27:54 +02:00
Ondřej Surý f63d72fb7e Add a limit to the number of RRs in RRSets
Previously, the number of RRs in the RRSets were internally unlimited.
As the data structure that holds the RRs is just a linked list, and
there are places where we just walk through all of the RRs, adding an
RRSet with huge number of RRs inside would slow down processing of said
RRSets.

Add a configurable limit to cap the number of the RRs in a single RRSet.
This is enforced at the database (rbtdb, qpzone, qpcache) level and
configured with new max-records-per-type configuration option that can
be configured globally, per-view and per-zone.

(cherry picked from commit 3fbd21f69a1bcbd26c4c00920e7b0a419e8762fc)
2024-07-28 16:55:28 +02:00
Nicki Křížek 6fceea4244 [9.16] [CVE-2024-4076] serve-stale zversion crash
Backport of MR isc-private/bind9!631

Merge branch '4507-clear-zversion-v9_16' into 'bind-9.16'

See merge request isc-projects/bind9!9175
2024-07-24 12:43:19 +00:00
Matthijs MekkingandNicki Křížek 582f06664e Add release note for [GL #4507] 2024-07-24 13:54:32 +02:00
Mark AndrewsandNicki Křížek 441b288974 Add CHANGES note for [GL #4507]
(cherry picked from commit 09ff8b1169f8be6867c0b2004d0369d246ad2994)
2024-07-24 13:54:29 +02:00
Mark AndrewsandNicki Křížek a61be8eef0 Clear qctx->zversion
Clear qctx->zversion when clearing qctx->zrdataset et al in
lib/ns/query.c:qctx_freedata.  The uncleared pointer could lead to
an assertion failure if zone data needed to be re-saved which could
happen with stale data support enabled.

(cherry picked from commit 179fb3532ab8d4898ab070b2db54c0ce872ef709)
2024-07-24 13:51:41 +02:00
Nicki Křížek 7933d0dcd8 [9.16] [CVE-2024-1975] Remove support for SIG(0) message verification
Backport of isc-private/bind9!690 

Fixes: isc-projects/bind9#4480

Merge branch '4480-drop-sig0-support-bind-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9174
2024-07-24 11:51:02 +00:00
Petr ŠpačekandNicki Křížek 0978875725 Add CHANGES note for [GL #4480]
(cherry picked from commit 6eda4f465aa75eb6d66a27f2d7a3dfae7611ecf9)
2024-07-24 13:16:01 +02:00
Aram SargsyanandNicki Křížek fbbb9f2f6e Adapt the upforwd test to the SIG(0) removal
Change the check so that update with SIG(0) is expected to fail.

(cherry picked from commit 5f7558f6dbb0527c08caf281299245ab8de268cd)
2024-07-24 13:15:29 +02:00
Petr ŠpačekandNicki Křížek c448b8be0d Adapt the tsiggss test to the SIG(0) removal
Test that SIG(0) signer is NOT sent to the external socket for
authorization. It MUST NOT be considered a valid signature by
any chance.

Also check that the signer's name does not appear in authsock.pl
output.

(cherry picked from commit cf8838085905171fbc00747eb210e8b8284ca0e1)
2024-07-24 13:15:29 +02:00
Aram SargsyanandNicki Křížek c21a152445 Enable stdout autoflush in authsock.pl
With enabled buffering the output gets lost when the process
receives a TERM signal. Disable the buffering.

(cherry picked from commit a0311dfb6e2a51f89dfa8b200b96a0f4675fb654)
2024-07-24 13:15:29 +02:00
Petr ŠpačekandNicki Křížek 9f31ec7ec9 Document SIG(0) verification removal
(cherry picked from commit 654ba34d80b8b6ed805461d7ada2466f8c19a6f1)
2024-07-24 13:15:29 +02:00
Petr ŠpačekandNicki Křížek 0820a90b41 Remove support for SIG(0) message verification
(cherry picked from commit 857fd5c346e3309ee8e280c29174b46579af5a13)
2024-07-24 13:15:27 +02:00
Nicki Křížek 51f86ded38 [9.16][CVE-2024-1737 (part 2)] Be smarter about refusing to add many RR types to the database
Add HTTPS, SVCB, SRV, PTR, NAPTR, DNSKEY and TXT records to the list of
the priority types that are put at the beginning of the slabheader list
for faster access and to avoid eviction when there are more types than
the max-types-per-name limit.

(cherry picked from commit b27c6bcce8)

---

Backport of MR https://gitlab.isc.org/isc-private/bind9/-/merge_requests/712

Related https://gitlab.isc.org/isc-projects/bind9/-/issues/3405

Merge branch '3405-limit-the-number-of-resource-records-in-rrset-nxdomain-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9172
2024-07-24 11:14:10 +00:00
Ondřej SurýandNicki Křížek 26c9da5f28 Be smarter about refusing to add many RR types to the database
Instead of outright refusing to add new RR types to the cache, be a bit
smarter:

1. If the new header type is in our priority list, we always add either
   positive or negative entry at the beginning of the list.

2. If the new header type is negative entry, and we are over the limit,
   we mark it as ancient immediately, so it gets evicted from the cache
   as soon as possible.

3. Otherwise add the new header after the priority headers (or at the
   head of the list).

4. If we are over the limit, evict the last entry on the normal header
   list.

(cherry picked from commit 57cd34441a)
2024-07-24 12:12:04 +02:00
Ondřej SurýandNicki Křížek c5ebda6deb Make the resolver qtype ANY test order agnostic
Instead of relying on a specific order of the RR types in the databases
pick the first RR type as returned from the cache.

(cherry picked from commit 58f660cf2b)
2024-07-24 12:12:03 +02:00
Ondřej SurýandNicki Křížek d56d2a32b8 Expand the list of the priority types
Add HTTPS, SVCB, SRV, PTR, NAPTR, DNSKEY and TXT records to the list of
the priority types that are put at the beginning of the slabheader list
for faster access and to avoid eviction when there are more types than
the max-types-per-name limit.

(cherry picked from commit b27c6bcce8)
2024-07-24 12:11:59 +02:00
Nicki Křížek 5360c90612 [9.16][CVE-2024-1737] Add a limit to the number of RRs in RRSets
Previously, the number of RRs in the RRSets were internally unlimited.
As the data structure that holds the RRs is just a linked list, and
there are places where we just walk through all of the RRs, adding an
RRSet with huge number of RRs inside would slow down processing of said
RRSets.

Add a configurable limit to cap the number of the RRs in a single RRSet.
This is enforced at the database (rbtdb, qpzone, qpcache) level and
configured with new max-records-per-rrset configuration option that can
be configured globally, per-view and per-zone.

(cherry picked from commit c5c4d00c38530390c9e1ae4c98b65fbbadfe9e5e)

Not a backport, closes https://gitlab.isc.org/isc-projects/bind9/-/issues/3405 for 9.16

Merge branch '3405-limit-the-number-of-resource-records-in-rrset-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9170
2024-07-24 10:09:58 +00:00
Nicki Křížek 8a4db4bb8e Revert "Build gcc:oraclelinux9:amd64 CI jobs with --disable-developer"
This reverts commit 6a7ec0c01c.
2024-07-24 10:56:59 +02:00
Ondřej SurýandNicki Křížek dfcadc2085 Add a limit to the number of RR types for single name
Previously, the number of RR types for a single owner name was limited
only by the maximum number of the types (64k).  As the data structure
that holds the RR types for the database node is just a linked list, and
there are places where we just walk through the whole list (again and
again), adding a large number of RR types for a single owner named with
would slow down processing of such name (database node).

Add a hard-coded limit (100) to cap the number of the RR types for a single
owner.  The limit can be changed at the compile time by adding following
define to CFLAGS:

    -DDNS_RBTDB_MAX_RTYPES=<limit>
2024-07-24 10:56:59 +02:00
Ondřej SurýandNicki Křížek fdabf4b957 Add a limit to the number of RRs in RRSets
Previously, the number of RRs in the RRSets were internally unlimited.
As the data structure that holds the RRs is just a linked list, and
there are places where we just walk through all of the RRs, adding an
RRSet with huge number of RRs inside would slow down processing of said
RRSets.

The fix for end-of-life branches make the limit compile-time only for
simplicity and the limit can be changed at the compile time by adding
following define to CFLAGS:

    -DDNS_RDATASET_MAX_RECORDS=<limit>

(cherry picked from commit c5c4d00c38530390c9e1ae4c98b65fbbadfe9e5e)
2024-07-24 10:56:57 +02:00
Nicki Křížek 8536c916b6 [9.16] Prevent passing DNS_EVENT_TRYSTALE events to resume_dslookup()
Closes isc-projects/bind9#4661

Merge branch '4661-clear-dns-fetchopt-trystale-ontimeout-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9168
2024-07-24 08:55:38 +00:00
Mark AndrewsandNicki Křížek 02aa54c690 Add CHANGES not for [GL #4661]
(cherry picked from commit 975bbfba90925a427d71dacd8648448e3f0de2d9)
2024-06-18 10:44:52 +02:00
Mark AndrewsandNicki Křížek b36e1cfbcd Clear DNS_FETCHOPT_TRYSTALE_ONTIMEOUT
When calling dns_resolver_createfetch in resolver.c with a callback
of resume_dslookup, clear DNS_FETCHOPT_TRYSTALE_ONTIMEOUT from
options as DNS_EVENT_TRYSTALE is not an expected event type and
triggers a REQUIRE.

(cherry picked from commit 6faea6da3d646557d234d63ddd5d524d222e8082)
2024-06-06 18:28:35 +02:00