AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 67 Bitcoin

bugfix: vdisk import bumps txn write count

Public commit record

What the developer wrote

Authored by scgbckbone

78/100 · Adequate
bugfix: vdisk import bumps txn write count

The C VirtDisk importer memcpy's into the PSRAM TXN staging regions without going through PSRAMWrapper.write_at(), so txn_write_count is not bumped and the pre-signing re-hash takes its fast path over possibly-clobbered bytes.

Bump the counter and revoke any PSRAM lease before copy_file, so post-review tampering through the virtual disk is caught and stale staged bytes cannot be downloaded.

Make the simulator model copy_file as a direct PSRAM write, then exercise the real VirtDisk event path during a pending PSBT approval and verify signing aborts.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a bug in the COLDCARD hardware wallet's virtual disk (VirtDisk) feature. When a user imported a file via the virtual disk, the firmware's fast C importer copied data directly into a sensitive memory area used to stage pending Bitcoin transactions. Because it bypassed the normal tracking mechanism, the wallet did not realize the transaction data had been touched. An attacker or malicious program with virtual disk access could therefore overwrite a transaction you were about to approve, and the wallet might sign the altered version instead of the one you reviewed on screen. The fix records the write, revokes any pending download lease, and adds a test proving the wallet now aborts signing when this happens.

Recommended action

Treat this as a security fix and include it in the next firmware release. Ensure the regression test passes on both simulator and real hardware. Review other PSRAM consumers for similar direct-write bypasses of txn_write_count or ALLOWED_DOWNLOAD invalidation. No CVE or advisory is supplied; consider requesting one if the vendor confirms security relevance.

Security signals we found

01

Bypass of transaction integrity counter (txn_write_count) via direct memory copy

02

Post-review tampering of staged signing data through virtual disk import

03

Missing invalidation of staged download lease (ALLOWED_DOWNLOAD)

04

Pre-signing hash fast-path operating on potentially clobbered bytes

05

Addition of regression test for transaction-modification abort path

Risk score

Why this scored 67/100

Our methodology →
Potential impact 22/30
Exploitability 14/25
Stealth signal 10/15
Affected reach 9/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.