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

Add a maximum recursion depth to parse_script

Public commit record

What the developer wrote

Authored by Salvatore Ingala

45/100 · Thin
Add a maximum recursion depth to parse_script
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit adds a safety limit to a recursive function called parse_script in Ledger's Bitcoin app. Without such a limit, an attacker could potentially feed the device an extremely nested Bitcoin script that causes the function to call itself so many times that the device's limited stack memory runs out. A stack overflow on a hardware wallet could crash the app or, in worst cases, be exploited to alter behavior. The fix caps nesting at 16 levels, which is above any realistic legitimate use.

Recommended action

Treat as a security hardening fix and include in release notes. Review whether other recursive parsers in the codebase (e.g., for key expressions or transaction parsing) need similar depth limits. Consider whether 16 is appropriate for the device's actual stack size and worst-case frame size.

Security signals we found

01

Unbounded recursion mitigated by explicit depth cap

02

Stack-exhaustion / denial-of-service class hardening

03

Input validation added to parser

04

No CVE, advisory, or researcher attribution present in commit

Risk score

Why this scored 61/100

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