SPB Git

Repository Public

QYV-SVC-025.json 3.0 KB 27 lines json

1{2  "id": "QYV-SVC-025",3  "title": "The same-payment guard of Solana does not cover transactions broadcast for a cold device and does not survive a restart",4  "severity": "low",5  "cvss_vector": "",6  "cvss_score": null,7  "cwe": "CWE-841",8  "masvs": "MASVS-CODE-4",9  "area": "service",10  "location": "Sources/QyvoraWallet/WalletService+Cold.swift:330",11  "tool": "manual-review",12  "rule": "",13  "status": "open",14  "fix_commit": "",15  "regression_test": "",16  "description": "Root cause: `requireNoPaymentInFlight` refuses to prepare a payment equal (chain, recipient, asset, amount) to one signed in this session that can still be executed. A transaction signed by a cold device is recorded by `broadcastSigned` under the key `cold|<signature>`, which no later `prepareSend` can match; and the register (`sentTransactions`) is in memory only. A user who broadcasts a cold-signed payment, sees it pending and prepares the same payment again within its validity (about 150 blocks, one to two minutes), or who restarts the application in that window, is not stopped. Impact: a double payment by the user's own repetition, limited to the validity window of a Solana transaction; no attacker is needed and none gains by default. Design gap: no CVSS vector, rated by impact and likelihood.",17  "recommendation": "Proposed fix (service): in `broadcastSigned`, derive the payment key from the decoded transaction when it is a plain payment — recipient and lamports of the System transfer; for a token, key the guard on the destination token account and use the same key in `prepareSolanaSend` — and persist the in-flight register (signature, payment key, last valid block height) with the chain record until the transaction is settled or expired. Not done in this audit: it changes the key format shared with TRON and the persistence format.",18  "evidence": "",19  "fingerprint": "b6e2c68f27f8",20  "reported": "2026-12-05",21  "owner": "multichain-solana",22  "proposed_disposition": "Low, open. Proposed: fix with the next change of the persistence format; acceptable for the internal build (the window is one to two minutes and the screens show the pending payment). Owner decision.",23  "mitigation_note": "Partly mitigated on 2026-12-05 (commit 7b1e37e): a plain SOL payment broadcast for a cold device is recorded under the key `prepareSend` computes for the same recipient and amount (`coldSolanaPaymentKey`), so preparing that payment again while it is in flight is refused; test MainnetPolicyTests.aColdSolanaPaymentTakesTheKeyOfTheSamePaymentPreparedHere. The result screen shows a pending payment with its last valid block height and offers no second one (QYV-APP-021).",24  "open_note": "Not done: a cold-signed TOKEN transfer names the recipient's token account, which the guard of `prepareSend` (keyed on the recipient) does not match; and the register of payments in flight is in memory only, so a restart within the validity window (one to two minutes) forgets it. Both need a change of the key format shared with TRON and of the persisted chain record.",25  "updated": "2026-12-05"26}27
Files main
Menu

Theme