Skip to content

BitWindow server engines & database (3 of 3): 6 fixes from a security review - #2146

Open
giaki3003 wants to merge 6 commits into
LayerTwo-Labs:masterfrom
giaki3003:fix/w5-area-bwsrv-engines-r2
Open

giaki3003 wants to merge 6 commits into
LayerTwo-Labs:masterfrom
giaki3003:fix/w5-area-bwsrv-engines-r2

Conversation

@giaki3003

Copy link
Copy Markdown
Contributor

A set of 6 independent fixes to the BitWindow server engines & database, stacked on one branch so they can be reviewed together and cherry-picked individually. Based on current master; the branch builds and its tests pass at the tip (16 files changed, 556 insertions(+), 21 deletions(-)).

Fixes (oldest first)

  • 13834c8e0 BitWindow opens its SQLite database with foreign_keys OFF, so multisig DeleteGroup deletes only the parent multisig_groups row and orphans the group's signed-PSBT transactions; recreating or importing a group with the same client-supplied ID then inherits the deleted group's pending multisig spend (destination/amount/signed PSBT)
  • 972f56e07 BitWindow's bitdrive_files table stores no confirming block hash/height and is never invalidated on reorg, so ListFiles/GetFile keep serving a file whose source OP_RETURN/timestamp transaction was orphaned by a mainchain reorg as if still confirmed
  • f7dd4e949 BitWindow SidechainMonitorEngine orphan pending fast-withdrawal rows from malformed-hash fw1 response
  • 610f312b5 BitWindow DeniabilityEngine Core-path listunspent omits minconf -> 0-conf destination hidden -> wait timeout -> plan cancelled next tick, remaining hops dropped
  • 31c1f3780 BitWindow accepts mixed ancestry when Core switches branches during replay
  • de1567aa9 RestoreBackup rejects every existing valid wallet with ErrUnread

Each commit is self-contained — git cherry-pick <sha> works for any of them. Happy to split, reorder, or drop any. Finding reports for individual fixes available on request.

giaki3003 and others added 6 commits August 30, 2026 22:41
…ltisig DeleteGroup deletes only the parent multisig_groups row and orphans the group's signed-PSBT transactions; recreating or importing a group with the same client-supplied ID then inherits the deleted group's pending multisig spend (destination/amount/signed PSBT)

Bug: w5-20260613-1215-claudeclaw-confirm-bitwind (primary)
Finding: findings/20260613-1215-claudeclaw-confirm-bitwindow-multisig-delete-orphans-tx-fk-off-reused-group-id.md
Severity: R3-T4

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit dcf7a4b)
…/height and is never invalidated on reorg, so ListFiles/GetFile keep serving a file whose source OP_RETURN/timestamp transaction was orphaned by a mainchain reorg as if still confirmed

Bug: w5-20260614-1730-claudeclaw-confirm-kimicla (primary)
Finding: findings/20260614-1730-claudeclaw-confirm-kimiclaw-bitwindow-bitdrive-files-reorg-stale.md
Severity: R3-T4

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 0afdf29)
…l rows from malformed-hash fw1 response

Bug: w5-20260630-0156-kimiclaw-confirm-glmclaw-d (primary)
Finding: findings/20260630-0156-kimiclaw-confirm-glmclaw-drivechain-frontends-bitwindow-sidechainmonitor-malformed-hash-orphan-row.md
Severity: R3-T4

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 9f73f94)
…-> 0-conf destination hidden -> wait timeout -> plan cancelled next tick, remaining hops dropped

Bug: w5-20260731-1633-kimiclaw-confirm-glmclaw-d (primary)
Finding: findings/20260731-1633-kimiclaw-confirm-glmclaw-drivechain-frontends-bitwindow-deniability-core-minconf-default-cancels-plan.md
Severity: R3-T4

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 8e46905)
…ing replay

Bug: w5-20260822-1158-glmclaw-confirm-openclaw-d (primary)
Finding: findings/20260822-1158-glmclaw-confirm-openclaw-drivechain-frontends-midreplay-mixed-ancestry.md
Severity: R3-T4

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit e439866)
Bug: w5-20260828-1444-openclaw-confirm-glmclaw-d (primary)
Finding: findings/20260828-1444-openclaw-confirm-glmclaw-drivechain-frontends-restorebackup-existing-wallet-errunread.md
Severity: R3-T4

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 36d1caf)
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