Checked on master 5ef4db5.
scan_load_content() does not register scan_page_destroy() with session cleanup, unlike scan_page_create(). The SD load page registers its own destructor, but that only destroys the file browser.
Consequently, loading a mnemonic through Home → Load and leaving “Replace current key?” unanswered until inactivity lock leaves scan_ctx.scanned_mnemonic allocated. The lock clears the screen and active wallet, but does not wipe this pending mnemonic.
Reproduction: start a fresh session, load a wallet, open a different mnemonic from SD, and let the confirmation screen time out.
Expected: session lock wipes and releases the pending mnemonic and clears the scan context.
This is separate from #184: that concerns key_confirmation.c; this concerns the SD entry into scan.c. Verified by tracing the current code; hardware reproduction remains pending.
Additional validation: a focused host test using the actual SD-load, mnemonic-handler, session-cleanup and lock functions reproduced the pending mnemonic remaining intact after lock. Adding cleanup registration in scan_load_content() made the test pass. UI and cryptographic dependencies were stubbed; this was not a full simulator or physical-device test.
Checked on master
5ef4db5.scan_load_content()does not registerscan_page_destroy()with session cleanup, unlikescan_page_create(). The SD load page registers its own destructor, but that only destroys the file browser.Consequently, loading a mnemonic through Home → Load and leaving “Replace current key?” unanswered until inactivity lock leaves
scan_ctx.scanned_mnemonicallocated. The lock clears the screen and active wallet, but does not wipe this pending mnemonic.Reproduction: start a fresh session, load a wallet, open a different mnemonic from SD, and let the confirmation screen time out.
Expected: session lock wipes and releases the pending mnemonic and clears the scan context.
This is separate from #184: that concerns
key_confirmation.c; this concerns the SD entry intoscan.c. Verified by tracing the current code; hardware reproduction remains pending.Additional validation: a focused host test using the actual SD-load, mnemonic-handler, session-cleanup and lock functions reproduced the pending mnemonic remaining intact after lock. Adding cleanup registration in
scan_load_content()made the test pass. UI and cryptographic dependencies were stubbed; this was not a full simulator or physical-device test.