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

simplewallet: use the swept account for index=all in sweep_main

Public commit record

What the developer wrote

Authored by Cole Munz

73/100 · Adequate
simplewallet: use the swept account for index=all in sweep_main

sweep_main() takes the account to sweep as a parameter, but the index=all
expansion still counts subaddresses on m_current_subaddress_account. sweep_all
and sweep_below pass the current account, so sweep_account is the one command
that ends up with the wrong set.

When the current account has fewer subaddresses than the account being swept,
the set is too small and outputs in the higher minor indices never make it into
the sweep. If none of the target's unlocked outputs land in that range,
create_transactions_all throws "No unlocked balance in the specified
subaddress(es)" for an account that plainly has a balance.

27d551d12f8d added the account parameter and pointed create_transactions_all at
it, but left this loop on the old field. The RPC path already does it the right
way, with get_num_subaddresses(req.account_index).
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This is a one-line bug fix in Monero's command-line wallet. The 'sweep_account' command, when asked to sweep all subaddresses of a different account than the one currently selected, accidentally looked at the wrong account's list of subaddresses. This could cause some funds to be left behind or the command to wrongly report that the target account had no spendable balance. It does not let an attacker steal funds; it is a user-facing functional bug that could surprise a wallet user.

Recommended action

Treat as a routine bug fix rather than a security vulnerability. Users relying on sweep_account with index=all should upgrade to a version containing this commit to ensure all target subaddresses are swept correctly. No emergency response is warranted.

Security signals we found

01

Incorrect use of account context variable (m_current_subaddress_account vs parameter)

02

Functional bug in funds-sweeping logic

03

Potential denial of user intent: funds not moved as requested

04

No authentication bypass, memory corruption, or cryptographic weakness

Risk score

Why this scored 32/100

Our methodology →
Potential impact 8/30
Exploitability 3/25
Stealth signal 4/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.