Repository navigation
Conversation
A software reset leaves DRAM as it was, so the restart that ends a session did not erase the stacks that held the seed. Zero the free heap at boot, restart on any declined timeout instead of unwinding through screens that repaint secrets, and reject a generation with no required events.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A software reset leaves DRAM as it was. The restart that ends a wallet session was trusted to erase it, but the previous session's stacks are heap memory and survived the reset, mnemonic included.
scrub_free_heapinseedtool_platform_esp.c). FreeRTOS already fills every new task stack on creation, so the free heap is what can still hold the old session.seedtool_generaterejects a source/word-count pair with no required events, which used to produce a seed from SHA256(""), and zeroes its output on every error.seedtool_transcriptchecks its buffers.Verified with: host self-test (new test for the generate/transcript cases), ASan/UBSan build, Python tests, firmware built twice in
espressif/idf:v5.5.4with the ELF audit andcmp. Not yet run on hardware: the boot scrub still needs a flashed board to confirm a marker left in RAM is gone after a restart.