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

fix(stellar): properly bound string length

Public commit record

What the developer wrote

Authored by Jakub Janků

88/100 · Strong
fix(stellar): properly bound string length

Currently, the length of all bounded strings is checked using
len(str). This returns the number of Unicode code points. However,
the XDR spec defines string object<m> as a sequence of at most m
bytes, see https://datatracker.ietf.org/doc/html/rfc4506#section-4.11.
A single Unicode code point can consist of multiple bytes.

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

What changed, and why it matters

This commit fixes a length-check bug in Trezor's Stellar cryptocurrency support. The device was measuring string length in characters (Unicode code points) instead of bytes. Because some characters use multiple bytes, a string could pass the old check yet be too long for the Stellar protocol, potentially causing malformed transaction data or unexpected device behavior when signing.

Recommended action

Treat as a low-to-moderate security fix. Users should update firmware to a version including this commit. Review whether any other Stellar string fields use len(str) for byte-length limits, and add regression tests covering multi-byte UTF-8 inputs at boundary values.

Security signals we found

01

Incorrect input validation: length check used code-point count instead of byte count

02

Protocol compliance mismatch with RFC 4506 XDR string encoding

03

Potential to generate malformed or oversized Stellar transaction fields

04

Boundary/length validation bypass via multi-byte UTF-8 characters

Risk score

Why this scored 60/100

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