mirror of
https://github.com/wownero/wownero.git
synced 2026-10-17 07:31:35 +02:00
wallet2: validate key image domain in reserve proofs
Reported by zkao, a tool by zkSecurity
This commit is contained in:
@@ -12563,6 +12563,8 @@ bool wallet2::check_reserve_proof(const cryptonote::account_public_address &addr
|
||||
{
|
||||
THROW_WALLET_EXCEPTION_IF(!seen_key_images.insert(proof.key_image).second, error::wallet_internal_error, "Duplicate key image in reserve proof");
|
||||
THROW_WALLET_EXCEPTION_IF(!seen_outputs.emplace(proof.txid, proof.index_in_tx).second, error::wallet_internal_error, "Duplicate output in reserve proof");
|
||||
THROW_WALLET_EXCEPTION_IF(rct::ki2rct(proof.key_image) == rct::identity() || !rct::isInMainSubgroup(rct::ki2rct(proof.key_image)),
|
||||
error::wallet_internal_error, "Invalid key image in reserve proof");
|
||||
}
|
||||
|
||||
THROW_WALLET_EXCEPTION_IF(subaddr_spendkeys.count(address.m_spend_public_key) == 0, error::wallet_internal_error,
|
||||
|
||||
Reference in New Issue
Block a user