Skip to content

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

Merged
odudex merged 1 commit intoselfcustody:developfrom
odudex:input_size_limits
Apr 7, 2026
Merged

fix: add zip bomb protection and QR part limit enforcement#848
odudex merged 1 commit intoselfcustody:developfrom
odudex:input_size_limits

Conversation

@odudex
Copy link
Copy Markdown
Member

@odudex odudex commented Mar 31, 2026

What is this PR for?

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.
Issues C4 and C5 from #843

Changes made to:

  • Code
  • Tests
  • Docs
  • CHANGELOG

Did you build the code and tested on device?

  • Yes, build and tested on Amigo

What is the purpose of this pull request?

  • Bug fix
  • New feature
  • Docs update
  • Other

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.31%. Comparing base (23bc73b) to head (8d9d62a).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #848   +/-   ##
========================================
  Coverage    97.31%   97.31%           
========================================
  Files           83       83           
  Lines        10596    10607   +11     
========================================
+ Hits         10311    10322   +11     
  Misses         285      285           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@qlrd
Copy link
Copy Markdown
Member

qlrd commented Apr 2, 2026

LGTM for now

@odudex odudex marked this pull request as ready for review April 6, 2026 13:06
…dy#843)

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.
@odudex odudex force-pushed the input_size_limits branch from 0401ec7 to 8d9d62a Compare April 6, 2026 23:58
@odudex odudex merged commit bd95e82 into selfcustody:develop Apr 7, 2026
8 checks passed
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.

2 participants