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

fix(core/thp): correct `Failure_InvalidProtocol` constant message

Public commit record

What the developer wrote

Authored by Roman Zeyde

62/100 · Adequate
fix(core/thp): correct `Failure_InvalidProtocol` constant message

[no changelog]
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes a hard-coded error message sent by Trezor devices when an older protocol (v1) is used on a connection that expects the newer THP protocol. The message's length field was wrong (claimed 20 bytes instead of 2), which could cause the receiving host to read extra, unintended bytes. The fix corrects the length and adds a test to ensure the response is exactly the right size.

Recommended action

No immediate action required beyond normal patch review and merge. The change is a correctness fix; consider auditing other hard-coded wire-format constants for similar length mismatches.

Security signals we found

01

Hard-coded protocol response length field corrected

02

Test added to prevent trailing-byte regression

03

Failure_InvalidProtocol response generated on THP interface for legacy v1 packets

Risk score

Why this scored 21/100

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