SPB Git

Repository Public

QYV-SVC-100.json 2.7 KB 27 lines json

1{2 "id": "QYV-SVC-100",3 "title": "A persisted record of a coin synchronization kept addresses \"already paid\" for the whole next session, silencing the first-payment warning",4 "severity": "low",5 "cvss_vector": "",6 "cvss_score": null,7 "cwe": "CWE-345",8 "masvs": "MASVS-STORAGE-1",9 "area": "storage",10 "location": "Sources/QyvoraWallet/WalletService+UTXOCoins.swift:213",11 "tool": "manual-review",12 "rule": "",13 "status": "fixed",14 "fix_commit": "08cfe31",15 "regression_test": "QyvoraWalletTests (NewEntryPointsAuditRegressionTests.swift): NewEntryPointsAuditRegressionTests.aPersistedRecordDoesNotSilenceTheFirstPaymentWarning",16 "description": "Root cause: the state restored from `utxo-sync-<network>.json` (Litecoin, Dogecoin, Bitcoin Cash; added by the merge of main, 4ac4e69) carried the set of scripts the record says this wallet paid, and a synchronization adds to that set instead of replacing it (`paidScripts.formUnion`), unlike Bitcoin's own path which replaces it. The record is public chain data validated for consistency only (its transactions are not authenticated; its identity string is computed from public profile data). Impact: whoever can write into the application container makes any address count as \"already paid by this wallet\" for the whole next session, after a fresh synchronization too: a payment to that address is then reviewed with `destinationAlreadyPaid` instead of `firstPaymentToAddress`, the warning that asks the user to compare the address (QYV-APP-010). No coin, amount or key comes from the record: a restored snapshot is never spent from (`freshCoinSnapshot`). Needs local write access to the container.",17 "recommendation": "Do not carry the paid scripts of a restored record into the session; a synchronization of this session rebuilds them from what the indexer says.",18 "evidence": "",19 "fingerprint": "3d3ae0fb05de",20 "reported": "2026-12-05",21 "owner": "integrator",22 "fixed": "2026-12-05",23 "verification": "Root-package tests on M5M36 (Swift 6.4, release): QyvoraWalletTests, QyvoraTronTests, QyvoraCryptoTests, QyvoraMigrationTests, QyvoraQuantumShieldTests; audit-package suite NewEntryPointsProperties and the fuzz targets utxo-coin-snapshot and hidden-tokens on M5M36.",24 "resolution_note": "Fixed as recommended: `restoredUTXOCoin` restores the snapshot only. Nothing reads the set before a synchronization of the session, since no payment is prepared from a restored snapshot. The regression test fails on the code before the fix (the warning was `destinationAlreadyPaid`), checked on M5M36. The fuzz target `utxo-coin-snapshot` and the property campaign check that a restored state carries nothing but its snapshot.",25 "residual_risk": "What a synchronization of this session reports as paid rests on one indexer (QYV-APP-061)."26}27
Files main
Menu

Theme