simplewallet: classify payment IDs by their payload
What changed, and why it matters
This small change removes a consistency check in Monero's command-line wallet when loading a saved transaction. Previously, the wallet verified that a 'dummy' payment ID label matched a special zero-value payment ID. Now it labels the payment ID as dummy based only on the zero value, without checking whether any destination is an integrated address. This could let a crafted saved transaction file display a misleading payment ID label, but it does not by itself steal funds or break cryptography.
Review whether the removed consistency check was a safety invariant. If integrated addresses and dummy payment IDs must remain mutually exclusive, restore the assertion or replace it with equivalent validation. Consider adding tests for loaded transaction files with mixed integrated/dummy payment ID metadata.
Security signals we found
Removal of a CHECK_AND_ASSERT_MES consistency check
Removal of integrated-address validation for payment ID classification
Change in UI/labeling logic for loaded transactions
Evidence from the diff
The patch deletes a loop over tx construction destinations (cd.dests) that determined whether any destination is an integrated address, and removes a CHECK_AND_ASSERT_MES enforcing that the ‘is_dummy’ boolean equals (payment_id8 == crypto::null_hash8). It then classifies the payment ID as dummy solely by comparing payment_id8 to crypto::null_hash8. This weakens validation of loaded transaction metadata and could allow a loaded transaction to present a null payment ID as ‘dummy encrypted payment ID’ even when integrated addresses are present, or vice versa, depending on how the file is constructed.
Changed components
src/simplewallet/simplewallet.cppsimple_wallet::accept_loaded_tx functionPayment ID display/labeling in loaded transactionsInspect captured patch +1 / −9
### src/simplewallet/simplewallet.cpp
@@ -7728,15 +7728,7 @@ bool simple_wallet::accept_loaded_tx(const std::function<size_t()> get_num_txes,
if (!payment_id_string.empty())
payment_id_string += ", ";
- // if none of the addresses are integrated addresses, it's a dummy one
- bool is_dummy = true;
- for (const auto &e: cd.dests)
- if (e.is_integrated)
- is_dummy = false;
-
- CHECK_AND_ASSERT_MES(is_dummy == (payment_id8 == crypto::null_hash8), false, "Bad loaded tx: mismatched payment ID info");
-
- if (is_dummy)
+ if (payment_id8 == crypto::null_hash8)
{
payment_id_string += std::string("dummy encrypted payment ID");
}Why this scored 25/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.