What changed, and why it matters
This small patch fixes a bug in the Monero wallet where, if an output had already been scanned once, the wallet would return early without clearing an error flag. In rare cases this could leave a stale 'error' state attached to a transaction output, potentially causing the wallet to misreport whether a payment was received or whether scanning succeeded. It is a defensive correctness fix rather than a clear exploit, but stale error state in financial software can have security-adjacent consequences.
Treat as a low-to-moderate reliability fix. Apply the patch. Users running affected wallet versions should upgrade to avoid possible wallet-state inconsistencies, especially if they rely on automated scanning or RPC callers that inspect tx_scan_info.error. No immediate emergency response is warranted absent a demonstrated exploit.
Security signals we found
Stale error-state propagation in wallet scanning logic
Missing reset of tx_scan_info.error on cached/short-circuit code path
Potential for incorrect received-payment or scan-failure reporting
No input validation, cryptography, or network code changed
Evidence from the diff
In wallet2::check_acc_out_precomp_once(), when already_seen is true the function now explicitly sets tx_scan_info.error = false before returning. Previously it returned immediately after setting tx_scan_info.received = boost::none, leaving any prior tx_scan_info.error value intact. The change ensures that a cached/short-circuit path does not propagate a stale error boolean to callers. The diff is minimal (+3 lines) and only affects the early-return branch for already-processed outputs.
Changed components
src/wallet/wallet2.cppwallet2::check_acc_out_precomp_once()Inspect captured patch +3 / −0
### src/wallet/wallet2.cpp
@@ -2260,7 +2260,10 @@ void wallet2::check_acc_out_precomp_once(const tx_out &o, const crypto::key_deri
{
tx_scan_info.received = boost::none;
if (already_seen)
+ {
+ tx_scan_info.error = false;
return;
+ }
check_acc_out_precomp(o, derivation, additional_derivations, i, is_out_data, tx_scan_info);
if (tx_scan_info.received)
already_seen = true;Why this scored 46/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.