Skip to content

Bound hostile-input allocations; decode PDF name escapes (replaces #186) - #187

Merged
switch-nz merged 2 commits into
mainfrom
claude/bound-hostile-inputs
Oct 29, 2026
Merged

switch-nz merged 2 commits into
mainfrom
claude/bound-hostile-inputs

Conversation

@switch-nz

Copy link
Copy Markdown
Owner

Replaces #186 (by @deadp), which conflicted with main in CHANGELOG.md after #185 merged. Its branch lives on a fork this session can't push to, so the original commit is carried here unchanged, with its authorship, plus one merge commit that keeps both Security entries. Close #186 when this merges.

What the change does (from #186)

Crafted evidence could make Strata allocate without limit, and PDF active content could hide behind name escapes.

  • EWF2: the chunk count read from the file is capped at ceil(sectors × bytes per sector / chunk size).
  • Registry transaction log: a hive size larger than the log itself is rejected.
  • AFF4: members and chunks inflate through decompressobj with max_length; output past the declared size, or a truncated stream, is refused with a finding.
  • PDF: #HH escapes in names are decoded before matching active content, so /Java#53cript is stripped like /JavaScript. Malformed escapes stay literal.

One test per part with a small crafted input. CHANGELOG entry under Unreleased / Security.

Verification

Only CHANGELOG.md conflicted. Full suite on the merged result: 1426 tests OK (14 skipped).


Generated by Claude Code

deadp and others added 2 commits October 21, 2026 14:02
EWF2: cap the chunk count against the image size. Registry log: reject a
hive size beyond the log. AFF4: inflate with a max_length and refuse members
or chunks that inflate past their declared size or are truncated. PDF: decode
#HH escapes in names before matching active content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@switch-nz
switch-nz merged commit 876fec0 into main Oct 29, 2026
33 checks passed
@switch-nz
switch-nz deleted the claude/bound-hostile-inputs branch October 29, 2026 10:14
deadp added a commit to deadp/strata that referenced this pull request Oct 30, 2026
Co-authored-by: Queue runner <queue-runner@noreply.invalid>
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.

3 participants