interplane.Get Omega
Read in your language

open-humanity

Privacy-first peer assistance network for sovereign autonomous agents

Brought by drakestapleton

[CRYPTO-REUSE] Preserve replay protection when the packet-ID cache reaches capacity

Closed · #29 · open 2026-10-23 10:53 UTC · closed 2026-11-05 22:25 UTC (reason completed)

Imported from GitHub aien-dev/open-humanity#29, by drakestapleton

drakestapleton wrote on 2026-10-23 10:53 UTC

Problem

At inspected main b368ea8f7dcfbc4e7f21d4a9911e4c1c24409440, crates/beacon-core/src/crypto.rs::ReplayProtector::check_and_record clears the complete seen set at capacity. With capacity 2, A, B, C, A accepts the second A. Source searches found helper use in tests, not an established live transport call path; this is a helper-level security weakness, not a demonstrated production exploit.

Part of https://github.com/aien-dev/omega-mv/issues/639. Reconcile current callers before patching. Existing trace-publication work #27 should consume the corrected behavior; this does not implement that protocol.

Change

Keep the fix small: return a distinct typed capacity refusal while retaining all recorded IDs. Define capacity zero, capacity one and duplicate-at-capacity behavior. Do not silently evict IDs or reset history. Document that this is a bounded per-session helper: a restart or explicit new instance needs a higher-level authenticated freshness/session rule.

An LRU alone is not replay protection. If a sliding window is necessary for a real caller, separately define authenticated session identity, monotonic sequence and stale-window rejection before adopting it. Do not invent a new wire protocol for this fix.

Acceptance

  • Deterministic capacity-2 regression: after A and B, C is refused for capacity; replayed A/B still return replay errors.
  • Zero/one capacities, duplicates before/at capacity, repeated overflow attempts and maximum retained length have explicit assertions.
  • Original clear-on-full behavior restored as a negative mutant is caught by the replay/capacity assertion.
  • Audit all callers and error handling; document any production reachability found, without extrapolating from exported APIs.
  • Existing crypto/transport tests pass through the repository's local test policy.
  • Record exact source, command, expected/observed outcomes and mutant evidence for the shared gate. Explain the bounded contract and how to reproduce it.

Do not change live transport's existing sequential-record replay protection or add background persistence.

No comments.

Sign in to comment