AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 19 Bitcoin

fix(simulator): return password error on PIN mismatch in SimulatorLoadAccountSecret

Public commit record

What the developer wrote

Authored by soralit

85/100 · Strong
fix(simulator): return password error on PIN mismatch in SimulatorLoadAccountSecret

SimulatorLoadAccountSecret returned SUCCESS even when the stored password
did not match. This made the duplicate-PIN check (CheckPasswordExisted ->
VerifyAccountPassword) always treat any new PIN as a duplicate of an
existing account, so setting a PIN for the second account and onwards
failed with 'Duplicate PIN code detected'.

Return ERR_KEYSTORE_PASSWORD_ERR on mismatch, matching the real-device
behavior (LoadAccountSecretFromSE returns ERR_KEYSTORE_AUTH on HMAC
failure, which VerifyAccountPassword maps to ERR_KEYSTORE_PASSWORD_ERR).
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in the firmware's simulator (a software stand-in used for testing, not the real hardware wallet). When checking a stored account password/PIN, the simulator was accidentally returning 'success' even when the password did not match. That caused the wallet to wrongly think every new PIN was already in use, blocking users from creating a second or later account in simulator builds. The fix makes the simulator return a password-error code on mismatch, matching how the real device behaves. It is a functional bug fix in test-only code, not a security vulnerability in the real wallet.

Recommended action

No security response required. Treat as a normal functional bug fix in simulator/test code. Verify that simulator integration tests for multi-account creation now pass and that real-device behavior is unchanged.

Security signals we found

01

Incorrect success return on authentication failure in simulator-only code

02

Mismatch between simulator and real-device authentication error semantics

03

Functional regression in multi-account PIN creation in simulator builds

Risk score

Why this scored 19/100

Our methodology →
Potential impact 3/30
Exploitability 0/25
Stealth signal 1/15
Affected reach 2/15
Confidence 9/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.