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

fix(core): limit the offset of translations_read function

Public commit record

What the developer wrote

Authored by tychovrahe

62/100 · Adequate
fix(core): limit the offset of translations_read function

[no changelog]
✓ Specific, 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 fixes a function that reads translated text data from the hardware wallet's flash storage. Previously, if a caller requested data starting at an offset beyond the end of the translation area, the function would calculate a negative-looking length (because unsigned arithmetic wraps around) and return a pointer to an invalid memory location. The fix checks whether the offset is too large and returns NULL instead. This could have allowed malformed or attacker-controlled data to trick the device into reading memory outside the intended translation area, potentially causing crashes or exposing unrelated flash contents.

Recommended action

Treat as a security hardening fix. Review all callers of translations_read() to ensure they handle NULL returns safely and do not pass unchecked offsets from USB/Protobuf messages. Consider whether translations_area_bytesize() is the correct authoritative size and whether flash_area_get_address() itself enforces bounds. Backport to supported firmware branches if the vulnerable code is present.

Security signals we found

01

Integer underflow / wraparound in length calculation

02

Missing bounds check on user-supplied offset

03

Potential out-of-bounds read from flash area

04

Return of attacker-influenced pointer/length pair

05

Defensive patch in security-critical embedded firmware

Risk score

Why this scored 64/100

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