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

fix(core): unblock THP loop after 5s write timeout

Public commit record

What the developer wrote

Authored by Roman Zeyde

97/100 · Strong
fix(core): unblock THP loop after 5s write timeout

Stop retransmission if writes are blocked - e.g. due to USB flow control.
It allows restarting the event loop to handle other THP channels.

`loop.race()` is used, since it schedules a single timeout task per message - instead of `loop.wait.timeout_ms`, which schedules a timeout task once per packet.

[no changelog]
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This change fixes a bug in the Trezor hardware wallet's THP (Trezor Host Protocol) communication layer. Previously, if the device was trying to resend a message but the USB host stopped accepting data (for example due to USB flow control), the retransmission loop could get stuck forever, blocking other THP channels. The patch adds a 5-second timeout so the loop can break out and let other communication channels proceed. It is a reliability/availability fix rather than a clear-cut vulnerability patch, though the stuck-loop condition could be abused to deny service to other channels.

Recommended action

Treat as a hardening/reliability fix. Review whether the 5-second timeout is appropriate for all host environments and whether raising Timeout is handled correctly by callers to avoid unintended side effects. No immediate security advisory is required unless vendor or reporter classifies it as a vulnerability.

Security signals we found

01

Denial-of-service mitigation: blocked USB write could previously stall the event loop indefinitely

02

Timeout added to bounded retransmission loop (50 iterations)

03

Exception type changed from ThpError to Timeout to signal event-loop restart

04

Communication protocol layer (THP) affected

Risk score

Why this scored 47/100

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