mirror of
https://github.com/jmcorgan/fips.git
synced 2026-10-05 19:18:25 +00:00
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.
Reference
Information-oriented technical descriptions for lookup on demand. Reference content describes what is: wire formats, configuration keys, command-line flags, control-socket commands, default values, file paths, exit codes. It is consulted, not read end-to-end.
Reference is austere by design: minimal narrative, no opinions, no guidance on when to use a feature. The "why" lives in design/; the "how do I accomplish X" lives in how-to/.
Available Reference
| Document | Scope |
|---|---|
| wire-formats.md | All FMP and FSP message byte layouts, encapsulation walkthrough |
| configuration.md | Full YAML configuration reference for the daemon and gateway |
| security.md | nftables baseline, peer ACL, cryptographic primitives, rekey defaults, threat-resistance matrix |
| nostr-events.md | Kind 37195 advert, Kind 21059 traversal signaling, Kind 10050 inbox relays |
| transports.md | Per-transport statistics counter inventory |
| control-socket.md | Line-delimited JSON control protocol for the daemon and gateway |
| native-api.md | Native datagram API: the Rust surface, addressing and ports, errno table, ceilings, line protocol, command reference |
| cli-fips.md | fips daemon CLI: options, exit codes, environment, files |
| cli-fipsctl.md | fipsctl control-client: subcommands, options, exit codes |
| cli-fipstop.md | fipstop live-status TUI: tabs, keybindings |
| cli-fips-gateway.md | fips-gateway service CLI: options, exit codes, files |