Repository navigation
redteam: Phase 4 part 2 — the stream/gRPC suite - #336
Merged
Merged
Conversation
The stream/grRPC suite (docs/redteam-plan.md rows rt-4-3, rt-4-4, rt-11-3, rt-2-9 — the rt-2-2 Phase-4 deferral), all four green solo: - rt-4-3 BLOCKED (11/11): read-cred oversized PollFlatRecords answered PermissionDenied at the method ACL (before the 4 MB cap is even reachable); admin-cred oversized answered ResourceExhausted; a 10x20 reading storm cost a linear 299 goroutines, 1.1 M records, no leak (71->299->71). - rt-11-3 CONFIRMED (11/11): the strongest RT-11 crossover — ONE never-reading authenticated FlatRecords stream took the catcher 1993 -> 0 lines/6s (flatRecordServiceSend's blocking per-client Send runs per record on the decode hot path; no Send timeout exists); the API stayed 200 (the tier-2 split), recovery <=6s, no leak. Product finding pinned: decouple the fan-out (S2). - rt-4-4 BLOCKED (11/11): RSS slope -17 KiB/s under 4 paced readers (the OOM axis holds) and the backpressure finding — the catcher collapsed 1494 -> 0 lines/6s with EXACTLY 32 records in 240 s (the paced wedge; same root cause as rt-11-3). RT_SOAK=1h env-gates the plan's 1 h soak. - rt-2-9 CONFIRMED (7/7): stream-expiry carry-over — 2158/2200 records flowed ~50 s past the skew-0 window (the interceptor authorizes once at stream open); file-don't-fix, ops note recorded (key rotation does not break held-open streams). Harness: new static tool grpcstorm (storm/oversize/wedge/paced/HMAC shapes) in the attacker tools tar; new XTCP2_PPROF deploy axis (a loopback, token-gated debug listener on 9090 for goroutine-count asserts); vm_push now removes a stale .incoming left by a failed push (the disk-full recovery found one mode-0444 that blocked the retry).
The findings backlog rows now carry their issue numbers: the flatRecordServiceSend fan-out decoupling (#337 — rt-11-3/rt-4-4), the dead skew default (#338 — rt-2-2), tcpDest reconnect (#339 — the harness finding, rt-4-7/rt-11-5 next), SetEnvelopeFlush upper bound (#340 — rt-3-4), the rt-7-2 bootstrap-integrity + gauge findings (#341), the telemetry amplifier (#342 — rt-4-1), and the rt-2-3 CLI typo residual (#343).
…boundary The matrix run (20261125T195100) failed rt-2-2's in-minute replay: the mint landed at :44 (inside the old 05..45 guard), the apt-get + 8s tcpdump window pushed the replay to :11 of the NEXT minute — correctly 401 under skew 0, so the assert raced the boundary, not the product. Fix: land the mint in seconds 05..18 (the mint -> scrape -> tcpdump -> replay sequence needs ~35s of runway inside the mint's minute) and retry the mint+capture once if a slow provision still crosses. The out-minute 401 behavior itself is unchanged (that is the defense, and assert 7 pins it). Re-verified solo 10/10 (mint :05, scrape :15, replay :27 — all in-minute); the other 29 matrix rows passed unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 4 part 2 — the stream/gRPC suite
Rows rt-4-3, rt-4-4, rt-11-3, rt-2-9 (the rt-2-2 Phase-4 deferral). All four green solo; the full-matrix regression runs alongside this PR (
redteam-matrix, 30 scenarios).Verdicts
flatRecordServiceSend's blocking per-client Send on the decode hot path, no Send timeout); API stays 200; recovery ≤ 6 s; no leakThe pinned product finding (S2)
flatRecordServiceSend(pkg/xtcp/grpc_flatRecordService.go:231) runs per record on the decode hot path (deserialize.go:274) and does a blocking per-clientstream.Sendunder a per-stream mutex. A read credential with one never-reading (or slow-reading)FlatRecordsstream backpressures the entire decode fleet — envelopes never complete and the destination goes dark while the API stays 200. Fix direction: a Send timeout or a decoupled fan-out (buffered per-stream channel, drop-on-full).Harness
XTCP2_PPROFdeploy axis — a loopback, token-gatedserves=debuglistener on 9090 for goroutine-count asserts (observability axis, not a surface change).incomingthat blocked its own retry (found via the disk-full recovery); removed first now