WIP: qt: refactor QML frontend onto owned models

bitcoin-core/gui-qml: PR #1142

Provider refusals

write_verifier: Provider declined the request because of a cybersecurity restriction. Experiments remain incomplete; static verification can continue.

2 major findings · 3 minor findings · 2 suggestions

Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.

Findings

Link

[major] · Backup can replace another loaded wallet's wallet.dat

On POSIX, approving wallet A's backup over idle, loaded wallet B's wallet.dat can replace B's database despite its SQLite lock; this overwrite was established statically, not reproduced.

Location: qml/models/backuppolicyio.cpp:149 (head).

Details and suggested fix

The chooser accepts .dat, and InspectTarget preserves that suffix. If B's file digest remains unchanged between inspection and installation, backup::Write creates A's backup in a staging directory and installs it with RenameOver, which calls fs::rename. The checks reject symlinks, non-regular files and changed contents, but never identify loaded wallet databases. POSIX rename can therefore replace B's directory entry while B still has its original database open. After unload or restart, B's path contains A's database, potentially leaving B's keys recoverable only from an independent backup. Base passed the same destination directly to SQLite's backup API, where B's exclusive lock prevents the overwrite. Refuse destinations inside the wallet directory or matching a loaded database's file identity, both during inspection and immediately before installation, and add a two-loaded-wallet regression. The self-backup variant was not separately established.


Link

[major] · Squatting the /tmp intent directory prevents GUI startup

On Unix, another local user can block GUI launches by claiming /tmp/qml-intent-<uid> before its first creation; startup treats the ownership rejection as fatal even without payment inputs.

Location: qml/desktopintenttransport.cpp:364 (head).

Details and suggested fix

Native::initialize ignores the result of mkdir and then rejects the predictable path if it belongs to another uid. Service::begin returns that rejection, and startup preparation maps it to Failed, causing normal startup to report an error and exit. The earlier existing-instance probe applies the same ownership check and also exits on rejection. Thus another local user can pre-create the directory before first launch or after temporary-directory cleanup and prevent the application from starting. In a normal sticky /tmp, the victim cannot remove the attacker's entry without assistance from its owner or an administrator. Use a validated per-user private runtime directory, such as $XDG_RUNTIME_DIR, rather than making every launch depend on a claimable name in shared /tmp.


Link

[minor] · A pre-commit signer exception leaves Speed Up stuck in Uncertain

If an external signer throws before any fee-bump commit, the model enters Uncertain with neither retry nor status-check recovery until the wallet is reopened.

Location: qml/walletbump.cpp:213 (head).

Details and suggested fix

Pinned Core's signer enumeration can throw on malformed responses, and the fee-bump signing path does not catch that exception. In walletbump::Execute, signing happens before candidate_txid and commit_attempted are assigned, but the outer catch still returns Error::Uncertain. Publication preserves that state. canRecheckOutcome() then fails because no commit candidate exists, while requestPrepareFeeBump, reset and reviews of other transactions refuse Uncertain. Closing and reopening the overlay therefore does not recover, and its status-check button remains disabled. Distinguish exceptions before the commit boundary and transition those failures to recoverable Failed or NeedsRevalidation; reserve Uncertain for genuinely ambiguous outcomes.


Link

[minor] · PSBT readiness omits the submission fee caps

The new readiness gate disables testmempoolaccept's fee cap and can advertise acceptance for PSBTs submission will not broadcast; the wallet-history side effect already existed at base.

Location: qml/psbtpolicy.cpp:34 (head).

Details and suggested fix

For an otherwise acceptable imported PSBT above the applicable submission fee caps, ReadAdmission passes maxfeerate=0, so pinned Core skips its client fee-rate check. Evaluate consequently reports “The node currently accepts this exact transaction.” However, NodeBroadcast supplies both the default rate cap and an absolute cap of DEFAULT_MAX_RAW_TX_FEE_RATE.GetFeePerK(). The wallet path also applies m_max_tx_fee and m_max_tx_fee_rate, but only after commitTransaction records the transaction, leaving it recorded but not in the mempool when capped broadcast fails. That wallet-history behavior predates this PR; this finding concerns the new readiness result, not new fund risk. The complete GUI routing between the two submission paths was not established. Evaluate the caps for the selected path before presenting readiness or committing, using the authenticated fee.


Link

[minor] · Backup confirmation has no height cap or scrolling

With an unusually long destination path or large text metrics, the uncapped backup confirmation can place approval controls beyond the window; affected rendered dimensions have not been measured.

Location: qml/components/WalletBackupConfirmation.qml:19 (head).

Details and suggested fix

WalletBackupConfirmation derives its height from the entire content column, wraps the complete operation.finalPath with Text.WrapAnywhere, and centers that height on the overlay. Neither the popup nor its caller imposes a maximum height or provides scrolling. When the content exceeds the overlay, the bottom approval row can extend beyond the window. MainWindow has a minimum height of 665 pixels, so this requires unusually tall content rather than an ordinary short path. Escape still refuses the operation, but does not make approval reachable. Cap the popup to the available overlay height and scroll the explanation and path while keeping the buttons visible.


Optional improvements

Link

[suggestion] · The decimal-parse commit also carries the paste lifecycle API

The #1081 commit mixes exact decimal parsing with unrelated paste/admission machinery, separating that API from CapturedPaste.qml and making the amount-safety fix harder to review.

Location: qml/bitcoinamount.h:86 at ebbcb9531f8c (commit) (commit).

Details and suggested fix

At ebbcb9531f8c8e46a12546eb6f80938291d92884 itself (parent=null), the exact parser and invalid-input state arrive alongside admission gates and the ticketed requestPaste, requestEditInput and cancelInput API. Its message explicitly says the latter changes are not needed for #1081. BitcoinAmountInputField.qml already calls that API and instantiates CapturedPaste, but the component is added only in payment-import commit c7e847b4dc18f8cdfba6c362d898e76d8145809c. Keep exact parsing and invalid-input state in the decimal fix, and move the lifecycle API together with its matching QML hunks into that import commit, or into e3838823ce14d248fcacb52b7b420d56bea9ad63 if the R10 owners require it earlier. This keeps the API beside its contract and reduces the material needed to verify the decimal-comma fix. It preserves the final tree and does not claim to make this whole-series-only build independently buildable.


Link

[suggestion] · The #1063 fix is attributed to a helper-only commit

The commit marked Fixes #1063 adds fee-authentication helpers but leaves submission unchanged; later commits wire them into review and broadcast, obscuring where the trust-boundary fix takes effect.

Location: test/CMakeLists.txt:143 at b537fe060db7 (commit) (commit).

Details and suggested fix

At b537fe060db72714d8ce6da9c6da7f3013e70552 itself (parent=null), the patch adds psbtfee.*, psbtfeeservices.* and their test, but WalletQmlModel still extracts an imported PSBT and calls commitTransaction without authenticated-fee checks. Send-path consumers arrive in 9cd53a4e3cb3741c190ba2dcb0b373f58ff6a298, and checks immediately before node broadcast arrive in ed3e7e36cefaceff176c77e4ed60c3e7d3b6398b. The helper also includes qml/psbtdocument.h, introduced by that later PSBT extraction. Reword the helper commit to describe adding authenticated fee computation, and move Fixes #1063, with the final-tree psbt.enabled.authenticatedLegacyFeeReview test reference, to the wiring commit. This makes issue and backport traceability identify the behavioral fix without moving code ahead of its dependencies.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.