Skip to content

qt: PSBT dialog Sign can start twice while the passphrase prompt is open #350

Closed

Description

@kiwidream

In the PSBT operations dialog, Sign can start a second time while the first sign's passphrase prompt is open. Line numbers are at 1.x.x 21fee6ee8e.

What happens

PSBTOperationsDialog only checks m_sign_thread for "already signing" (src/qt/psbtoperationsdialog.cpp:134). requestUnlock() (:138) runs the passphrase dialog's nested exec() before setSigningControlsEnabled(false) is called, so Sign stays enabled while the prompt is open. Qt modality blocks mouse and keyboard input to the dialog, but an accessibility press (VoiceOver, UI automation) still clicks Sign. The send dialog in #174 A11 failed through the same bypass.

Pressing Sign again during the prompt on an encrypted, locked wallet:

  • starts a second signTransaction, which nests a second passphrase prompt;
  • when the outer call returns, it overwrites m_sign_unlock_context, which relocks the wallet underneath a signing thread that is still running;
  • it bumps m_sign_generation, so the inner attempt's result is dropped;
  • it overwrites m_sign_thread, so the inner thread is neither joined nor deleted;
  • both attempts can sign, spending PQC signature counters twice.

Expected

Treat signing as in flight from before requestUnlock() until the attempt finishes, as the send-dialog fix for #174 does. A second Sign press during the prompt is ignored, and the signing controls stay disabled for the whole attempt.

Found by reading the code during the #174 v1.0.1 release work; not yet reproduced in a running app.

Activity

  1. kiwidream commented on Nov 11, 2026

    @kiwidream
    MemberAuthor

    Fixed on 1.x.x by #353 (9574775b1f), which ships in v1.0.1: PSBT Sign is now ignored while a signing attempt, including its passphrase prompt, is in progress.

    Closing by hand, because a merge into 1.x.x does not close issues automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions