Skip to content

Harden against resource exhaustion during class import - #1040

Merged
Col-E merged 2 commits into
Col-E:masterfrom
jus7n:fix/import-resource-exhaustion
Jul 28, 2026
Merged

Harden against resource exhaustion during class import#1040
Col-E merged 2 commits into
Col-E:masterfrom
jus7n:fix/import-resource-exhaustion

Conversation

@jus7n

@jus7n jus7n commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Prefilter hostile nested or cyclic CONSTANT_Dynamic bootstrap graphs before ASM validation. Add configurable per-entry, archive-wide, and compression-ratio ZIP inflation limits enforced against actual decompressed output, preventing forged metadata from bypassing them. Includes regression coverage for both exhaustion paths.

@Col-E Col-E added the bug Yup, thats broken label Jul 28, 2026
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.96970% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.96%. Comparing base (ca5a601) to head (adea08b).

Files with missing lines Patch % Lines
...e/coley/recaf/util/io/ZipDecompressionLimiter.java 74.28% 9 Missing and 9 partials ⚠️
...recaf/services/workspace/io/BasicClassPatcher.java 64.28% 7 Missing and 3 partials ⚠️
...are/coley/recaf/util/io/LocalFileHeaderSource.java 47.05% 8 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1040      +/-   ##
============================================
+ Coverage     64.92%   64.96%   +0.04%     
- Complexity     7181     7203      +22     
============================================
  Files           570      571       +1     
  Lines         31007    31173     +166     
  Branches       5339     5371      +32     
============================================
+ Hits          20131    20252     +121     
- Misses         8278     8305      +27     
- Partials       2598     2616      +18     

☔ View full report in Codecov by Harness.
📢 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.

@Col-E
Col-E merged commit 8c6de68 into Col-E:master Jul 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Yup, thats broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants