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

fix: add zip bomb protection and QR part limit enforcement (#843) (#848)

Public commit record

What the developer wrote

Authored by Odudex

93/100 · Strong
fix: add zip bomb protection and QR part limit enforcement (#843) (#848)

DeflateIO now enforces a 100KB max decompressed size at the C level, protecting all callers (BBQR and KEF) from zip bomb OOM on K210.
pMofN parser validates part_total (1-99) and part_index range.
BBQR parser validates part_total >= 1.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes two denial-of-service weaknesses in Krux, a Bitcoin hardware-wallet firmware. First, it caps how much data can come out of compressed (deflated) QR codes and encrypted backups, preventing a maliciously crafted 'zip bomb' from exhausting the device's memory. Second, it rejects QR-code part counts that are zero or absurdly high, preventing an attacker from tricking the wallet into reserving unbounded memory while scanning multi-part QR codes.

Recommended action

Treat this as a security hardening fix and include it in the next release. Users building from source should update past this commit. Because the C-level change is in firmware/MaixPy, ensure the compiled firmware is rebuilt and re-flashed; simulator-only updates are insufficient for real devices.

Security signals we found

01

zip-bomb / decompression-bomb protection

02

denial-of-service (OOM) mitigation

03

input validation on multi-part QR part counts

04

deflate decompressed-size cap enforced at C level

05

ValueError from DeflateIO now propagated instead of swallowed

Risk score

Why this scored 66/100

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