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 · 8 minor findings · 1 suggestion

Earlier concerns neither republished nor resolved: 10 suggestions. See the Run archive for their assessments.

Findings

Link

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

On POSIX, choosing another loaded wallet's unchanged wallet.dat as the backup destination and approving replacement can overwrite its database pathname, bypassing the SQLite lock that protected it at base.

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

Details and suggested fix

With wallets A and B loaded, select B's wallet.dat as A's backup destination and approve “Replace backup?”. The dialog allows .dat, and backup::Inspect accepts an existing regular file. backup::Write asks Core to back up A into a temporary file, then uses RenameOver to install that snapshot over B's pathname. If B remains unchanged during inspection and staging, the digest check passes. POSIX rename replaces the directory entry without consulting B's SQLite lock. After B closes, its pathname contains A's database rather than B's keys unless another copy was saved. At base, the final destination went directly to SQLiteDatabase::Backup, whose destination connection could not overwrite the exclusively locked database. Reject destinations identifying any loaded wallet database before approval and again at installation, accounting for canonical paths and file identity. Cover this with two real loaded SQLite wallets.


Link

[major] · A pre-created /tmp/qml-intent-<uid> blocks GUI startup

On a host with shared, sticky /tmp, another local account can pre-create /tmp/qml-intent-<uid> and prevent subsequent GUI launches; the victim cannot remove the foreign-owned entry.

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

Details and suggested fix

Native::initialize always uses this predictable pathname on non-Windows systems, ignores the mkdir result, and rejects a foreign-owned directory or symlink through lstat. The probe treats that rejection as fatal, and normal startup likewise maps it to Disposition::Failed and exits. An attacker only needs to create the entry before the victim's first launch or after temporary-directory cleanup. The path ignores TMPDIR, so changing the application's temporary-directory setting does not recover startup. Put the endpoint in a protected per-user location, such as an appropriately validated runtime directory or a directory under the data directory, and test a hostile pre-existing entry.


Link

[minor] · Signer verification accepts signatures that do not protect all reviewed outputs

This pre-existing hardening gap requires a misbehaving signer: the new checks accept valid SIGHASH_NONE or SIGHASH_SINGLE signatures even though they do not commit to all reviewed outputs.

Location: qml/walletsend.cpp:54 (head).

Details and suggested fix

VerifiedSignatures delegates to PSBTInputSignedAndVerified, while partial verification checks signatures according to their declared hash types. Neither requires output-committing sighashes. Pinned Core adopts the signer's returned PSBT and passes each returned sighash_type into finalization. Consequently, a response containing matching SIGHASH_NONE signatures and fields can preserve the reviewed unsigned terms, pass verification and reach commit; if every input uses NONE, anyone seeing the transaction can rewrite its outputs. Valid incomplete contributions can also be retained for export. Require SIGHASH_ALL, or Taproot SIGHASH_DEFAULT, on the own-wallet signer, commit and bump paths, checking actual partial/final signatures as well as PSBT_IN_SIGHASH_TYPE. Keep arbitrary imported-PSBT broadcast policy separate and add NONE/SINGLE mock-signer cases. This supplements the app-side checks while the full upstream hardening remains deferred.


Link

[minor] · A refused receive type stays hidden after descriptor import

After Receive caches a type refusal, importing an active descriptor for that type does not restore it to the picker until the wallet is unloaded and reopened.

Location: qml/walletopening.cpp:398 (head).

Details and suggested fix

For example, let a Legacy-only descriptor wallet refuse Bech32, then import active wpkh() descriptors while it stays open. markReceiveTypeUnavailable permanently inserts Bech32 into the session's negative cache. preferredReceiveType skips it, and availableReceiveAddressTypes filters it out. Although Core emits NotifyCanGetAddressesChanged after activation, its subscription calls the ordinary ingress(0) refresh, which republishes the unchanged negative cache. Invalidate or re-check that cache on the capability notification, keeping it distinct from ordinary status updates. Add a refusal-then-import test within one wallet opening.


Link

[minor] · A definite fee-bump refusal leaves Speed Up stuck in Uncertain

A racing commitBumpTransaction refusal, not observed in production, leaves Speed Up blocked for the wallet until its model is recreated, even though Core committed nothing.

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

Details and suggested fix

If the original becomes ineligible between the final scope/admission checks and Core's commit check, commitBumpTransaction returns false. Every non-OK return in pinned feebumper::CommitTransaction precedes wallet.CommitTransaction, so this outcome is definite. Nevertheless, walletbump::Execute returns Error::Commit, which publishCommit maps to Phase::Uncertain. That state refuses preparation and reset, and checking status only changes the displayed error. Base used setError to enter recoverable Failed. Map a false commit return to Failed or NeedsRevalidation, reserving Uncertain for genuinely unknown outcomes.


Link

[minor] · PSBT readiness omits submission's maximum-fee checks

A fully signed imported PSBT can appear accepted despite exceeding submission fee caps; no production occurrence was identified, and those caps still prevent broadcast.

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

Details and suggested fix

ReadAdmission calls testmempoolaccept with maxfeerate zero, disabling its independent fee cap. An allowed result produces the “node currently accepts this exact transaction” status and permits broadcast. NodeBroadcast then supplies DEFAULT_MAX_RAW_TX_FEE_RATE.GetFeePerK() as an absolute cap and DEFAULT_MAX_RAW_TX_FEE_RATE as a rate cap. Thus a transaction above 0.1 BTC in fees or 10,000 sat/vB can pass readiness but fail submission with MAX_FEE_EXCEEDED or MAX_FEE_RATE_EXCEEDED. On the wallet path, commit can instead record it before relay fails against wallet-specific caps. Compare the authenticated fee with the selected submission path's caps before reporting readiness or committing.


Link

[minor] · The additive cluster check overrides accepted replacement admission

For an imported replacement in a cluster at its limit, the additive check can disable broadcast despite testmempoolaccept accepting it; no current caller producing that cluster was found.

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

Details and suggested fix

ReadNode obtains chain_limits from checkChainLimits, which reaches pinned Core's CheckPolicyLimits and stages only the new transaction. Exact admission stages removal of conflicts before checking cluster limits. A replacement can therefore fit after eviction while failing the additive check. Evaluate returns Blocked for that failure before considering Admission::Allowed; review clears can_broadcast, and execution repeats the refusal. Base submitted directly to the broadcast API. Let exact Admission::Allowed override the additive cluster result rather than treating that approximation as an authoritative replacement rejection.


Link

[minor] · Sign only inherits Send's all-inputs-owned restriction

The new Sign only action stays hidden when a foreign input is already signed and this wallet can sign the remaining inputs; this limits the added feature rather than regressing base behavior.

Location: qml/psbtwork.cpp:683 (head).

Details and suggested fix

PrepareReview requires owned_inputs for both key_can_send and can_commit_complete. currentTransactionCanSignOnly() then requires the resulting Send capability and m_psbt_key_can_send, so the mixed-ownership PSBT reports missing keys and hides the button even when could_sign >= unsigned_inputs. Signing does not require ownership of already-signed inputs: pinned DescriptorScriptPubKeyMan::FillPSBT skips them. Give Sign only eligibility based on the outstanding unsigned inputs, separate from Send/commit ownership eligibility, while retaining the fee-proof and transaction-identity checks.


Link

[minor] · Closing a loading address editor discards newly typed notes

If Close is processed before the initial label read completes, Address details drops newly typed notes without asking to save or discard; this timing-dependent path was established statically, not interactively.

Location: qml/pages/wallet/AddressDetails.qml:106 (head).

Details and suggested fix

The note field uses editor.available to decide whether it is writable, and that remains true during Loading. State::edit stores such text in pending_input without making the reducer dirty. The header's requestClose() forwards directly to the reducer, whose Loading branch enters Closed; publication then emits closed and AddressList closes the popup. The pending text is only considered when the read finishes, too late for the close decision. Keep the field read-only until initialization completes, and cover typing/closing with the initial read held.


Link

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

The backup confirmation's unbounded wrapped path can push its actions beyond a short window; the overflow threshold has not been checked in a rendered UI.

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

Details and suggested fix

WalletBackupConfirmation.qml derives directly from Popup, sets its implicit height from the complete content, and centers that height in the overlay. The full finalPath uses Text.WrapAnywhere above both buttons in one non-scrolling ColumnLayout, while inspection accepts paths up to 32,768 bytes. Nothing bounds the content to the available window height. Escape still cancels, but does not make the overflowing path and actions inspectable. Cap the popup to the overlay height and make the path area scrollable while keeping the actions visible. Add a long-path geometry case at the minimum window size.


Optional improvements

Link

[suggestion] · Private descriptor imports remain outside console redaction

As at base, importdescriptors arguments containing an xprv or tprv remain in the echoed request and in-memory recall history despite the expanded private-key redaction policy.

Location: qml/models/rpccommandexecutor.cpp:28 (head).

Details and suggested fix

Prepare redacts only commands in HISTORY_FILTER, which omits importdescriptors. RpcConsoleModel uses prepared->filtered() for both the displayed request and the history entry, so a private descriptor remains available through Up-arrow recall for the session. The 4,096-character history bound does not redact a key within that prefix. This follows the inherited policy rather than introducing a new leak. Extend redaction to private descriptor imports and add an xprv/tprv console case, while leaving the actual RPC arguments unchanged.


Coverage details

Earlier concerns

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