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

fix(core): don't reuse `_TIMEOUT_ERROR` exception object

Public commit record

What the developer wrote

Authored by Roman Zeyde

85/100 · Strong
fix(core): don't reuse `_TIMEOUT_ERROR` exception object

Following https://github.com/trezor/trezor-firmware/pull/5523.

[no changelog]
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a subtle bug in the Trezor device's task scheduler where the same exception object was being reused for every timeout. In Python, exception objects carry state (such as a traceback). Reusing the same object across many tasks and timeouts could cause stale traceback or context information to leak between unrelated operations, or trigger unexpected behavior if code catches and inspects the exception. The fix creates a fresh Timeout exception each time one is needed.

Recommended action

Treat as a low-to-moderate reliability/security hardening fix. Include in firmware release notes as a stability improvement. No immediate incident response required absent evidence of active exploitation.

Security signals we found

01

Reused mutable exception object across concurrent tasks

02

Potential cross-task state leakage via exception traceback/context

03

Embedded scheduler/runtime hardening

04

Follow-up fix to prior PR (#5523)

Risk score

Why this scored 35/100

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