FM_002 · Unbounded pagination cookie state under repeated discover requests
FM_002 — Unbounded pagination cookie state under repeated discover requests
Description
Server-side pagination that persists cookies/cursors per request can become a remote memory amplification vector when cookie state has no enforced bound.
Trigger
- A remote peer sends repeated DISCOVER-style requests.
- Each request creates a new server-side pagination cookie entry.
- No cap/eviction/expiry budget is enforced.
Preconditions
- pagination state is stored server-side
- cookie creation is reachable via protocol-compliant traffic
- cookie registry has no hard upper bound
Failure mechanism (step-by-step)
- Request arrives and pagination state is generated.
- New cookie is inserted into cookie registry.
- Registry size increases monotonically with each request.
- Remote caller controls growth rate by request volume.
Symptoms
- monotonically increasing cookie registry size
- cookie count exceeds configured safety budget
- memory pressure grows with request volume
Violated invariants
- INV_006 — remote request-driven state growth must remain bounded.
- INV_005 — failure mode must be machine-detectable.
Detection
cookie_count > max_cookie_budget- monotonic
cookie_countgrowth under repeated unauthenticated requests
Recovery / prevention strategy
- enforce hard cookie-state budget (
MAX_COOKIES_TRACKED) - deterministic eviction policy when budget is exceeded (FIFO in this lab)
Acceptance criteria
test_repro_fm002.pydemonstrates cookie growth exceeds budget without guardrailtest_prevent_fm002.pyproves cookie count stays within budget with guardrail
Notes
This FM intentionally models mechanism only (state budget boundary), not protocol implementation details.