1. 13 May, 2019 2 commits
  2. 09 May, 2019 5 commits
  3. 26 Apr, 2019 2 commits
  4. 25 Apr, 2019 15 commits
    • Ondřej Surý's avatar
      Merge branch '615-tcp-client-crash-v9_12-v9_12_4_patch-v9_12' into 'v9_12' · a3a6947a
      Ondřej Surý authored
      Resolve "tcp-clients mostly ineffective"
      
      See merge request !1873
      a3a6947a
    • Evan Hunt's avatar
      CHANGES, release note · bf393051
      Evan Hunt authored
      (cherry picked from commit ef15f7360784c5ec7341f3e4856a759cf1e2aedb)
      (cherry picked from commit 802600b1)
      bf393051
    • Evan Hunt's avatar
      restore allowance for tcp-clients < interfaces · 8413996d
      Evan Hunt authored
      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 71fead4c3e03b178d6e6e3ff7592b45cf5f94069)
      (cherry picked from commit 78565872)
      8413996d
    • Evan Hunt's avatar
      refactor tcpquota and pipeline refs; allow special-case overrun in isc_quota · 43aec6ee
      Evan Hunt authored
      - 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 atomic
      
      (cherry picked from commit 7e822237)
      (cherry picked from commit 86a7d4c1)
      43aec6ee
    • Evan Hunt's avatar
      better tcpquota accounting and client mortality checks · 8141be26
      Evan Hunt authored
      - 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 c7394738)
      (cherry picked from commit 7d6518aa)
      8141be26
    • Michał Kępień's avatar
      use reference counter for pipeline groups (v3) · 42f65ae3
      Michał Kępień authored
      Track pipeline groups using a shared reference counter
      instead of a linked list.
      
      (cherry picked from commit 72eb9275)
      (cherry picked from commit 890dbb82)
      42f65ae3
    • Witold Krecicki's avatar
      tcp-clients could still be exceeded (v2) · df0cb0a7
      Witold Krecicki authored
      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 a43fe7cd)
      (cherry picked from commit 7278b66c)
      df0cb0a7
    • Witold Krecicki's avatar
      fix enforcement of tcp-clients (v1) · ab43e6ca
      Witold Krecicki authored
      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 9ef6eb4c)
      (cherry picked from commit 264384fb)
      ab43e6ca
    • Ondřej Surý's avatar
      Merge branch '880-secure-asdfasdfasdf-abacadabra-crash-v9_12_4_patch-v9_12' into 'v9_12' · 911a4589
      Ondřej Surý authored
      Resolve "CVE-2019-6467: lib/ns/query.c:9176: INSIST(!qctx->is_zone) failed, back trace"
      
      See merge request !1869
      911a4589
    • Evan Hunt's avatar
      CHANGES, release note · 47ca855b
      Evan Hunt authored
      (cherry picked from commit 82b03ce2)
      47ca855b
    • Matthijs Mekking's avatar
      Fix nxdomain-redirect assertion failure · 5f6bc840
      Matthijs Mekking authored
      - 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 3352270bdbbb39b167072aa282c6b310ffd96a7d)
      (cherry picked from commit e2500c60)
      (cherry picked from commit 4f00c86e)
      5f6bc840
    • Matthijs Mekking's avatar
      Add test for nxdomain-redirect ncachenxdomain · 844d83c3
      Matthijs Mekking authored
      (cherry picked from commit 8dc43bc9fe934a0b4729cb1c467e62a73a11ebad)
      (cherry picked from commit 6093cc06)
      (cherry picked from commit 21c7c65b)
      844d83c3
    • Ondřej Surý's avatar
      Merge branch '892-fix-redirect-name-v9_12_4_patch-v9_12' into 'v9_12' · aeae941a
      Ondřej Surý authored
      Resolve "pass the correct name to redirect and redirect2"
      
      See merge request !1866
      aeae941a
    • Mark Andrews's avatar
      add CHANGES · 626a1324
      Mark Andrews authored
      (cherry picked from commit 29b792a1)
      626a1324
    • Mark Andrews's avatar
      use client->query.qname · 0581fb56
      Mark Andrews authored
      (cherry picked from commit 8758d36a)
      (cherry picked from commit e7826648)
      (cherry picked from commit 7c94f4b8)
      0581fb56
  5. 17 Apr, 2019 2 commits
  6. 21 Mar, 2019 3 commits
  7. 20 Mar, 2019 3 commits
  8. 27 Feb, 2019 2 commits
  9. 21 Feb, 2019 6 commits