1. 22 Apr, 2024 1 commit
    • Dridi Boukelmoune's avatar
      hash: Close an expiry loophole · 08d4e804
      Dridi Boukelmoune authored
      The opposite of 'EXP_Ttl(req, oc) > req->t_req' should not have been
      'EXP_Ttl(NULL, oc) < req->t_req'. If we somehow enter the lookup when
      the two operands are equal, the objcore suffers a phenomenon known as
      Schrödinger's expiry.
      
      The chances of running into this scenario range from epsilon to 100%.
      
      Because 't_req' is stable across restarts, a soft purge will reliably
      trigger this case.
      
      Test case by Alve Elde who first demonstrated the problem.
      08d4e804
  2. 09 Apr, 2024 1 commit
  3. 08 Apr, 2024 1 commit
  4. 04 Apr, 2024 4 commits
  5. 29 Mar, 2024 14 commits
  6. 25 Mar, 2024 3 commits
    • AlveElde's avatar
      purge: Use EXP_Reduce() instead of EXP_Rearm() · e676f779
      AlveElde authored
      When a stale object is soft-purged, the time until the object expires
      should not be reset, as repeated soft-purges could keep the object
      around indefinitely.
      e676f779
    • AlveElde's avatar
      expire: Introduce EXP_Reduce() · 9c0abf0c
      AlveElde authored
      This commit introduces EXP_Reduce(), a function to reduce object timers.
      The goal is to provide a function better suited to soft-purging objects,
      as EXP_Rearm() has some non-obvious disadvantages when used or this
      purpose.
      
      When EXP_Rearm() is used to soft-purge an object by setting its TTL to
      0, the expiry is effectively reset to the start of the objects grace
      period. This happens because the object TTL includes a time delta
      between object insertion time (oc->t_origin) and now. The result is that
      a soft-purge extends the lifetime of an already stale object, and
      repeated soft-purges can keep the object away from expiry indefinitely.
      
      The EXP_Reduce() function is better suited for soft-purging, as it only
      updates an objects TTL if it would reduce the objects lifetime. The
      function also has facilities for reducing grace and keep.
      9c0abf0c
    • Dridi Boukelmoune's avatar
  7. 20 Mar, 2024 1 commit
    • Walid Boudebouda's avatar
      varnishncsa: Reduce CTX.gen overflow likelihood · 13fe897f
      Walid Boudebouda authored
      If a format never matches anything, the 4294967296th transaction
      proccessed by varnishncsa will wrap its generation around to zero,
      be considered a match, and let vsb_fcat() pass a null string to
      VSB_quote().
      13fe897f
  8. 19 Mar, 2024 1 commit
  9. 18 Mar, 2024 14 commits