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

fix(core): make CLI autocomplete order-independent

Public commit record

What the developer wrote

Authored by tychovrahe

85/100 · Strong
fix(core): make CLI autocomplete order-independent

- cli_autocomplete() used '\0' both as "no match yet" and as "this
command ends here", so whether Tab stopped at a full name such as
"reboot" or ran on to "reboot-to-bootloader" depended on the order
of the command array.
- Track the first match separately. Seen in the emulator, whose
constructor registration keeps source order; on hardware GCC emits
the section in reverse, which happened to hide it.

[no changelog]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✓ 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 is a minor bug fix in the command-line interface (CLI) autocomplete feature used inside Trezor devices. When a user typed a partial command like 'reboot' and pressed Tab, the autocomplete behavior could differ depending on the internal order of the command list. In some builds (real hardware) it happened to work; in others (emulator) it could skip past a complete command name and suggest a longer one instead. The fix separates two meanings of the special '\0' character so autocomplete behaves consistently regardless of command order. There is no direct evidence this is a security vulnerability.

Recommended action

Treat as a normal reliability/usability fix. No urgent security action is indicated by the commit itself. If the CLI is reachable in production, consider whether inconsistent autocomplete could confuse users, but the commit does not suggest an exploit path.

Security signals we found

01

Behavior of a user-facing input feature depends on linker/constructor ordering

02

Fix removes a sentinel-value ambiguity that caused inconsistent autocomplete results

Risk score

Why this scored 21/100

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