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

libwalletqt: fix potential out-of-bounds read

Public commit record

What the developer wrote

Authored by jpk68

45/100 · Thin
libwalletqt: fix potential out-of-bounds read
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes a bug in the Monero GUI wallet where three functions that read transaction details could access memory beyond the bounds of an internal list when the list is empty. The old check used 'index > size - 1', which underflows when the list is empty (size 0), so the guard failed and the code could read from an invalid position. The new check 'index >= size' is safe even when the list is empty. This is a defensive fix that prevents a potential crash or reading of unintended data when the wallet processes an unsigned transaction with no outputs or fees recorded.

Recommended action

Apply the patch. It is a minimal, correct defensive fix. Consider adding unit tests that call amount(0), fee(0), and mixin(0) on an UnsignedTransaction with empty internal vectors to prevent regression. Review the codebase for the same 'index > container.size() - 1' pattern elsewhere.

Security signals we found

01

Out-of-bounds read due to unsigned integer underflow in bounds check

02

Classic 'index > size - 1' anti-pattern replaced with safe 'index >= size' check

03

Applies to transaction amount, fee, and mixin accessors in unsigned transaction handling

04

Potential crash or information disclosure when vector is empty and index is non-zero

Risk score

Why this scored 38/100

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