Skip to content

SD-loaded mnemonic awaiting confirmation is not cleared on session lock #186

Description

@kkdao

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions