Commit graph

29179 commits

Author SHA1 Message Date
Mark Andrews
7dd4fa9da3 enforce known SSHFP finger print lengths
(cherry picked from commit 1722728c80)
2019-05-09 08:48:28 +10:00
Mark Andrews
b99c0f93b1 Merge branch '991-provide-ixfr-should-only-be-tests-on-tcp-clients-v9_14' into 'v9_14'
Resolve "provide-ixfr should only be tested on TCP clients."

See merge request isc-projects/bind9!1900
2019-05-07 00:28:40 -04:00
Mark Andrews
7098238039 add CHANGES
(cherry picked from commit ba1d7f3a07)
2019-05-07 13:43:15 +10:00
Mark Andrews
227b49a830 add test for 'provide-ixfr no;' ; add forensics support
(cherry picked from commit d547465af5)
2019-05-07 13:43:14 +10:00
Mark Andrews
8c7052e1cf only test provideixfr if the transport is TCP
(cherry picked from commit 18c49853e3)
2019-05-07 13:43:14 +10:00
Mark Andrews
ea9083647e Merge branch '1005-filter-aaaa-crash-in-9-14-1-v9_14' into 'v9_14'
Resolve "filter-aaaa crash in 9.14.1"

See merge request isc-projects/bind9!1899
2019-05-06 21:19:35 -04:00
Mark Andrews
0b6a698320 add CHANGES
(cherry picked from commit bdc66eb5d9)
2019-05-07 11:07:32 +10:00
Mark Andrews
a0feec3dbc lock accesses to hash table
(cherry picked from commit 2483a8c76d)
2019-05-07 11:07:32 +10:00
Mark Andrews
dbbbed29e9 clear pointer before hash table
(cherry picked from commit 4886701c03)
2019-05-07 11:07:32 +10:00
Mark Andrews
b01ebf8168 Merge branch '983-delv-www-isc-org-any-rtrace-multiline-leaks-memory-v9_14' into 'v9_14'
Resolve "'delv www.isc.org ANY +rtrace +multiline' leaks memory"

See merge request isc-projects/bind9!1896
2019-05-06 20:39:34 -04:00
Mark Andrews
83310317c7 add CHANGES note
(cherry picked from commit ce5520b695)
2019-05-07 10:27:18 +10:00
Mark Andrews
3ebf1ddeb2 check that delv -t any works
(cherry picked from commit 6999bee7ef)
2019-05-07 10:27:18 +10:00
Mark Andrews
0e6a620432 fix whitespace
(cherry picked from commit 32ba5a0494)
2019-05-07 10:27:18 +10:00
Mark Andrews
2ffdbe9eff return rdatasets when processing ANY queries in client_resfind
(cherry picked from commit 127333c71f)
2019-05-07 10:27:18 +10:00
Evan Hunt
9c9b9ab651 Merge branch 'each-win32-parallel-tests-v9_14' into 'v9_14'
enable parallel system tests on windows

See merge request isc-projects/bind9!1894
2019-05-06 19:13:26 -04:00
Evan Hunt
df9cfeaf1b CHANGES
(cherry picked from commit d3cd0729c9)
2019-05-06 15:54:31 -07:00
Evan Hunt
96e0e38fcd move the test lists into conf.sh.common
there is now a common list of tests in conf.sh.common, with the
tests that are either unique to windows or to unix, or which are
enabled or disabled by configure or Configure, being listed in
separate variables in conf.sh.in and conf.sh.win32.

(cherry picked from commit a33237f070)
2019-05-06 15:54:31 -07:00
Evan Hunt
5755465c2f enable parallel system tests on windows
this moves the creation of "parallel.mk" into a separate shell script
instead of bin/tests/system/Makefile. that shell script can now be
executed by runall.sh, allowing us to make use of the cygwin "make"
command, which supports parallel execution.

(cherry picked from commit bbae24c140)
2019-05-06 15:54:30 -07:00
Evan Hunt
9fe5acc36b Merge branch 'each-simplify-stats-v9_14' into 'v9_14'
simplify the isc_stat structure to take avantage of atomics

See merge request isc-projects/bind9!1893
2019-05-06 17:13:17 -04:00
Evan Hunt
6925c8136d CHANGES
(cherry picked from commit f1aaf45085)
2019-05-06 14:02:41 -07:00
Evan Hunt
fb58d23a94 simplify the isc_stat structure to take avantage of atomics
(cherry picked from commit 4e5edb35e4)
2019-05-06 14:02:41 -07:00
Mark Andrews
3e052caca8 Merge branch '1000-arm-doc-rpz-nodata-policy-says-ancount-1-v9_14' into 'v9_14'
Resolve "ARM doc RPZ NODATA policy says ANCOUNT=1"

See merge request isc-projects/bind9!1890
2019-05-06 04:05:38 -04:00
Mark Andrews
756bb201bd A NODATA response has ANCOUNT of 0 assuming no CNAME/DNAMES
(cherry picked from commit 4889e06c3a)
2019-05-06 17:53:42 +10:00
Mark Andrews
63fe63c8c5 Merge branch 'marka-fix-changes' into 'v9_14'
move change 5190 above 9.14.1 release point.

See merge request isc-projects/bind9!1885
2019-04-29 18:54:05 -04:00
Mark Andrews
455472c817 move change 5190 above 9.14.1 release point. 2019-04-30 08:41:35 +10:00
Evan Hunt
0e30e6abaa Merge branch '956-fix-dnstap-test-v9_14' into 'v9_14'
attach memory context sooner so that cleanup will work correctly

See merge request isc-projects/bind9!1883
2019-04-26 19:10:32 -04:00
Evan Hunt
524d36bc2d attach memory context sooner so that cleanup will work correctly
(cherry picked from commit 0fd344e77a)
2019-04-26 15:53:48 -07:00
Ondřej Surý
60a834789e Merge branch '999-tcp-client-crash-v9_11-locks-v9_14' into 'v9_14'
Replace atomic operations in bin/named/client.c with isc_refcount reference counting

See merge request isc-projects/bind9!1880
2019-04-26 15:45:38 -04:00
Ondřej Surý
e203d4d65a Replace atomic operations in bin/named/client.c with isc_refcount reference counting
(cherry picked from commit ef49780d30)
2019-04-26 21:33:50 +02:00
Michał Kępień
bb258967c3 Merge branch 'michal/simplify-trailing-period-handling-in-system-tests-v9_14' into 'v9_14'
[v9_14] Simplify trailing period handling in system tests

See merge request isc-projects/bind9!1877
2019-04-26 15:12:11 -04:00
Michał Kępień
3b7bc3421c Simplify trailing period handling in system tests
Windows systems do not allow a trailing period in file names while Unix
systems do.  When BIND system tests are run, the $TP environment
variable is set to an empty string on Windows systems and to "." on Unix
systems.  This environment variable is then used by system test scripts
for handling this discrepancy properly.

In multiple system test scripts, a variable holding a zone name is set
to a string with a trailing period while the names of the zone's
corresponding dlvset-* and/or dsset-* files are determined using
numerous sed invocations like the following one:

    dlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"

In order to improve code readability, use zone names without trailing
periods and replace sed invocations with variable substitutions.

To retain local consistency, also remove the trailing period from
certain other zone names used in system tests that are not subsequently
processed using sed.

(cherry picked from commit da2c1b74ad)
2019-04-26 20:38:29 +02:00
Michał Kępień
e3a090e159 Merge branch 'michal/fix-rare-allow-query-system-test-failures-v9_14' into 'v9_14'
[v9_14] Fix rare "allow-query" system test failures

See merge request isc-projects/bind9!1876
2019-04-26 05:31:25 -04:00
Michał Kępień
027c6179a8 Make root zone data match root hints
In the "allow-query" system test, ns3 uses a root hints file which
contains a single entry for a.root-servers.nil (10.53.0.1).  This name
is not present in the root zone served by ns1, which means querying it
for that name and any type will yield an NXDOMAIN response.  When
combined with unfavorable thread scheduling, this can lead to ns3
caching an NXDOMAIN response for the only root server it is aware of and
thus to false positives for the "allow-query" system test caused by ns3
returning unexpected SERVFAIL responses.  Fix by modifying the root zone
served by ns1 so that authoritative responses to a.root-servers.nil
queries match the root hints file used by ns3.

(cherry picked from commit 978a0d2555)
2019-04-26 11:07:00 +02:00
Evan Hunt
9215d68c6b Merge branch '982-filter-aaaa-race-v9_14' into 'v9_14'
Resolve "filter-aaaa crash in 9.14.0"

See merge request isc-projects/bind9!1874
2019-04-26 03:44:38 -04:00
Evan Hunt
e4204809ed CHANGES
(cherry picked from commit ce8ad08a45)
2019-04-26 00:32:55 -07:00
Evan Hunt
8c1af0d3f5 associate a lock with the memory pool in the filter-aaaa plugin
(cherry picked from commit 4f4c18d643)
2019-04-26 00:32:55 -07:00
Ondřej Surý
1d6133277f Merge branch 'prep-release-v9_14' into 'v9_14'
Prep release v9 14

See merge request isc-projects/bind9!1872
2019-04-25 11:28:50 -04:00
Tinderbox User
586e085a71 doc rebuild
(cherry picked from commit b441152036)
2019-04-25 17:01:11 +02:00
Tinderbox User
02cbca91d7 prep 9.14.1
(cherry picked from commit c7004347bc)
2019-04-25 17:00:56 +02:00
Ondřej Surý
a6fac68b4f Merge branch '615-tcp-client-crash-v9_14-v9_14' into 'v9_14'
Resolve "tcp-clients mostly ineffective"

See merge request isc-projects/bind9!1870
2019-04-25 10:40:31 -04:00
Evan Hunt
228a29da4b CHANGES, release note
(cherry picked from commit 244e44af432121a05e0a308b7ccce96a8ecd28ab)
(cherry picked from commit 79fad84bf6)
2019-04-25 16:20:50 +02:00
Evan Hunt
86e9e54766 restore allowance for tcp-clients < interfaces
in the "refactor tcpquota and pipeline refs" commit, the counting
of active interfaces was tightened in such a way that named could
fail to listen on an interface if there were more interfaces than
tcp-clients. when checking the quota to start accepting on an
interface, if the number of active clients was above zero, then
it was presumed that some other client was able to handle accepting
new connections. this, however, ignored the fact that the current client
could be included in that count, so if the quota was already exceeded
before all the interfaces were listening, some interfaces would never
listen.

we now check whether the current client has been marked active; if so,
then the number of active clients on the interface must be greater
than 1, not 0.

(cherry picked from commit 02365b87ea0b1ea5ea8b17376f6734c811c95e61)
(cherry picked from commit cae79e1bab)
2019-04-25 16:20:50 +02:00
Evan Hunt
a78af2f1d3 refactor tcpquota and pipeline refs; allow special-case overrun in isc_quota
- if the TCP quota has been exceeded but there are no clients listening
  for new connections on the interface, we can now force attachment to the
  quota using isc_quota_force(), instead of carrying on with the quota not
  attached.
- the TCP client quota is now referenced via a reference-counted
  'ns_tcpconn' object, one of which is created whenever a client begins
  listening for new connections, and attached to by members of that
  client's pipeline group. when the last reference to the tcpconn
  object is detached, it is freed and the TCP quota slot is released.
- reduce code duplication by adding mark_tcp_active() function
- convert counters to stdatomic

(cherry picked from commit a8dd133d270873b736c1be9bf50ebaa074f5b38f)
(cherry picked from commit 4a8fc979c4)
2019-04-25 16:20:50 +02:00
Evan Hunt
a41c9dbfc1 better tcpquota accounting and client mortality checks
- ensure that tcpactive is cleaned up correctly when accept() fails.
- set 'client->tcpattached' when the client is attached to the tcpquota.
  carry this value on to new clients sharing the same pipeline group.
  don't call isc_quota_detach() on the tcpquota unless tcpattached is
  set.  this way clients that were allowed to accept TCP connections
  despite being over quota (and therefore, were never attached to the
  quota) will not inadvertently detach from it and mess up the
  accounting.
- simplify the code for tcpquota disconnection by using a new function
  tcpquota_disconnect().
- before deciding whether to reject a new connection due to quota
  exhaustion, check to see whether there are at least two active
  clients. previously, this was "at least one", but that could be
  insufficient if there was one other client in READING state (waiting
  for messages on an open connection) but none in READY (listening
  for new connections).
- before deciding whether a TCP client object can to go inactive, we
  must ensure there are enough other clients to maintain service
  afterward -- both accepting new connections and reading/processing new
  queries.  A TCP client can't shut down unless at least one
  client is accepting new connections and (in the case of pipelined
  clients) at least one additional client is waiting to read.

(cherry picked from commit 427a2fb4d17bc04ca3262f58a9dcf5c93fc6d33e)
(cherry picked from commit 0896841272)
2019-04-25 16:20:49 +02:00
Michał Kępień
010e6f4bd7 use reference counter for pipeline groups (v3)
Track pipeline groups using a shared reference counter
instead of a linked list.

(cherry picked from commit 31f392db20207a1b05d6286c3c56f76c8d69e574)
(cherry picked from commit 2211120222)
2019-04-25 16:20:49 +02:00
Witold Kręcicki
ef28e8879b tcp-clients could still be exceeded (v2)
the TCP client quota could still be ineffective under some
circumstances.  this change:

- improves quota accounting to ensure that TCP clients are
  properly limited, while still guaranteeing that at least one client
  is always available to serve TCP connections on each interface.
- uses more descriptive names and removes one (ntcptarget) that
  was no longer needed
- adds comments

(cherry picked from commit 9e74969f85329fe26df2fad390468715215e2edd)
(cherry picked from commit d7e84cee0b)
2019-04-25 16:20:49 +02:00
Witold Kręcicki
4ca208adb8 fix enforcement of tcp-clients (v1)
tcp-clients settings could be exceeded in some cases by
creating more and more active TCP clients that are over
the set quota limit, which in the end could lead to a
DoS attack by e.g. exhaustion of file descriptors.

If TCP client we're closing went over the quota (so it's
not attached to a quota) mark it as mortal - so that it
will be destroyed and not set up to listen for new
connections - unless it's the last client for a specific
interface.

(cherry picked from commit eafcff07c25bdbe038ae1e4b6660602a080b9395)
(cherry picked from commit 9e7617cc84)
2019-04-25 16:20:49 +02:00
Ondřej Surý
b128b54261 Merge branch '880-secure-asdfasdfasdf-abacadabra-crash-v9_14-v9_14' into 'v9_14'
Resolve "CVE-2019-6467: lib/ns/query.c:9176: INSIST(!qctx->is_zone) failed, back trace"

See merge request isc-projects/bind9!1867
2019-04-25 10:19:26 -04:00
Evan Hunt
31c690396d CHANGES, release note
(cherry picked from commit ab5473007e91f011d003ff0ba5ab32fa0d56360c)
(cherry picked from commit 404be59527)
2019-04-25 15:59:43 +02:00
Matthijs Mekking
6b22e1f4fe Fix nxdomain-redirect assertion failure
- Always set is_zonep in query_getdb; previously it was only set if
  result was ISC_R_SUCCESS or ISC_R_NOTFOUND.
- Don't reset is_zone for redirect.
- Style cleanup.

(cherry picked from commit a85cc641d7a4c66cbde03cc4e31edc038a24df46)
(cherry picked from commit 486a201149)
2019-04-25 15:59:43 +02:00