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

fix(core): limit protobuf nesting depth

Public commit record

What the developer wrote

Authored by Martin Milata

57/100 · Thin
fix(core): limit protobuf nesting depth

[no changelog]
✓ 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 adds a hard limit on how deeply nested Protobuf messages can be when the Trezor device decodes them. Without such a limit, a malicious or malformed message could nest messages inside messages indefinitely, potentially crashing the device or causing other problems. The change caps nesting at 16 levels and adds a test to confirm that deeper nesting is rejected.

Recommended action

Treat as a security hardening fix and include in release notes. Ensure the limit is applied consistently to all message decoding entry points and consider whether other parsers (e.g., legacy C/MicroPython paths) need similar limits.

Security signals we found

01

Adds explicit recursion/depth limit to Protobuf decoder

02

Prevents stack exhaustion or unbounded allocation from deeply nested messages

03

Returns controlled error (OutOfRange / DataError) instead of crashing

04

Includes regression test for exact boundary behavior

Risk score

Why this scored 66/100

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