Add M10.9c-1 session fuzzing and in-process abuse tests
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (checks) (push) Successful in 17s
Foundation / checks (ecs) (push) Successful in 12s
Foundation / checks (client) (push) Successful in 1m47s
Foundation / checks (tsan) (push) Successful in 5m44s
Foundation / checks (network) (push) Successful in 13m29s
Foundation / checks (postgres) (push) Successful in 44m22s
Foundation / server-image (push) Successful in 31s
Foundation / postgres-tools (push) Successful in 1m34s
Foundation / image (push) Successful in 2m37s

ADR-0097. A libFuzzer target for session protocol v4, grants, tickets and
snapshot assembly (canonical re-encoding, verifiers always refuse, a
completed snapshot is applied), with the code under test compiled in, and
a seeded smoke CTest of the same target on every platform. Four
quic-sessions abuse tests measure an honest session tick by tick under a
Hello flood (garbage, untrusted grants, silence), a datagram flood, a
slow peer and a connect/disconnect storm; it keeps every snapshot and
receipt while connections and retained state stay bounded.

evo-session-probe run --grants FILE [--grant N] logs in from an existing
bundle (a dev renewal's) without an issuer key. client_lifecycle uses
SDL_getenv (MSVC rejected std::getenv).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-07 22:57:45 -04:00
co-authored by Claude Opus 5.5
parent fe43706395
commit 5f587f80e1
12 changed files with 597 additions and 26 deletions
+41
View File
@@ -5022,3 +5022,44 @@ Evidence: in the 2026-10-07 Gitea client run, all 13 CTest tests and the X11 pro
smokes passed; only the extra 32-cycle X11 invocation failed at `Application::open()`.
The same 32-cycle lifecycle test passed under SDL's dummy driver. The X11 failure did
not report its typed error, so the failing X11 backend stage was not established.
## 2026-10-07 — M10.9c-1 fuzzing and in-process abuse (ADR-0097)
Implemented:
- `tests/fuzz/session_fuzz.cpp` as a libFuzzer target (`evo-session-fuzz`, with the code
under test compiled in) and the seeded `session-fuzz-smoke` CTest (label `network`).
- Four `quic-sessions` abuse tests, each measuring an honest session tick by tick:
Hello flood, datagram flood, slow peer, and a connect/disconnect storm.
- `evo-session-probe run --grants FILE [--grant N]`, covered by the M10 process test.
- `tests/client_lifecycle.cpp` uses `SDL_getenv`: MSVC rejected `std::getenv`
(deprecation warning as error) from `1204750`, which CI cannot see (no Windows runner).
Results:
- **libFuzzer** (Clang 19, ASan and UBSan): 35.6 million inputs, then 23.3 million after
the snapshot-application assertion was added, 5 minutes each. Coverage 1541, then 1650;
no crash or sanitizer report.
- **Smoke:** 68,000 inputs per run.
- **Hello flood:** 160 peers. Every connected one was refused with the right reason
(52 `protocol`, 51 `unauthenticated`, 50 `timeout`), connections peaked at 29 of 32,
and the honest session kept 60 of 60 snapshots and receipts.
- **Datagram flood:** 1920 intentions accepted by the sender, of which 1914 were refused
by the throttle. Garbage closed the peer with `protocol`, and the honest session kept
40 of 40.
- **Slow peer:** retained entities peaked at 392 against a bound of 490, and the honest
session kept 80 of 80.
- **Storm:** 120 logins (69 seen established). The region returned to one session and one
connection, and the honest session kept 60 of 60.
- **evolution-dev, with the renewal's bundle:** grant 0 was welcomed (epoch 51), and its
first intention and an action were admitted. Nothing is simulated there outside a drill
(`REGION_INPUTS` is empty by policy), so there were no outcomes or snapshots.
Executed:
- **Linux GCC 14:**
- presets `quic` and `network` 5/5;
- `postgres-check.sh` with QUIC, all 18 suites, with the probe's bundle login.
- **Linux Clang 19:** clang-tidy 19 on the fuzz target and smoke, `quic_sessions.cpp`, the
probe and the M10 process tests (8 findings fixed); clang-format 19.
- **Windows MSVC 19.44:** presets `quic` 5/5 and `client-network` 15/15.
Not done (10.9c-2): lease loss with 20 or more bots, and a live raw-UDP sender of mutated
datagrams that loads the server's per-connection datagram cap.