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

Limit SD erase file size

Public commit record

What the developer wrote

Authored by Marko Bencun

69/100 · Adequate
Limit SD erase file size

Reject files larger than SD_MAX_FILE_SIZE before the erase path overwrites them.
The read path already enforced this limit; applying it to erase prevents a
malformed FAT directory entry from causing an excessive overwrite loop.

This mitigates the BitBox impact of CVE-2026-6682 in the stale-backup cleanup
path without changing vendored FatFs code.
✓ Subject identifies a change✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in how the BitBox02 hardware wallet wipes files from its SD card. Before erasing a file, the device now checks the file's reported size against a safe maximum. Without this check, a tampered SD card could claim a file is gigantic, causing the device to get stuck in a long overwrite loop. The fix prevents a denial-of-service style attack where a malicious or corrupted SD card could make the device hang or behave unexpectedly during cleanup of old backups. The commit says it mitigates the impact of CVE-2026-6682 without changing the third-party FAT filesystem code.

Recommended action

Apply this patch. Additionally, review whether other SD card operations (delete, rename, stat, iteration) trust FAT directory entry sizes without validation, and consider centralizing size validation at the FatFs wrapper layer. Evaluate whether a watchdog or timeout is needed for long-running SD operations on a security device.

Security signals we found

01

CVE-2026-6682 referenced in commit message

02

Malformed FAT directory entry could cause excessive overwrite loop

03

Denial-of-service via SD card tampering

04

Size limit bypass between read and erase paths

05

Mitigation applied without modifying vendored FatFs code

Risk score

Why this scored 59/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 8/15
Affected reach 10/15
Confidence 7/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.