Skip to content

Net/Qt: fix Tor reconnect state and receive request crash#1839

Draft
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-bug-inspection-e317
Draft

Net/Qt: fix Tor reconnect state and receive request crash#1839
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-bug-inspection-e317

Conversation

@cursor

@cursor cursor Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

PR intention

Fix two high-impact correctness bugs found during critical bug inspection:

  • Tor control reconnects could reuse stale synchronous reply handlers and a partial reply from the previous connection. If Tor restarted or the control socket dropped while GETINFO/ADD_ONION/auth commands were outstanding, the next connection's PROTOCOLINFO reply could be dispatched to the wrong callback, desynchronizing onion proxy/service setup until restart.
  • Receive request dialogs passed only OptionsModel even though the dialog dereferences WalletModel to classify transparent vs Spark addresses. Opening a generated or saved receive request could dereference an uninitialized WalletModel pointer and crash/trigger undefined behavior.

Code changes brief

  • Clear pending Tor control reply state on disconnect.
  • Wire ReceiveRequestDialog to WalletModel, derive OptionsModel from it, and update call sites to pass the wallet model.

Validation:

  • git diff --check HEAD~1..HEAD
  • cmake --build build --target firod
  • Confirmed existing build cache has BUILD_GUI:BOOL=OFF, so firo-qt compile validation was not available in this workspace.
Open in Web View Automation 

Co-authored-by: Reuben Yap <reuben@firo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant