SPB Git

Repository Public

QYV-APP-061.json 5.7 KB 30 lines json

1{2  "id": "QYV-APP-061",3  "title": "Balances, history and confirmations of the UTXO coins rest on one indexer, the one announcing the highest tip",4  "severity": "medium",5  "cvss_vector": "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:H/A:N",6  "cvss_score": 4.2,7  "cwe": "CWE-345",8  "masvs": "MASVS-NETWORK-1",9  "area": "wallet",10  "location": "Sources/QyvoraWallet/WalletService+UTXOCoins.swift:134",11  "tool": "manual-review",12  "rule": "",13  "status": "fixed",14  "fix_commit": "7b1e37e",15  "regression_test": "QyvoraNetworkingTests.UTXOCoinsAuditRegressionTests.currentIndexersMustAgreeOnAConfirmedBlock and hostileTipHeightsNeitherTrapNorWinTheSurvey; QyvoraWalletTests.MainnetPolicyTests.aBitcoinCashPaymentOfOldCoinsTakesANewerCoinWithIt (the note of a single source reaches the snapshot).",16  "description": "Design. For Litecoin, Dogecoin and Bitcoin Cash the wallet reads everything it displays from one indexer client: after the chain-identity check, `UTXOIndexers.survey` ranks the clients by tip height and the highest is used, the others being reported as stale when they trail by more than the confirmation depth. There is no cross-check of balances, coins or history between indexers. Consequences: (1) any one configured endpoint — not only the first — becomes the source by announcing a high tip (up to 99 999 999 passes the service's bound); (2) it can then show an incoming payment that does not exist, hide one, or report false confirmations, for as long as it lies. A tip of 10^8 or more is left out of the survey since this audit (before, such an endpoint was chosen as the most advanced and then refused by the service, which made every synchronization of the network fail). It cannot obtain a signature, burn fees (amounts are authenticated: previous transactions on Dogecoin, signature commitment on Bitcoin Cash and Litecoin) or exceed the fee ceilings. Bitcoin Cash Testnet has a single default endpoint; Dogecoin has a single source of raw transactions (payments are refused without it). The Bitcoin path has the same single-source design. Impact: a user who relies on the display to release goods can be defrauded by a lying or compromised endpoint (integrity of what is presented).",17  "recommendation": "Proposed: (a) when two clients of a network answer, compare the hash of a recent block (tip minus the confirmation depth) and refuse to read from a client that disagrees with the majority or, with two, report the disagreement; (b) do not let a tip that is ahead of every other client by more than a few blocks win silently — require a second client within the confirmation depth, or mark the snapshot as unconfirmed by a second source; (c) for incoming payments above a threshold, cross-check the coin with a second protocol before showing it as confirmed. State the residual risk in the user documentation.",18  "evidence": "Sources/QyvoraNetworking/UTXOIndexer.swift:495; Sources/QyvoraWallet/WalletService+UTXOCoins.swift:296; App/Sources/Wallet/ChainDetailScreen.swift:259; App/Sources/Activity/TransactionDetailView.swift:70",19  "fingerprint": "b522d1a0fe3d",20  "reported": "2026-12-05",21  "owner": "review-utxo",22  "mitigation_commit": "3cb4f27",23  "resolution_note": "Points (a) and (b) of the recommendation are implemented in the service; the screens label what remains. (a) After the survey of the tips, the indexer sources of a coin that are current are asked for the hash of one block under the confirmation depth (`UTXOIndexers.corroborate`): sources that follow the same chain agree; a different hash refuses the synchronization (`untrustedResponse`, naming both). (b) A source that is alone — the only one configured, or the only one current because it announces a tip the others trail by more than the depth — no longer wins silently: the snapshot carries a note starting with `WalletService.singleIndexerNotePrefix`, which the chain screen shows as a warning banner (\"Read from one source\") and the transaction detail as \"Reported by one source\", with the advice not to hand over goods on it. When several agree, the note says how many and that they confirm the chain, not each payment.",24  "residual_risk": "Balances, coins and history are still read from one source: the others vouch for the chain it follows, not for a payment it invents on that chain (point (c) of the recommendation, a second protocol for each incoming coin, is not implemented). Sources are compared per protocol: several URLs of one protocol are one source (first that answers). A liar that announces a high tip is used alone, labelled. Bitcoin's own path (Esplora only, QYVORA 1.0) keeps its single-source design without this label (QYV-SVC-014). Bitcoin Cash Testnet has one default source. The wallet never signs on an indexer's word alone (amounts are authenticated).",25  "verification": "Package tests of the whole root package on M5M36 (Swift 6.4, release, 895 tests in 23 runs, no failure) at commit f0ddca7; QyvoraWalletTests (212 tests) run five consecutive times on the laptop without failure after the last source change; application target compiled for iphoneos on M3U96a and for the simulator on the laptop; changed screens read on the simulator \"Qyvora iPhone B\" where the review record security/audit/review/multichain-app-screens.json says so; static checks and framework steps of the audit re-run. The final laptop run of the whole package and the quick audit were made after this register was written: their results are in the report of the work, not here.",26  "updated": "2026-12-05",27  "fixed": "2026-12-05",28  "previous_proposed_disposition": "Owner decision: implement (a) and (b) in the UTXO indexer layer before a public release, or accept the single-source design as documented residual risk (as for Bitcoin in version 1.0)."29}30
Files main
Menu

Theme