Skip to content

Move Caddy off the 2.11.4 pin once a release fixes the HTTP/2 request-body crash #989

Closed

Description

@koniecdev

Problem

Both servers run an older Caddy on purpose: version 2.11.4, fixed by digest. The newest Caddy (2.11.6) crashes under load we really hit, so #988 stopped it from updating. A pin that nobody moves stays behind on every later security fix, and nothing in the repo will ever move it on its own.

Why

Caddy 2.11.6 crashes when a backend dies while a request body is still being sent to it (upstream caddyserver/caddy#8106, still open on 2026-10-03). It took the staging box down on 2026-10-02. Dependabot does not watch compose files, so no pull request will ever offer a newer Caddy.

Fix

When a Caddy release that closes caddyserver/caddy#8106 is out, move the pin to that release by digest.

Not workable until that upstream release exists. Check the upstream issue first. If it is still open, stop.

Technical part

  • The pin lives in two places that must move together:
    • compose.hetzner.yaml: the x-caddy-image anchor (used by caddy and caddy-validate).
    • compose.prod.yaml: the caddy service (laptop parity stack).
  • Also update the ingress row in docs/deployment/runbook.md and the comment above the anchor.
  • Get the digest with docker buildx imagetools inspect caddy:<version>-alpine (the index digest).
  • Proof before the PR: docker run --rm <pinned ref> caddy version shows the new version, and the gate passes on the real Caddyfile: docker compose -f compose.hetzner.yaml --env-file <env> --profile validate run --rm --no-deps caddy-validate.
  • After the deploy: ssh lotro-staging 'docker exec lotro-staging-caddy-1 caddy version', then the same on lotro-prod after promotion.
  • If a Caddy security release ships while #8106 is still open, raise this ticket's priority and decide then whether 2.11.4 is still the safer choice.

Acceptance criteria

Activity

  1. added
    priority-low
    type-infra
    on Oct 3, 2026
  2. koniecdev commented on Oct 3, 2026

    @koniecdev
    OwnerAuthor

    Another way to do this, raised by the review on #988, and left for the owner to decide:

    Add a docker-compose package-ecosystem entry to .github/dependabot.yml, with an ignore for caddy 2.11.6. Then a Caddy release that fixes caddyserver/caddy#8106, or a later security release, shows up as a pull request. Nobody has to remember this ticket.

    Why it was not done in #988: the entry would also watch every other image in the compose files (RabbitMQ, the observability images, postgres, and the :latest images in the dev and parity stacks). It would also add a fourth weekly Dependabot pull request, and the file's header says the target is three (nuget, github-actions, docker). That is a policy change, not part of a crash fix.

  3. koniecdev commented on Oct 3, 2026

    @koniecdev
    OwnerAuthor

    Verdict: BLOCKED — not workable yet (checked 2026-10-03)

    The Caddy fix this ticket waits for is not released yet. There is no version to move the pin to.

    Security check (the ticket's last bullet). 2.11.6 has security fixes that 2.11.4 does not have. I checked each one against our two Caddyfiles (.docker/hetzner/Caddyfile, .docker/caddy/Caddyfile):

    • GHSA-6365-7ppr-5r92 (medium, fixed in 2.11.5): it needs forward_auth together with reverse_proxy. Neither Caddyfile uses forward_auth.
    • The path_regexp backslash fix (the rest of CVE-2026-52844): it is about Windows paths, and we use no path_regexp.
    • The FastCGI HTTPoxy fix: we use no FastCGI.
    • Every other published Caddy advisory is already fixed in 2.11.4.

    So 2.11.4 is still the safer choice, and the priority stays as it is.

    No branch and no code. I did not close the ticket; that is the owner's call. Run this ticket again when a Caddy release closes #8106.

    Still open for the owner: the Dependabot docker-compose idea in the comment above. It would make this ticket unnecessary to remember.

  4. koniecdev commented on Oct 4, 2026

    @koniecdev
    OwnerAuthor

    Verdict: READY (checked 2026-10-04)

    The fix this ticket waits for is now released.

    Lane: S (a pin moves in two compose files plus two doc lines), but the proof is the larger part.

    Plan

    1. Move x-caddy-image (compose.hetzner.yaml) and the caddy image (compose.prod.yaml) to caddy:2.11.7-alpine@sha256:<index digest>, and update the comment above the anchor and the runbook ingress row.
    2. Check 2.11.7 against what 2.11.6 changed and 2.11.4 did not have. These are now permanent, not just the crash:
      • request headers capped at 16 KiB (a logged-in frontend request carries the auth cookie with the saved tokens);
      • header names with a dot are dropped;
      • 1-minute idle timeouts on request body reads and response writes;
      • stricter Caddyfile validation.
    3. Proof: caddy version, the caddy-validate gate on the real Hetzner Caddyfile, and a real sign-in through 2.11.7 with the cookie size measured.

    Assumptions: none yet. If one of the breaking changes hits our traffic, I will report it here and not move the pin.

  5. koniecdev commented on Oct 4, 2026

    @koniecdev
    OwnerAuthor

    Verdict: BLOCKED again: the Docker image is not out yet (checked 2026-10-04)

    This comment replaces the READY comment above. Caddy has released the fix. But we cannot pin to it yet, because the Docker image for that release does not exist.

    • Caddy v2.11.7 (GitHub release, 2026-10-03) fixes the crash.
    • The official Docker image caddy:2.11.7-alpine is not published.
      • docker buildx imagetools inspect caddy:2.11.7-alpine answers not found.
      • caddy:2-alpine and caddy:2.11-alpine still point to 2.11.6.
    • The PR that publishes the image is caddy: v2.11.7 release docker-library/official-images#22416.
      • It has been open since 2026-10-03 06:16 UTC.
      • Its alpine build is green. A Windows build failed.
      • No docker-library maintainer has merged it yet.
      • We cannot make this go faster.

    No branch and no code. The ticket stays open.

    Checked already, so the next run is only the pin bump

    Caddy 2.11.6 brought breaking changes that 2.11.4 does not have. 2.11.7 keeps all of them. When we move off 2.11.4, these changes stay with us for good. So I checked each one against our traffic.

    I used the caddy:2.11.6-alpine image for the checks, because it has the same changes as 2.11.7.

    2.11.6+ change Result
    Request headers are limited to 16 KiB. A bigger request gets 431. Fits, with more than 2x room.
    Header names with a . are dropped. Not affected.
    1-minute idle timeouts on body reads and response writes. Not affected on 2.11.7.
    Stricter Caddyfile validation. Passes.
    Changes to the method matcher, client_auth on a wildcard site, handle_path/strip_prefix, forward_auth, map and FastCGI. Not affected.

    Details for each row:

    • 16 KiB header limit.
      • The frontend keeps the OIDC tokens in its auth cookie (SaveTokens = true). So the cookie is the biggest header.
      • I signed in as the seeded admin in the browser E2E stack and measured the cookies.
      • Frontend origin: 5 cookies, 5,456 bytes in the Cookie header. The auth cookie is split into two chunks of 3,986 and 1,161.
      • Auth origin: 1,072 bytes.
      • All headers of a signed-in request to the auth origin: 1,604 bytes.
    • Header names with a dot.
      • No custom header name in src/ of LOTRO or TheKittySaver has a dot.
      • Examples: X-LOTRO-*, X-TKS-*, X-Correlation-ID, ...
    • 1-minute idle timeouts.
    • Stricter validation.
      • caddy validate on .docker/hetzner/Caddyfile, with a staging-like env and the obs vhost on: valid.
      • caddy adapt on .docker/caddy/Caddyfile: valid.
      • Both pass on 2.11.6, the same as on 2.11.4.
    • The other changes. None of these directives is in either Caddyfile.

    For the next run

    1. Run docker buildx imagetools inspect caddy:2.11.7-alpine.
      • If it still answers not found, stop.
      • If a newer 2.11.x is out, take the newest one. First read its release notes for new breaking changes.
    2. Put the index digest into two places:
      • x-caddy-image in compose.hetzner.yaml.
      • The caddy service in compose.prod.yaml.
    3. Update two texts:
    4. Run the proof from the ticket body again with the new image: caddy version and the caddy-validate gate.

    Ticket report

    Shipped: nothing. The ticket is blocked, because there is no caddy:2.11.7-alpine image to pin to yet.
    Proof:

    Assumptions:

    • TheKittySaver sits behind the same Caddy. It uses the same OIDC cookie setup, lifted from the same code (SaveTokens = true).
    • I assume its cookie has a similar size. I did not measure it.
    • Risk: low. Its claims would need to be about 10 KB larger to reach the limit.

    Doubts:

    • The measured cookie belongs to the seeded admin, who has the most roles.
    • A user with many more claims would have a larger cookie. Nothing in the product adds claims like that today.

    Follow-ups:

    • None filed.
    • The Dependabot docker-compose idea from the first comment is still the owner's call. With it, a new Caddy release would open a PR on its own, and nobody would have to check by hand.
  6. koniecdev commented on Oct 4, 2026

    @koniecdev
    OwnerAuthor

    The Dependabot idea from the first comment is now its own ticket: #1001. It watches only the caddy image in the compose files. When caddy:2.11.7-alpine comes out, its first pull request does the pin bump for this ticket.

  7. koniecdev commented on Oct 6, 2026

    @koniecdev
    OwnerAuthor

    Verdict: READY (checked 2026-10-07)

    The blocker from the last comment is gone: docker-library/official-images#22416 was merged on 2026-10-05, so caddy:2.11.7-alpine now exists.

    Lane: S.

    Plan

    1. Move x-caddy-image (compose.hetzner.yaml) and the caddy service (compose.prod.yaml) to caddy:2.11.7-alpine@sha256:d8542f48….
    2. Update the comment above the anchor and the runbook ingress row.
    3. Proof: caddy version, the caddy-validate gate on the Hetzner Caddyfile, caddy adapt on the parity Caddyfile.

    New in 2.11.7, checked against our Caddyfiles: the Incremental header (a 501 only with request_buffers/response_buffers; we use neither, and no app sends the header), empty placeholders for missing cookies (we use no cookie or TLS placeholder; our one respond is a bare respond 404), and Set-Cookie in a JSON set (we use the Caddyfile). The 2.11.6 breaking changes were already checked in the comment above.

    Assumptions: none.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority-lowtype-infra

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions