Skip to content

Merge to master - #177

Merged
iartemov-ledger merged 29 commits into
masterfrom
develop
Jun 3, 2026
Merged

iartemov-ledger merged 29 commits into
masterfrom
develop

Conversation

@iartemov-ledger

@iartemov-ledger iartemov-ledger commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

scan-build issues will be fixed on the SDK side: LedgerHQ/ledger-secure-sdk#1579

github-actions Bot and others added 29 commits April 27, 2026 07:53
Reject INS_MANAGE_SEEDWORDS when P2 exceeds WORDS_MAX_LENGTH or when
24*P2 overflows MONERO_IO_BUFFER_LENGTH. Without this check, an
attacker-controlled P2 is used as both loop bound and stride into
io_buffer, enabling out-of-bounds reads/writes that corrupt adjacent
transaction state, keys, and UI buffers.

Made-with: Cursor
- INS_OPEN_TX now rejects any P1/P2 other than P1=1,P2=0, preventing
  attacker-controlled values from propagating into tx_state_p1/p2 via
  update_protocol() and skipping the validation/UI flow.
- MLSAG and CLSAG guards are split into separate protocol and state
  checks so that the state requirement (INS_VALIDATE or same signing
  family) is always enforced regardless of protocol version.

Made-with: Cursor
Track whether the device-computed transaction prehash (mlsagH) appears
in the CLSAG hash stream and reject at finalization if it was absent.
Unlike MLSAG where the prehash is the first element and can be injected
directly, CLSAG places the message at position 2n+2 in the c_to_hash
vector (after ring keys and commitments), so a presence check across all
chunks is used instead. This ensures a malicious host cannot substitute
the approved transaction with a different CLSAG signature transcript.

Made-with: Cursor
… backup display (by removing the whole functionality - it's not used by SW Wallets and never ported on large screen devices)
- CLSAG/MLSAG preparation multiplies secret scalars by untrusted points without subgroup checks
- Small-subgroup point accepted in monero_ecmul_k leaks internal view key bits via INS_SECRET_SCAL_MUL_KEY
from monero_client.crypto.hmac import hmac_sha256
from monero_client.utils.varint import encode_varint
from monero_client.utils.utils import get_nano_review_instructions
from monero_client.exception import SecurityChangeAddress
@iartemov-ledger
iartemov-ledger merged commit f93f9d8 into master Jun 3, 2026
111 of 117 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants