Skip to content
Snippets Groups Projects
  1. Oct 23, 2020
  2. Oct 21, 2020
  3. Oct 20, 2020
  4. Oct 15, 2020
  5. Oct 09, 2020
    • Petr Špaček's avatar
      lib/cache: fix cache lock based on fcntl() · 1158e3c1
      Petr Špaček authored
      Fixes bug introduced in b65e8977.
      open() was creating a file which could not be open again because of
      insufficient permissions. This somehow worked because lockfile_release()
      unlinks the file, but it broke terribly if lockfile_release() was not
      called because of crash or something like that.
      
      Fixes: merge request !1042
      1158e3c1
  6. Oct 08, 2020
  7. Oct 07, 2020
    • Vladimír Čunát's avatar
      validator: avoid using RRSIG from a different packet · 9432a427
      Vladimír Čunát authored and Petr Špaček's avatar Petr Špaček committed
      Restrict tried RRSIGs by qry_uid equality.
      I see no use case against and it could be confusing.
      (Also rewrite the conditions around to positive form.)
      
      An assertion in cache noticed an NSEC with _SECURE rank but no RRSIG
      (in practice).  It was a side-effect of still not keeping RRSIGs with
      their RRs in some places.  It wasn't a security problem, as it doesn't
      really matter where the signatures came from.  Theoretically it
      might've lead to incorrect caching (missing usable RRSIGs), as cache
      was restricting qry_uid to match, but that hasn't been noticed
      in practice.
      9432a427
  8. Oct 02, 2020
    • Tomas Krizek's avatar
      modules/http: answer to /dns-query endpoint as well · b1677948
      Tomas Krizek authored
      When using DoH, it seems /dns-query is a more common convetion for
      an endpoint name. Let's use it in addition to /doh, since it doesn't
      hurt anything and makes kresd more alike the other DoH implementations
      out there. It'll also play more nicely with kdig, which uses /dns-query
      as default as well.
      b1677948
  9. Sep 09, 2020
  10. Sep 08, 2020
  11. Sep 01, 2020
  12. Aug 13, 2020
  13. Aug 10, 2020
  14. Aug 07, 2020
    • Vladimír Čunát's avatar
      validator: bottom->up chase DS if RRSIG(s) are missing · 703d918a
      Vladimír Čunát authored and Petr Špaček's avatar Petr Špaček committed
      This is about situations when validator *thinks* it's in a signed zone
      but an unsigned answer comes in. The assumption was that RRSIGs didn't
      make it through some middle-boxes and it retried with explicit QTYPE=RRSIG.
      
      There were two issues with that.
      1. It seems that in most cases the cause of the situation is that
         we skipped over a zone cut that transitioned to insecure state,
         so the signatures correctly don't exist.
      2. An explicit RRSIG query appears to be more trouble than worth;
         it seems reasonable for servers not to answer it (fully);
         see RFC 8482 sect. 7.
      
      The new approach simply tries to find a proof that the name is insecure,
      by spawning a QTYPE=DS sub-query on that name.  That fixes some
      real-life cases; usually this happens in iteration mode where one IP
      address serves zones on both sides of a cut that transitions to insecure.
      For details see new comments in that rrsig_not_found() function.
      
      The change resulted in the iterator fallback not making sense anymore
      so it was removed.
      703d918a
  15. Aug 06, 2020
  16. Aug 05, 2020
    • Vladimír Čunát's avatar
      daemon/lua: get rid of __engine symbol in lua · b7629c55
      Vladimír Čunát authored
      In particular this gets rid of last light user data inside kresd.
      
      It was still causing problems on some systems, for example Debian Sid.
      The error was the same: "bad light userdata pointer" from luajit,
      but note that the problem can still be triggered by lua libraries,
      e.g. cqueues.
      b7629c55
  17. Jul 27, 2020
  18. Jul 23, 2020
    • Vladimír Čunát's avatar
      validate: don't chase non-sensical signers · 468e762b
      Vladimír Čunát authored and Petr Špaček's avatar Petr Špaček committed
      When signer name isn't a prefix of owner, the signature does not make
      sense and it's no use trying to use that signer name in any way.
      
      We generally don't force queries on every level of the path,
      so this signer confusion could "introduce SERVFAILs" if we
      skip over a transition to insecure.
      468e762b
  19. Jul 16, 2020
  20. Jul 10, 2020
  21. Jul 03, 2020
    • Tomas Krizek's avatar
      daemon: don't drop capabilities when running as root · 15d5b3d1
      Tomas Krizek authored and Vladimír Čunát's avatar Vladimír Čunát committed
      When the effective user is root, no capabilities are dropped. This
      change has no effect when running as non-privileged user or when
      switching to non-privileged user via user() in config.
      
      Dropping capabilities as a root user resulted in the following
      unexpected behaviour:
      
      1. When using trust anchor update, r/w access to root keys is neeeded.
         These are typically owned by knot-resolver user. When kresd is
         executed as root and capabilities are dropped, this file was no longer
         writable, because it is owned by knot-resolver, not root.
      2. It is impossible to recreate/resize cache due to the same permission
         issue as above.
      
      If you want to drop capabilities when starting kresd as a root user,
      you can switch the user with the `user()` command. This changes the
      effective user ID and drops any capabilities as well.
      15d5b3d1
  22. Jun 30, 2020
  23. Jun 29, 2020
  24. Jun 25, 2020
  25. May 26, 2020
  26. May 25, 2020
  27. May 18, 2020
  28. May 08, 2020
  29. Apr 29, 2020
  30. Apr 27, 2020
  31. Apr 24, 2020
  32. Apr 22, 2020
    • Vladimír Čunát's avatar
      cache: fix CNAME caching when validation is disabled · f48773b7
      Vladimír Čunát authored
      This also fixes the same for DNAMEs - soon, when they get supported.
      
      Only the special case is changed - xNAMEs when no TAs exist.
      Overall the TA handling in kresd is buggy; fortunately in practice it
      seems very rare to run in other configuration than single root TA.
      f48773b7
  33. Apr 15, 2020
    • Petr Špaček's avatar
      lua: properly initialize random number generator · 4b7050ba
      Petr Špaček authored
      Formerly multiple instances could use the same seed,
      which prevented the retry logic in Lua modules (e.g. prefill) from
      retrying at different times.
      
      AFAIK security impact is zero aside from potential thundering-herd
      problem with many kresd instances.
      4b7050ba
Loading