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

keystore: more consistent treatment of keystore_unlock errors

Public commit record

What the developer wrote

Authored by Marko Bencun

73/100 · Adequate
keystore: more consistent treatment of keystore_unlock errors

Before, the device would be reset right after the 10th wrong
password. However, if there was any other error during unlock (e.g. a
securechip error) that is not caused by a wrong password, the device
would not be reset immediately, but at the start of the next unlock
attempt.

This commit unifies all error treatment, leading to a device reset
right away.

The alternative is to decrement the counter on any error other than
incorrect password, but that would drastically change the behavior of
the unlock function, and we'd rather be conservative here.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This firmware update fixes a timing inconsistency in how the BitBox02 hardware wallet handles device-unlock failures. Previously, only a wrong password triggered an immediate device reset after 10 failed attempts, while other unlock errors (such as a secure-chip malfunction) delayed the reset until the next unlock attempt. Now any serious unlock error causes the reset right away, making behavior more predictable and preventing a window where a failing secure chip could leave the device in an ambiguous state.

Recommended action

Treat as a hardening/defensive fix and include in the next firmware release. Review whether any callers rely on the previous delayed-reset behavior, and verify that reset_reset(false) is safe to invoke from every error path covered by the new branch. Regression-test secure-chip error injection to confirm the device resets immediately and does not allow further unlock attempts.

Security signals we found

01

Inconsistent error handling between wrong-password and other unlock failures

02

Delayed device reset on secure-chip or decryption errors

03

Potential state ambiguity after non-password unlock errors

04

Refactor centralizes unlock-failure handling and immediate reset behavior

Risk score

Why this scored 59/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 8/15
Affected reach 10/15
Confidence 7/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.