1. 14 Sep, 2020 4 commits
  2. 11 Sep, 2020 8 commits
  3. 10 Sep, 2020 4 commits
  4. 09 Sep, 2020 3 commits
  5. 08 Sep, 2020 2 commits
  6. 07 Sep, 2020 5 commits
    • Dridi Boukelmoune's avatar
      cli: Document more heredoc pitfalls · c31d071e
      Dridi Boukelmoune authored
      c31d071e
    • Dridi Boukelmoune's avatar
      vtc: Test case for #3402 · 9d8cfbee
      Dridi Boukelmoune authored
      9d8cfbee
    • delthas's avatar
      vbe: Update the poll timeout before polling-reading in backend probes · 4e7d6633
      delthas authored
      Varnish uses a global per-probe timeout for backend probes. When reading
      the backend response, Varnish tries to poll and read in a loop, until a
      poll timeouts, the streams EOFs or there is an error.
      
      The poll is supposed to timeout when the per-probe timeout ends. This is
      currently setup so that `t_end` is the deadline for the probe, set when
      the function starts, then the poll waits until `t_end`.
      
      Previously, the poll timeout was never updated, and was always set to
      `t_end - t_now` without updating `t_now`, which means that it was
      effectively a between-bytes timeout instead of a proper per-probe
      timeout.
      
      This fixes this issue by updating `t_now` before updating the
      `t_end - t_now` timeout so that the timeout passed to poll effectively
      corresponds to a deadline of `t_end`.
      
      See the issue fixed by this commit for more details.
      
      Fixes: #3402
      4e7d6633
    • Poul-Henning Kamp's avatar
      Constify · ba98c093
      Poul-Henning Kamp authored
      ba98c093
    • Poul-Henning Kamp's avatar
      Return Flexelint to sanity wrt. Reserved WSs. · fe8602b4
      Poul-Henning Kamp authored
      Give WS_Reservation() the same "always return non-NULL or assert"
      semantics WS_Front() had because literally every single caller which
      uses the ->f pointer fails to check for NULL.
      
      Introduce a new internal WS_IsReserved() for use in the asserts
      which check if a reservation is active, but which doesn't otherwise
      care for the ->f pointer, and the single instance of non-WS code
      which (possibly) legitimatly does variant processing depending on
      the reservation state.
      fe8602b4
  7. 05 Sep, 2020 1 commit
    • Pål Hermunn Johansen's avatar
      Document correctly vcl_hit built-in VCL · 7872e817
      Pål Hermunn Johansen authored
      It has been a while since the built-in vcl_hit changed, and this
      updates the user guide.
      
      Since 6.0.1 we have had the corresponding change in TTL, grace, keep
      change, and this is also mentioned.
      7872e817
  8. 01 Sep, 2020 5 commits
  9. 31 Aug, 2020 8 commits
    • Dridi Boukelmoune's avatar
      Missing ssize_t definition · 7d3aee03
      Dridi Boukelmoune authored
      7d3aee03
    • Dridi Boukelmoune's avatar
      changelog: Fix and sort ticket references · c70b159a
      Dridi Boukelmoune authored
      Spotted by @gquintard
      c70b159a
    • Dridi Boukelmoune's avatar
      http: Remove redundant WS_MarkOverflow() · 3aac3b67
      Dridi Boukelmoune authored
      It used to be relevant before we had WS_Id().
      3aac3b67
    • Dridi Boukelmoune's avatar
      vary: Prevent a buffer overflow in VRY_Validate() · e0cb8d32
      Dridi Boukelmoune authored
      We might read past the end of the workspace when no space was available
      at reservation time. This would normally go unnotticed since we used to
      get zeros after the end of workspace marker, and no assertion would
      trigger. It became visible with the previous commit for pointer-aligned
      workspace sizes like the current page-aligned default values.
      
      Initially caught by wssan from #3320.
      
      Fixes #3319
      e0cb8d32
    • Dridi Boukelmoune's avatar
      ws: Put canaries all the way to the end of the workspace · 4537efef
      Dridi Boukelmoune authored
      It might help catch more buffer overflows, although we still only check
      the first byte.
      4537efef
    • Dridi Boukelmoune's avatar
      sess: Forbid the reserved "no attribute" offset · b2ffd1a9
      Dridi Boukelmoune authored
      The offset must be strictly lower than 0xffff, otherwise subsequent get
      and set operations will ignore it. Instead of panicking, we release the
      workspace and carry on if that happens.
      
      This is only for correctness' sake, the probability to run into this is
      epsilon.
      b2ffd1a9
    • Dridi Boukelmoune's avatar
      ws: Ban direct access to the workspace id · 23f8e340
      Dridi Boukelmoune authored
      From this point on, only cache_ws.c fiddles with struct ws, which needs
      to remain visible in order to be embeddable in other data structures. We
      have an API covering all use cases in tree, except vmod_vtc operations
      that violate the contract to provide a rudimentary dump in VCL for test
      purposes.
      
      Inline functions provided in headers aren't considered a problem here.
      23f8e340
    • Dridi Boukelmoune's avatar
      ws: Move the workspace panic dump to cache_ws.c · 758b4bf4
      Dridi Boukelmoune authored
      The goal is to avoid direct field access inside struct ws outside of
      cache_ws.c and open the possibility to perform a hexdump of a corrupted
      allocation in the future, when wssan panics while checking red zones.
      
      This effectively completes the ban of direct field access to the front,
      start and reservation pointers outside of cache_ws.c, and since the
      devil is in the details cache_http.c directly touches the id field and
      vmod_vtc also accesses the 3 aforementioned pointers.
      758b4bf4