Summary
ClearSession does not abort an in-flight Bitcoin signing state machine, and the branch's signing_abort() does not fully scrub the signing key material it does own.
Found while auditing PR #604 at exact head 1d446ccbc9cf32a6e499990e65bcf7b358f1325b.
Evidence
lib/firmware/messagemap.def:15-20 registers SignTx, TxAck, and ClearSession as independently dispatchable inbound messages.
lib/board/messages.c:122-139 dispatches any mapped message directly; it has no expected-message-type gate for an active signing session.
lib/firmware/fsm.c:300-303 handles ClearSession by calling only session_clear(true) and returning success.
- By contrast Initialize and Cancel call
signing_abort() (fsm_msg_common.h:1-10, :582-590).
lib/firmware/signing.c:96 holds the current raw private key in file-static privkey[32], populated at :1857.
signing_abort() at :2151-2159 wipes node and the root pointer itself, but not privkey, transaction/hash state, or the HDNode referenced by root.
Closed issues #452/#546 record the private-key/root fixes on alpha; those fixes are absent from this 7.14.3 head.
Impact
High — authorization loss is not a signing boundary. After transaction approval and before the final streamed TxAck, a host can clear the session and continue the still-live signer. Separately, abort leaves a spend key resident for the boot lifetime.
Acceptance criteria
Summary
ClearSessiondoes not abort an in-flight Bitcoin signing state machine, and the branch'ssigning_abort()does not fully scrub the signing key material it does own.Found while auditing PR #604 at exact head
1d446ccbc9cf32a6e499990e65bcf7b358f1325b.Evidence
lib/firmware/messagemap.def:15-20registersSignTx,TxAck, andClearSessionas independently dispatchable inbound messages.lib/board/messages.c:122-139dispatches any mapped message directly; it has no expected-message-type gate for an active signing session.lib/firmware/fsm.c:300-303handlesClearSessionby calling onlysession_clear(true)and returning success.signing_abort()(fsm_msg_common.h:1-10,:582-590).lib/firmware/signing.c:96holds the current raw private key in file-staticprivkey[32], populated at:1857.signing_abort()at:2151-2159wipesnodeand therootpointer itself, but notprivkey, transaction/hash state, or the HDNode referenced byroot.Closed issues #452/#546 record the private-key/root fixes on
alpha; those fixes are absent from this 7.14.3 head.Impact
High — authorization loss is not a signing boundary. After transaction approval and before the final streamed
TxAck, a host can clear the session and continue the still-live signer. Separately, abort leaves a spend key resident for the boot lifetime.Acceptance criteria
ClearSession, lock, wipe, Initialize, and Cancel invoke one central Bitcoin signing teardown before reporting success.ClearSessionat everyTxRequeststage and proves every laterTxAckis rejected with no signature/serialization.