Commit Graph
29024 Commits
Author SHA1 Message Date
Michał Kępień d5524cf332 Prepare release notes for BIND 9.11.24 2020-10-22 09:22:48 +02:00
Michał Kępień eef36e64e8 Tweak and reword release notes 2020-10-22 09:22:48 +02:00
Michał Kępień 8218d23eb0 Tweak and reword recent CHANGES entries 2020-10-22 09:22:48 +02:00
Diego dos Santos Fronza e79c001356 Merge branch '2195-freebsd-dnstap-system-test-failure-v9_11' into 'v9_11'
Fix dnstap system test on FreeBSD

See merge request isc-projects/bind9!4276
2020-10-20 14:32:48 +00:00
Diego Fronza 0cd414a390 Fix dnstap system test on FreeBSD
This commit ensures that dnstap output files captured
by fstrm_capture are properly flushed before any attempt
on reading them with dnstap-read is done.

By reading fstrm-capture source code it was noticed that
signal SIGHUP is used to flush the capture file.
2020-10-20 10:39:48 -03:00
Mark Andrews f7a271d562 Merge branch 'marka-fix-not-enough-categories-v9_11' into 'v9_11'
Drop the expected minimum number of buckets to 4.

See merge request isc-projects/bind9!4266
2020-10-15 01:57:54 +00:00
Mark Andrews 140659c57a Drop the expected minimum number of buckets to 4.
The previous value of 5 produced too many false errors.

(cherry picked from commit 0abb49034e)
2020-10-15 12:32:26 +11:00
Mark Andrews 75ad006928 Merge branch 'marka-rrl-mdig-burst-v9_11' into 'v9_11'
Try to improve rrl timing

See merge request isc-projects/bind9!4264
2020-10-15 01:15:48 +00:00
Mark Andrews 96399960c1 Try to improve rrl timing
Add a +burst option to mdig so that we have a second to setup the
mdig calls then they run at the start of the next second.

RRL uses 'queries in a second' as a approximation to
'queries per second'. Getting the bursts of traffic to all happen in
the same second should prevent false negatives in the system test.

We now have a second to setup the traffic in.  Then the traffic should
be sent at the start of the next second.  If that still fails we
should move to +burst=<now+2> (further extend mdig) instead of the
implicit <now+1> as the trigger second.

(cherry picked from commit 92cdc7b6c7)
2020-10-15 11:47:08 +11:00
Mark Andrews a5ea10c162 Merge branch '2204-investigate-pipeline-system-test-failure-2' into 'v9_11'
Resolve "Investigate pipeline system test failure"

See merge request isc-projects/bind9!4248
2020-10-08 05:21:27 +00:00
Mark Andrews 56e8628e92 Restore the dns_message_reset() call before the dns_dispatch_getnext()
This was accidentally lost in the process of moving rmessage from fctx
to query.  Without this dns_message_setclass() will fail.
2020-10-08 13:10:31 +11:00
Mark Andrews 21bff35408 Merge branch 'mnowak/bring_--rpz-log-qtype-qclass_back' into 'v9_11'
Bring back --rpz-log-qtype-qclass feature-test option

See merge request isc-projects/bind9!4243
2020-10-07 20:10:10 +00:00
Michal Nowak d7ea583ad0 Bring back --rpz-log-qtype-qclass feature-test option
It was unintentionally removed during a backport.
2020-10-07 11:24:16 +02:00
Michal Nowak 8dd41143c6 Merge branch 'wpk/fix-isc-assertions-c-error-v9_11' into 'v9_11'
[v9_11] Fix 'error: ‘%s’ directive argument is null [-Werror=format-overflow=]' in assertions.c

See merge request isc-projects/bind9!4242
2020-10-07 09:12:16 +00:00
Witold KręcickiandMichal Nowak 09a3431069 Fix 'error: ‘%s’ directive argument is null [-Werror=format-overflow=]' in assertions.c
(cherry picked from commit f4260dc0c5)
2020-10-07 10:26:47 +02:00
Ondřej Surý 7886dc0cc1 Merge branch '2183-dns-flag-day-2020-v9_11' into 'v9_11'
Resolve "DNS Flag Day 2020"

See merge request isc-projects/bind9!4230
2020-10-06 12:22:09 +00:00
Ondřej Surý 772cb1696a Add text describing the changes done in the MR in more detail
(cherry picked from commit 096d41b4e2)
(cherry picked from commit 469286e8eb24ebd6227e65b18eb4c30e13a58877)
2020-10-06 09:34:49 +02:00
Ondřej SurýandOndřej Surý d7b16b780f Adjust legacy tests for default 1232 EDNS Buffer Size
* legacy test was just expecting default server EDNS buffer size to be 4096,
  the test needed the adjustment to reset the buffer sizes back to 4096.
2020-10-06 09:34:49 +02:00
Ondřej Surý 3ab08cdaa4 Adjust digdelv tests for default 1232 EDNS Buffer Size
* digdelv test was just expecting default server EDNS buffer size to be
  4096, the test needed only slight adjustment

(cherry picked from commit f1556f8c41)
(cherry picked from commit 6b303721f1ee472dc8ab2d1df03191a98d4e4e5e)
2020-10-05 17:00:24 +02:00
Ondřej Surý c164c9a819 Change the default ENDS buffer size to 1232 for DNS Flag Day 2020
The DNS Flag Day 2020 aims to remove the IP fragmentation problem from
the UDP DNS communication.  In this commit, we implement the minimal
required changes by changing the defaults for `edns-udp-size`,
`max-udp-size` and `nocookie-udp-size` to `1232` (the value picked by
DNS Flag Day 2020).

(cherry picked from commit bb990030d3)
(cherry picked from commit df06773f9a73e4a4bb0b5e7f4bd8e40394e64032)
2020-10-05 16:54:39 +02:00
Michał Kępień cc7efac75a Merge branch '2139-rrset-order-fixes-and-cleanups-v9_11' into 'v9_11'
[v9_11] "rrset-order" fixes and cleanups

See merge request isc-projects/bind9!4221
2020-10-02 08:12:59 +00:00
Michał Kępień d8c0fe0c25 Add CHANGES entry
(cherry picked from commit 27c815a220)
2020-10-02 10:09:25 +02:00
Michał Kępień d34a17e37b Rework "rrset-order" documentation
Certain parts of the existing documentation for the "rrset-order"
statement are incorrect, others are ambiguous.  Rework the relevant
section of the ARM to make it clear and up-to-date with the source code.

(cherry picked from commit 2ac04dc930)
2020-10-02 10:09:15 +02:00
Mark Andrews 792ad817fe Merge branch '2112-allow-task_test-subtests-to-be-selected-at-runtime-v9_11' into 'v9_11'
Resolve "Allow task_test subtests to be selected at runtime."

See merge request isc-projects/bind9!4210
2020-10-01 13:23:56 +00:00
Mark Andrews 24e204d013 Add the ability select individual tests to rdata_test
(cherry picked from commit 6293682020)
2020-10-01 23:05:10 +10:00
Mark Andrews 21662afb3c Add the ability to print out the list of test names (-l)
(cherry picked from commit a9c3374717)
2020-10-01 23:03:05 +10:00
Mark Andrews e310aaf4b7 Add the ability to select tests to run
task_test [-t <test_name>]

(cherry picked from commit 76837484e7)
2020-10-01 23:03:01 +10:00
Ondřej Surý 7dab61a3a7 Merge branch '2124-fix-assertion-failure-in-dns-message-v9_11' into 'v9_11'
Resolve "Bind 9.16.6 Assertion failure message.c:4733: REQUIRE(msg->state == (-1)) failed"

See merge request isc-projects/bind9!4200
2020-09-30 12:40:37 +00:00
Ondřej Surý 3038974cde Add CHANGES and release note for GL #2124 2020-09-30 14:04:04 +02:00
Diego FronzaandOndřej Surý 79c62017eb Properly handling dns_message_t shared references
This commit fix the problems that arose when moving the dns_message_t
object from fetchctx_t to the query structure.

Since the lifetime of query objects are different than that of a
fetchctx and the dns_message_t object held by the query may be being
used by some external module, e.g. validator, even after the query may
have been destroyed, propery handling of the references to the message
were added in this commit to avoid accessing an already destroyed
object.

Specifically, in resquery_response(), a reference to the message is
attached at the beginning of the function and detached at the end, since
a possible call to fctx_cancelquery() would release the dns_message_t
object, and in the next lines of code a call to add_bad() would require
a valid pointer to the same object.

In valcreate() a new reference is attached to the message object, this
ensures that if the corresponding query object is destroyed before the
validator attempts to access it, no invalid pointer access occurs.

In validated() we have to attach a new reference to the message, since
we destroy the validator object at the beginning of the function, and we
need access to the message in the next lines of the same function.
2020-09-30 14:04:04 +02:00
Diego FronzaandOndřej Surý d391a0b4c5 Fix invalid dns message state in resolver's logic
The assertion failure REQUIRE(msg->state == DNS_SECTION_ANY),
caused by calling dns_message_setclass within function resquery_response()
in resolver.c, was happening due to wrong management of dns message_t
objects used to process responses to the queries issued by the resolver.

Before the fix, a resolver's fetch context (fetchctx_t) would hold
a pointer to the message, this same reference would then be used over all
the attempts to resolve the query, trying next server, etc... for this to work
the message object would have it's state reset between each iteration, marking
it as ready for a new processing.

The problem arose in a scenario with many different forwarders configured,
managing the state of the dns_message_t object was lacking better
synchronization, which have led it to a invalid dns_message_t state in
resquery_response().

Instead of adding unnecessarily complex code to synchronize the object,
the dns_message_t object was moved from fetchctx_t structure to the
query structure, where it better belongs to, since each query will produce
a response, this way whenever a new query is created an associated
dns_messate_t is also created.

This commit deals mainly with moving the dns_message_t object from fetchctx_t
to the query structure.
2020-09-30 14:04:04 +02:00
Diego FronzaandOndřej Surý 8781aef52e Refactored dns_message_t for using attach/detach semantics
This commit will be used as a base for the next code updates in order
to have a better control of dns_message_t objects' lifetime.
2020-09-30 13:33:43 +02:00
Michał Kępień e33358a00f Merge branch 'michal/disable-openssl-hashing-when-using-native-pkcs11' into 'v9_11'
Disable OpenSSL hashing when using native PKCS#11

See merge request isc-projects/bind9!4178
2020-09-28 07:31:38 +00:00
Michał Kępień b9cf398679 Disable OpenSSL hashing when using native PKCS#11
When building with "--enable-native-pkcs11 --with-openssl", OpenSSL
support is automatically disabled in favor of native PKCS#11:

    checking for OpenSSL library... use of native PKCS11 instead

However, adding "--enable-openssl-hash" to the above two switches causes
the build to fail:

    checking for OpenSSL library... use of native PKCS11 instead
    disabled because of native PKCS11
    checking for using OpenSSL for hash functions... configure: error: No OpenSSL for hash functions

In other words, "--with-openssl" and "--enable-openssl-hash" are not
behaving consistently when used together with "--enable-native-pkcs11".

Fix by automatically disabling OpenSSL hashing support when native
PKCS#11 support is enabled.
2020-09-28 09:30:00 +02:00
Michał Kępień 26d3ce03e9 Merge branch '2177-make-native-pkcs11-require-dlopen-support-v9_11' into 'v9_11'
[v9_11] Make native PKCS#11 require dlopen() support

See merge request isc-projects/bind9!4190
2020-09-28 07:29:08 +00:00
Michał Kępień d21ed7527e Make native PKCS#11 require dlopen() support
PKCS#11 support in BIND requires dlopen() support from the operating
system and thus building with "--enable-native-pkcs11 --without-dlopen"
should not be possible.  Add an Autoconf check which enforces that
constraint.  Adjust the pairwise testing model accordingly.

(cherry picked from commit 187dca9cf7)
2020-09-28 09:24:48 +02:00
Mark Andrews 760dd259b3 Merge branch '2184-add-rfc8096-to-list-of-rfcs-in-doc-general-rst-v9_11' into 'v9_11'
Add RFC8906 to list in doc/arm/general.rst

See merge request isc-projects/bind9!4183
2020-09-24 03:16:23 +00:00
Suzanne GoldlustandMark Andrews f834abb9c2 Add RFC8906 to list in doc/arm/general.rst
(cherry picked from commit 4c36b6bdf0)
2020-09-24 10:44:45 +10:00
Mark Andrews a87fd03cd9 Merge branch '2126-cycles-in-lock-order-graphs-v9-11' into 'v9_11'
Resolve "Cycles in lock order graphs [v9.11]"

See merge request isc-projects/bind9!4094
2020-09-23 01:05:14 +00:00
Mark Andrews a0b123a06e Address lock order reversals when shutting down a view.
Release view->lock before calling dns_resolver_shutdown,
dns_adb_shutdown, and dns_requestmgr_shutdown.
2020-09-23 00:42:26 +00:00
Mark Andrews eac36a210b Merge branch '2156-threadsanitizer-lock-order-inversion-potential-deadlock-in-pthread_mutex_lock-2-v9_11' into 'v9_11'
Break lock order loop by sending TAT in an event

See merge request isc-projects/bind9!4166
2020-09-22 13:51:06 +00:00
Mark Andrews d95a18711b Break lock order loop by sending TAT in an event
The dotat() function has been changed to send the TAT
query asynchronously, so there's no lock order loop
because we initialize the data first and then we schedule
the TAT send to happen asynchronously.

This breaks following lock-order loops:

zone->lock (dns_zone_setviewcommit) while holding view->lock
(dns_view_setviewcommit)

keytable->lock (dns_keytable_find) while holding zone->lock
(zone_asyncload)

view->lock (dns_view_findzonecut) while holding keytable->lock
(dns_keytable_forall)

(cherry picked from commit 3c4b68af7c)
2020-09-22 23:35:39 +10:00
Mark Andrews b98133d48f Merge branch '2157-threadsanitizer-lock-order-inversion-potential-deadlock-in-pthread_rwlock_wrlock-v9_11' into 'v9_11'
Address lock-order-inversion

See merge request isc-projects/bind9!4164
2020-09-22 12:52:51 +00:00
Mark Andrews cd54ac9abe Address lock-order-inversion
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock)
    Cycle in lock order graph: M1 (0x000000000001) => M2 (0x000000000002) => M1

    Mutex M2 acquired here while holding mutex M1 in thread T1:
    #0 pthread_rwlock_wrlock <null>
    #1 isc_rwlock_lock lib/isc/rwlock.c:52:4
    #2 zone_postload lib/dns/zone.c:5101:2
    #3 receive_secure_db lib/dns/zone.c:16206:11
    #4 dispatch lib/isc/task.c:1152:7
    #5 run lib/isc/task.c:1344:2

    Mutex M1 previously acquired by the same thread here:
    #0 pthread_mutex_lock <null>
    #1 receive_secure_db lib/dns/zone.c:16204:2
    #2 dispatch lib/isc/task.c:1152:7
    #3 run lib/isc/task.c:1344:2

    Mutex M1 acquired here while holding mutex M2 in thread T1:
    #0 pthread_mutex_lock <null>
    #1 get_raw_serial lib/dns/zone.c:2518:2
    #2 zone_gotwritehandle lib/dns/zone.c:2559:4
    #3 dispatch lib/isc/task.c:1152:7
    #4 run lib/isc/task.c:1344:2

    Mutex M2 previously acquired by the same thread here:
    #0 pthread_rwlock_rdlock <null>
    #1 isc_rwlock_lock lib/isc/rwlock.c:48:3
    #2 zone_gotwritehandle lib/dns/zone.c:2552:2
    #3 dispatch lib/isc/task.c:1152:7
    #4 run lib/isc/task.c:1344:2

    Thread T1 (running) created by main thread at:
    #0 pthread_create <null>
    #1 isc_thread_create lib/isc/pthreads/thread.c:73:8
    #2 isc_taskmgr_create lib/isc/task.c:1434:3
    #3 create_managers bin/named/main.c:915:11
    #4 setup bin/named/main.c:1223:11
    #5 main bin/named/main.c:1523:2

    SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) in pthread_rwlock_wrlock

(cherry picked from commit 1090876693)
2020-09-22 22:29:09 +10:00
Michał Kępień 44d81c1b0f Merge branch 'mnowak/pairwise-configure-testing-v9_11' into 'v9_11'
[v9_11] Add pairwise testing

See merge request isc-projects/bind9!4162
2020-09-22 10:08:44 +00:00
Michal NowakandMichał Kępień 90368d8e1d Add pairwise testing
Pairwise testing is a test case generation technique based on the
observation that most faults are caused by interactions of at most two
factors.  For BIND, its configure options can be thought of as such
factors.

Process BIND configure options into a model that is subsequently
processed by the PICT tool in order to find an effective test vector.
That test vector is then used for configuring and building BIND using
various combinations of configure options.

(cherry picked from commit 420986bf18)
2020-09-22 11:49:30 +02:00
Ondřej Surý 1b7d245189 Merge branch '2166-bind-9-16-7-trap-divide-error-v9_11' into 'v9_11'
Resolve "bind 9.16.7 trap divide error"

See merge request isc-projects/bind9!4153
2020-09-21 09:10:59 +00:00
Ondřej Surý f79692c831 Add CHANGES and release note for GL #2166
(cherry picked from commit 2869ca1401)
2020-09-21 11:02:22 +02:00
Ondřej Surý 98def35e72 Handle the errors from sysconf() call in isc_meminfo_totalphys()
isc_meminfo_totalphys() would return invalid memory size when sysconf()
call would fail, because ((size_t)-1 * -1) is very large number.

(cherry picked from commit 79ca724d46)
2020-09-21 10:59:36 +02:00
Ondřej Surý f12893d4a7 Merge branch '2163-threadsanitizer-data-race-lib-isc-mem-c-1119-19-in-isc___mem_put-v9_11' into 'v9_11'
Exclude isc_mem_isovermem from ThreadSanitizer

See merge request isc-projects/bind9!4144
2020-09-18 06:52:41 +00:00