Commit Graph

32042 Commits

Author SHA1 Message Date
Ondřej Surý
c978d3efdf Skip the large TCP assertion failure test in the CI environment 2020-09-02 13:11:10 +02:00
Ondřej Surý
d1643772eb Reorder the response reading in packet.pl to not fill TCP buffers 2020-09-02 12:46:43 +02:00
Mark Andrews
02be5fc953 Dump the returned packet 2020-09-02 12:46:43 +02:00
Ondřej Surý
92df4ba652 Multiply 1996-alloc_dnsbuf-crash-test.pkt by 300000 via TCP
The test for assertion failure via large TCP packet needs to be repeated
multiple times (we use 300000).  This commit fixes the input file to be
properly hexlified and uses the new packet.pl -r feature to send it
300000 times via TCP.

(cherry picked from commit 5f6eb014aa)
2020-09-02 12:46:43 +02:00
Ondřej Surý
4dc666d474 Add -r <repeats> option to packet.pl
For some tests, we need to send big data streams (for TCP) or repeated
packets (for UDP), this commits adds `-r` option to packet.pl that sends
the same input <repeats> times using the specified protocol.

(cherry picked from commit dd46559a19)
2020-09-02 12:46:43 +02:00
Ondřej Surý
677e569dda Properly format 2037-pk11_numbits-crash-test.pkt file
(cherry picked from commit 22e0272063)
2020-09-02 12:46:43 +02:00
Mark Andrews
9b735298c2 Merge branch '2054-dig-bufsize-0-sets-bufsize-to-4096' into 'v9_16'
Resolve "dig +bufsize=0 sets bufsize to 4096" (9.11/9.16)

See merge request isc-projects/bind9!3891
2020-09-02 09:37:38 +00:00
Mark Andrews
0dc04cb901 dig +bufsize=0 failed to disable EDNS as a side effect. 2020-09-02 09:07:55 +00:00
Michał Kępień
e991f6ca9e Merge branch 'michal/fix-the-forward-system-test-on-windows' into 'v9_16'
Fix the "forward" system test on Windows

See merge request isc-projects/bind9!4060
2020-09-02 08:44:48 +00:00
Michał Kępień
665dcfae5f Fix the "forward" system test on Windows
Make the "forward" system test work on Windows again by fixing a
backporting glitch in commit 544ea41224.
2020-09-02 10:01:29 +02:00
Mark Andrews
bcfa5f1593 Merge branch '2081-data-race-in-zonemgr_test-v9_16' into 'v9_16'
Resolve "data race in zonemgr_test"

See merge request isc-projects/bind9!4056
2020-09-02 02:02:29 +00:00
Mark Andrews
debb5f3994 Add CHANGES note
(cherry picked from commit ca1b0f1539)
2020-09-02 11:40:09 +10:00
Mark Andrews
e460d83dbb isc_ratelimiter needs to hold a reference to its task
to prevent the task subsystem shutting down before the
ratelimiter is freed.

(cherry picked from commit b8e4b6d303)
2020-09-02 11:39:36 +10:00
Mark Andrews
e7e5a2fa6b Merge branch '2049-cleanup-sock-v9_16' into 'v9_16'
remove unused variable sock

See merge request isc-projects/bind9!4052
2020-09-01 22:59:32 +00:00
Mark Andrews
489b99b65c remove unused variable sock
(cherry picked from commit b1c424ddf3)
2020-09-02 08:41:11 +10:00
Mark Andrews
8df297f34a Merge branch '2096-isc_refcount_decrement-needs-acquire-release-memory-ordering-v9_16' into 'v9_16'
Use memory_order_acq_rel in isc_refcount_decrement.

See merge request isc-projects/bind9!4048
2020-09-01 13:09:35 +00:00
Mark Andrews
1af9cf78bd Use memory_order_acq_rel in isc_refcount_decrement.
While

if (isc_refcount_decrement() == 1) {	// memory_order_release
	isc_refcount_destroy();		// memory_order_acquire
	...
}

is theoretically the most efficent in practice, using
memory_order_acq_rel produces the same code on x86_64 and doesn't
trigger tsan data races (which use a idealistic model) if
isc_refcount_destroy() is not called immediately.  In fact
isc_refcount_destroy() could be removed if we didn't want
to check for the count being 0 when isc_refcount_destroy() is
called.

https://stackoverflow.com/questions/49112732/memory-order-in-shared-pointer-destructor
(cherry picked from commit 6278899a38)
2020-09-01 22:24:52 +10:00
Michał Kępień
4f949e5c5b Merge branch '2075-add-T-maxcachesize-command-line-option-v9_16' into 'v9_16'
[v9_16] Add "-T maxcachesize=..." command line option

See merge request isc-projects/bind9!4046
2020-08-31 22:10:26 +00:00
Michał Kępień
894b7a8345 Use "-T maxcachesize=2097152" in all system tests
In order to lower the amount of memory allocated at startup by named
instances used in the BIND system test suite, set the default value of
"max-cache-size" for these to 2 megabytes.  The purpose of this change
is to prevent named instances (or even entire virtual machines) from
getting killed by the operating system on the test host due to excessive
memory use.

Remove all "max-cache-size" statements from named configuration files
used in system tests ("checkconf" notwithstanding) to prevent confusion
as the "-T maxcachesize=..." command line option takes precedence over
configuration files.

(cherry picked from commit dad6572093)
2020-08-31 23:42:38 +02:00
Michał Kępień
3f25b8e608 Add "-T maxcachesize=..." command line option
An implicit default of "max-cache-size 90%;" may cause memory use issues
on hosts which run numerous named instances in parallel (e.g. GitLab CI
runners) due to the cache RBT hash table now being pre-allocated [1] at
startup.  Add a new command line option, "-T maxcachesize=...", to allow
the default value of "max-cache-size" to be overridden at runtime.  When
this new option is in effect, it overrides any other "max-cache-size"
setting in the configuration, either implicit or explicit.  This
approach was chosen because it is arguably the simplest one to
implement.

The following alternative approaches to solving this problem were
considered and ultimately rejected (after it was decided they were not
worth the extra code complexity):

  - adding the same command line option, but making explicit
    configuration statements have priority over it,

  - adding a build-time option that allows the implicit default of
    "max-cache-size 90%;" to be overridden.

[1] see commit aa72c31422

(cherry picked from commit 9ac1f6a9bc)
2020-08-31 23:41:24 +02:00
Ondřej Surý
3abbbead55 Merge branch '1996-deferred-system-test-v9_16' into 'v9_16'
[CVE-2020-8620] Fix TCP DNS buffer sizes [TEST] [v9.16]

See merge request isc-projects/bind9!4044
2020-08-31 12:03:28 +00:00
Ondřej Surý
9d3c6785b5 Add PoC for assertion failure on large TCP DNS messages
(cherry picked from commit 2c796bb9c8)
2020-08-31 13:38:17 +02:00
Ondřej Surý
651a9fe4db Merge branch '1997-deferred-system-test-v9_16' into 'v9_16'
[CVE-2020-8621] Ensure QNAME minimization is permanently disabled when forwarding [TEST] [v9.16]

See merge request isc-projects/bind9!4042
2020-08-31 10:33:26 +00:00
Evan Hunt
544ea41224 test whether DS chasing works correctly when forwarding
(cherry picked from commit dd8db89525)
2020-08-31 12:00:13 +02:00
Ondřej Surý
22b0af0cf2 Merge branch '2037-deferred-system-test-v9_16' into 'v9_16'
[CVE-2020-8623]: Fix crash in pk11_numbits() with crafted packet when native-pkcs11 is used [TEST] [v9.16]

See merge request isc-projects/bind9!4040
2020-08-31 09:50:37 +00:00
Ondřej Surý
f195c192a6 Add PoC system test for pk11_numbits() assertion
(cherry picked from commit a69433ba40)
2020-08-31 10:58:56 +02:00
Ondřej Surý
e7dca64cf7 Merge branch '2028-deferred-system-test-v9_16' into 'v9_16'
[CVE-2020-8622] Properly handle malformed truncated responses to TSIG queries [TEST] [v9.16]

See merge request isc-projects/bind9!4035
2020-08-31 07:24:41 +00:00
Mark Andrews
6acd6ae943 check that a malformed truncated response to a TSIG query is handled
(cherry picked from commit 8bbf3eb5f3)
2020-08-31 08:35:30 +02:00
Ondřej Surý
d723209185 Merge branch '1928-handle-EPROTO-v9_16' into 'v9_16'
Resolve "error: socket.c:1540: unexpected error:"

See merge request isc-projects/bind9!4032
2020-08-28 18:50:38 +00:00
Ondřej Surý
cc07b3f78a Add CHANGES and release note for GL #1928
(cherry picked from commit 4722196b13)
2020-08-28 20:49:02 +02:00
Ondřej Surý
9b9fee13fa Handle EPROTO errno from recvmsg
It was discovered, that some systems might set EPROTO instead of EACCESS
on recvmsg() call causing spurious syslog messages from the socket
code.  This commit returns soft handling of EPROTO errno code to the
socket code. [GL #1928]

(cherry picked from commit e0380d437d)
2020-08-28 20:49:01 +02:00
Ondřej Surý
3751e24e9e Merge branch '2104-fix-off-by-one-error-in-rehash_bits-v9_16' into 'v9_16'
Resolve "Bind 9.16.6 due to assertion failure"

See merge request isc-projects/bind9!4031
2020-08-28 18:48:41 +00:00
Ondřej Surý
be46c49300 Add CHANGES and release notes for GL #2104
(cherry picked from commit d47d2b3fe0)
2020-08-28 20:43:39 +02:00
Ondřej Surý
2b08ff879a Fix off-by-one error when calculating new hashtable size
When calculating the new hashtable bitsize, there was an off-by-one
error that would allow the new bitsize to be larger than maximum allowed
causing assertion failure in the rehash() function.

(cherry picked from commit 78543ad5a7)
2020-08-28 20:43:38 +02:00
Michal Nowak
0d964dfc4b Merge branch '2097-manual-page-tools-need-updating-v9_16' into 'v9_16'
[v9_16] Resolve "manual page tools need updating."

See merge request isc-projects/bind9!4022
2020-08-26 16:31:25 +00:00
Michal Nowak
5082d60105 Fix generated documentation 2020-08-26 16:30:04 +00:00
Michal Nowak
934c470b54 Add pandoc and w3m
pandoc and w3m are needed to generate some files.
2020-08-26 16:30:04 +00:00
Ondřej Surý
cd38e92c48 Merge branch '2074-bind-allows-an-empty-cm-value-for-optional-loc-rdata-fields-v9_16' into 'v9_16'
Resolve "BIND allows an empty 'cm' value for optional LOC RDATA fields"

See merge request isc-projects/bind9!4024
2020-08-26 15:31:38 +00:00
Mark Andrews
d8cb5ac0db Add CHANGES note
(cherry picked from commit d9594cffab)
2020-08-26 16:44:01 +02:00
Mark Andrews
c2ee9eea3a Refactor totext_loc
(cherry picked from commit 2ca4d35037)
2020-08-26 16:44:01 +02:00
Mark Andrews
baf93342d0 Correctly encode LOC records with non integer negative altitudes.
(cherry picked from commit 337cc878fa)
2020-08-26 16:44:01 +02:00
Mark Andrews
06b76b2b16 Check LOC's altitude field is properly parsed and encoded.
(cherry picked from commit 888dfd78c7)
2020-08-26 16:44:00 +02:00
Mark Andrews
7eb5d61703 Tighten LOC parsing to reject period and/or m as a value.
(cherry picked from commit 9225c67835)
2020-08-26 16:44:00 +02:00
Mark Andrews
92a13be6a0 Merge branch '2080-data-race-in-rdataset_addglue-v9_16' into 'v9_16'
Resolve "data race in rdataset_addglue"

See merge request isc-projects/bind9!4020
2020-08-26 12:18:35 +00:00
Mark Andrews
c37fd4ac56 Add CHANGES note
(cherry picked from commit 48973c3ec6)
2020-08-26 21:51:33 +10:00
Ondřej Surý
5674f76590 Use the Fibonacci Hashing for the RBTDB glue table
The rbtdb version glue_table has been refactored similarly to rbt.c hash
table, so it does use 32-bit hash function return values and apply
Fibonacci Hashing to lookup the index to the hash table instead of
modulo.  For more details, see the lib/dns/rbt.c commit log.

(cherry picked from commit 01684cc219)
2020-08-26 21:49:59 +10:00
Mark Andrews
511747307f rbtversion->glue_table_size must be read when holding a lock
(cherry picked from commit 33d0e8d168)
2020-08-26 21:49:59 +10:00
Michal Nowak
b1526940f4 Merge branch 'mnowak/tumbleweed-fix-krb5-config-location-v9_16' into 'v9_16'
[v9_16] Tumbleweed changed location of krb5-config

See merge request isc-projects/bind9!4018
2020-08-26 09:04:45 +00:00
Michal Nowak
9a305e0d47 Tumbleweed changed location of krb5-config
krb5-config is now in /usr/bin/ and we should detect it automatically.

(cherry picked from commit 6095811461)
2020-08-26 10:59:29 +02:00
Ondřej Surý
48c757eb79 Merge branch '2095-shifting-large-rcode-in-dns-message-c-results-in-undefined-behaviour-v9_16' into 'v9_16'
Cast the original rcode to (dns_ttl_t) when setting extended rcode

See merge request isc-projects/bind9!4014
2020-08-25 19:00:50 +00:00