Files
fips/.github/workflows
Johnathan Corgan 26b733ca95 Clear a connection's handshake slot when its whole handshake state leaves the machine
Taking the handshake state off a connection's control machine moved it
out with Option::take, which writes only the None marker and leaves the
old bytes in place. On promotion the machine lives on as the active
peer's control machine, so its slot kept the session's two traffic keys
for as long as the peer stayed connected; the cross-connection and
stale-connection paths left the same copy behind. The slot is now
cleared as the state leaves, as it already is when a completed
handshake or a rekeyed session leaves its own slot.

The three callers unwrap the result at once, which the clearing
helper's documentation says can leave a second copy on the stack. That
copy is a move like any other and is outside what the clearing covers;
clearing in the one shared method still covers the heap slot for every
caller. The security reference now lists this move among the cleared
ones.

The new residue test reads the emptied slot's bytes, which only means
something in an optimised build: in a debug build the None written by
Option::take carries uninitialised stack bytes either way. It is
therefore release-only, and the release library-test step in GitHub CI
and local CI, which only compiled the tests before, now also runs it by
exact name and fails if it did not run.
2026-10-02 04:10:49 +00:00
..