mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-10 08:37:02 +00:00
On two inbound msg3 outcomes the msg1-allocated inbound session index was dropped without returning it to the allocator: losing the dual-rekey tie-break (we keep our in-progress rekey and drop their msg3), and a duplicate handshake that resolves to a msg2 resend. Under repeated hits this slowly leaks index space. Free the index on both arms, matching the sibling reject arms. Add a test-only helper to backdate a peer's session-established instant, and two regression tests that drive a real second handshake into each arm and assert the index is returned to the allocator (both fail if the free is removed).