Independent alpha audit remediation: signing, storage, entropy, and CI evidence - #587
Conversation
Resolve #526 by routing PIN and recovery permutations through checked uniform draws, wiping outputs on health failure, and clearing recovery mnemonic state on early finalization exits.
Resolve #530 by separating each static bytes field exact schema capacity from its aligned repeated-field stride, rejecting the alignment padding byte without corrupting descriptor iteration.
Resolve #531 by routing confirm_data through the length-aware byte pager so non-ASCII OP_RETURN data is not silently truncated and exact payload length remains authoritative.
Resolve the native coverage portion of #516 with positive add/remove liquidity tests that approve every screen and prove third-party recipients reach completion.
|
Follow-up audit remediation added after opening this PR:
|
|
Independent follow-up completed:\n\n- #448 and duplicate #461 are now closed with a cryptographic regression at 616b8d3 proving the reviewed Solana message slice is exactly the signed slice for the optional zero-prefixed wire form.\n- #462 is closed: alpha commit da73417 fails both legacy and versioned oversized-account layouts as malformed; the boundary suite covers 33 and 256 accounts.\n- Python base CI was already red in run 32677388920 on three post-RC18 tests. a388ddef adds precise 7.16 firmware gates to the MAYA exactly-one-message, Ironwood empty-Orchard, and 72-byte multisig hardening tests. These checks were implemented by alpha commits 71e6c1d and 40da090 after RC18, so skipping only those cases on RC18 restores an honest compatibility lane without weakening current-alpha coverage. |
|
Audit update at c6fe3a0: the firmware-dependent Python multisig regression was removed from standalone python-keepkey CI and replaced with a native pure-predicate regression at the exact fee-accounting boundary. Pinned Docker compilation passed. Targeted Signing.MultisigQuorumMustBeBoundedBeforeFeeAccounting passed; full native suite ran 520 tests with 517 passing and only the three known local token-table/transform baseline failures. LLVM 20 formatting and git diff checks pass. Python PR #56 is restored to a tree-equivalent state to its previously passing a388ddef head and has fresh CI running. |
|
CI is red at head 78731bc: Root cause:
This isn't a regression from anything else in this PR — Required remediation (matches the existing bitcoin-only exemption pattern, doesn't touch firmware): exempt Do not merge #587 at the current head until this resolves. |
|
Final independent audit reconciliation:\n\n- Merged head: |
Outcome
Independent alpha remediation produced while observing and checking the looping auditor. The review reproduced its findings in pinned Docker, found additional signing/report defects, filed them on the fork tracker, and repaired both firmware and the companion Python harness.
Security fixes
setupbefore line 179 reads it #523-PIN-KDF per-device salt is never drawn: it is 32 zero bytes on every device initialized after storage V2 and after every WipeDevice #525)bytesfield decode one byte longer than its .options max_size #530, Nanopb bytes-capacity fix leaves oneof and fixed-count descriptor initializers misaligned #596)Evidence and CI fixes
Verification
7d3cf278e61a8fc7497721216a072eaf302b486b/ python-keepkeyb9ab241cdf9f3c7fb8c097dcacaba4cb5620299f: exit 04641244f57af0967e7b97ca1aeb149b20aba54d38e59e4c58c8e59150426bdcfdd27eac9b6bb65a9is tree-identical to the green Python head; final firmware head ise4ec5317dCompanion PR: BitHighlander/python-keepkey#59
Closes #398
Closes #400
Closes #446
Closes #449
Closes #457
Closes #516
Closes #523
Closes #524
Closes #525
Closes #526
Closes #529
Closes #530
Closes #531
Closes #532
Closes #558
Closes #559
Closes #560
Closes #588
Closes #594
Closes #595
Closes #596
Closes #597
Closes #598
Closes #599
Closes #600
Closes #601
Closes #602
Closes #603
Closes #605
Closes #606