Skip to content

Bound hostile-input allocations; decode PDF name escapes - #186

Open
deadp wants to merge 1 commit into
switch-nz:mainfrom
deadp:deadp/bound-hostile-inputs
Open

deadp wants to merge 1 commit into
switch-nz:mainfrom
deadp:deadp/bound-hostile-inputs

Conversation

@deadp

@deadp deadp commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

What

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.

🤖 Generated with Claude Code

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>
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.

1 participant