Skip to content

fix(research): pin bounded PDF Brotli decoder - #1246

Merged
AnthonyRonning merged 1 commit into
masterfrom
codex-pdf-brotli-budget-maple
Oct 24, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
codex-pdf-brotli-budget-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Pin Maple Research's PDF reader to the bounded pdf_oxide decoder in OpenSecretCloud/pdf_oxide#3.

The dependency change rejects Brotli's nonstandard large-window header before its reader can allocate a very large ring buffer, and caps decoded stream output at the existing PDFOxide FlateDecode limit. This is a PDF resource-exhaustion fix. It does not claim that Maple's Rust decoder has Google's C decoder memory-corruption CVE-2026-111497.

Scope

  • Update only the pdf_oxide git revision in Maple Research's Cargo.toml and Cargo.lock.
  • No production release or desktop distribution change is included.
  • The dependency PR is merged. This pin targets its implementation commit 2bc9246782fe874a97e57e348acc7a9eaa27ca4d, now contained in maple-0.3.74 at merge commit c4aa3c184113cae9f9daf104c32c87886e0e5440.

Validation

  • PDFOxide: cargo test --locked --release --lib decoders::brotli::tests — 4 passed; formatting check passed.
  • Maple Research: cargo test --locked --lib pdf_extractor::tests — 14 passed, 1 model-backed OCR test ignored.
  • Local-only PDF smoke with the pinned decoder and Rust Brotli 8.0.2 / decompressor 5.0.0: a valid Brotli PDF decoded; malformed block-switch and large-window-header PDFs returned decode errors without a panic.
  • A temporary test through Maple's extract_document_content_impl returned ordinary errors for both malformed PDFs, then extracted text from the valid PDF. The temporary test and fixtures were not committed. The GUI file picker and packaged app runtime were not exercised.
  • Maple's pre-commit gate: cargo metadata --locked, cargo fmt --check, and cargo test --locked --all-targets — passed (427 library tests and 3 binary tests; 2 ignored).
  • git diff --check — passed.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@AnthonyRonning
AnthonyRonning merged commit bc5d94e into master Oct 24, 2026
37 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.

1 participant