Skip to content
Snippets Groups Projects
  1. Dec 07, 2021
    • Libor Peltan's avatar
      tests: scenario of alg roll with offline KSK · 40ec91ca
      Libor Peltan authored and Daniel Salzman's avatar Daniel Salzman committed
      40ec91ca
    • Daniel Salzman's avatar
    • Robert Edmonds's avatar
      mod-dnstap: Fix corner case in "Restore the original query QNAME case" · 55663f09
      Robert Edmonds authored and Daniel Salzman's avatar Daniel Salzman committed
      Previously, after "mod-dnstap: Restore the original query QNAME case",
      the dnstap module would copy the original QNAME into the query packet
      buffer passed to the dnstap module, so that the originally cased query
      message would be written out to the dnstap logging stream.
      
      However, there are error conditions that can result in the query
      packet's 'qname_size' field being updated to a non-zero value (the
      question section was successfully parsed), but the packet was ultimately
      rejected.
      
      In the prepare_answer() function in src/knot/nameserver/process_query.c,
      there are several error return paths that prevent the 'orig_qname' field
      from being written by the call to memcpy(). In this case, the
      'orig_qname' field in the corresponding knotd_qdata_extra_t object will
      remain at an initialized (zeroed out) value.
      
      Before this patch, in some cases (e.g. in responses to some queries that
      return FORMERR), mod-dnstap would overwrite the QNAME in the query
      packet buffer with 'qname_size' bytes from the 'orig_qname' field. With
      'qname_size' set to a non-zero value (due to successful parsing of the
      QNAME) but with 'orig_qname' set to its original initialized (zeroed
      out) value, this would result in zeroing out the QNAME in the query
      packet buffer. This would then result in writing a corrupted query
      message into the dnstap logging stream.
      
      Since mod-dnstap writes directly to the query packet buffer rather than
      making a copy, this corruption would also be visible to modules
      executing after mod-dnstap as well as the rest of knotd.
      
      This patch updates mod-dnstap's msg_query_qname_restore() so that it
      avoids copying the original QNAME into the query packet buffer if the
      'orig_qname' field has been left in its initialized (zeroed out) value.
      
      fixes #777
      55663f09
  2. Dec 06, 2021
  3. Dec 04, 2021
  4. Dec 02, 2021
  5. Nov 29, 2021
  6. Nov 26, 2021
  7. Nov 24, 2021
  8. Nov 23, 2021
  9. Nov 22, 2021
  10. Nov 18, 2021
  11. Nov 15, 2021
  12. Nov 12, 2021