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

fix(core): don't fail `try_get_ctx_ids()` when invoked via UI

Public commit record

What the developer wrote

Authored by Roman Zeyde

95/100 · Strong
fix(core): don't fail `try_get_ctx_ids()` when invoked via UI

It prevented device wipe from happening on T3W1 when recovery was aborted.
Also, adapt the test to create a new THP client after wipe.

[no changelog]
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a bug in the Trezor hardware wallet firmware where a function called try_get_ctx_ids() would crash when triggered through the device's user interface rather than over the wire protocol. The crash blocked device wipe from completing on the T3W1 model if a recovery process was aborted. The fix catches the missing-wire-context case and returns no IDs instead of raising an exception, allowing the wipe to proceed. There is no direct evidence in the commit that this is exploitable by an attacker; it appears to be a reliability/functional bug fix.

Recommended action

Treat as a functional bug fix with low security risk. Review whether any other UI-invoked callers of get_context() or try_get_ctx_ids() need similar hardening, and verify that returning None from try_get_ctx_ids() does not bypass intended authorization checks in THP session handling.

Security signals we found

01

Unhandled exception in context-lookup helper function

02

UI-invoked code path lacked wire context, causing flow abort

03

Device wipe blocked on T3W1 after aborted recovery

04

Fix catches NoWireContext and returns None safely

Risk score

Why this scored 30/100

Our methodology →
Potential impact 8/30
Exploitability 3/25
Stealth signal 4/15
Affected reach 5/15
Confidence 7/10
Evidence quality 3/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.