SPB Git

Repository Public

QYV-SVC-086.json 1.8 KB 26 lines json

1{2  "id": "QYV-SVC-086",3  "title": "A watch-only package naming a network that is not Bitcoin's for its Bitcoin account left a wallet behind the error",4  "severity": "low",5  "cvss_vector": "",6  "cvss_score": null,7  "cwe": "CWE-460",8  "masvs": "MASVS-CODE-4",9  "area": "wallet",10  "location": "Sources/QyvoraWallet/WalletService+Onboarding.swift:482",11  "tool": "manual-review",12  "rule": "",13  "status": "fixed",14  "fix_commit": "0bdd99b",15  "regression_test": "QyvoraWalletTests.MainnetPolicyTests (EVMChainsAuditRegressionTests.swift): aWatchOnlyPackageIsValidatedBeforeAnythingIsCreated",16  "description": "Root cause: `importWatchOnly(package:)` creates the watch-only wallet, then calls `setBitcoinNetwork(package.bitcoin.network)`. `network` is a `BitcoinNetwork`, which since the multi-chain upgrade also names Litecoin, Dogecoin and Bitcoin Cash networks: for those `setBitcoinNetwork` throws after the wallet was created from the package. Impact: the caller receives an error although a wallet now exists (a second import then fails with `walletAlreadyExists`); no key or fund is at risk. Found by review; the fuzz target `watch-only-v2` checks the invariant \"an error leaves no wallet\" on every input.",17  "recommendation": "Validate the network of the Bitcoin account (a Bitcoin network, allowed by the mainnet gate) before anything is created.",18  "evidence": "",19  "fingerprint": "aec36a16b6ff",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, QyvoraNetworkingTests, QyvoraCoreTests; audit-package suites EVMChains* and Multichain* on M5M36.",24  "resolution_note": "Fixed as recommended. The regression test fails on the code before the fix, checked on M5M36."25}26
Files main
Menu

Theme