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

fix: ton amount too large crash

Public commit record

What the developer wrote

Authored by soralit

57/100 · Thin
fix: ton amount too large crash
✓ 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 crash in the TON (The Open Network) jetton token display code on Keystone 3 hardware wallets. Previously, when a token amount was too large to fit in a 64-bit integer, the firmware would panic and crash. The fix switches to a larger 128-bit integer and formats the amount more carefully. A crafted transaction with an oversized amount could have caused the device to crash, potentially disrupting transaction signing or user experience.

Recommended action

Review whether other token amount parsing paths use `u64` or `unwrap()` on untrusted input; consider adding bounds checks and replacing `unwrap()` with error handling to prevent panics. Verify the fix handles edge cases such as decimal places larger than 38, zero divisor, and malformed `coins` strings.

Security signals we found

01

Integer overflow/panic in amount parsing (u64 -> u128 fix)

02

Use of floating-point division for token amounts replaced with integer arithmetic

03

Potential denial-of-service via crafted transaction amount causing firmware panic

04

Missing input validation / unwrap usage on user-supplied token amount string

Risk score

Why this scored 42/100

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