Repository navigation
feat!: hold every page, frame and tile to max_side on its longest side - #13
Merged
Merged
Conversation
A pixel budget alone lets through a page a few pixels wide and a million tall, and an abnormally tall image is what drove libtiff's RGBA reader to write colour data to an arbitrary address (CVE-2025-9900). The new policy field max_side bounds either side of any one page, frame or tile: 30,000 by default, three times the longest side in the corpus (9,933 pixels, A3 at 600 dpi), and 15,000 under STRICT. The readers report the longest side across every frame they walk, the PDF path across every page at the render dpi, and the command takes --max-side. Breaking because a file that passed last week can be refused this week: a page, frame or tile longer than 30,000 pixels on a side now fails under the default policy. Set max_side to allow it. The proposed record for CVE-2025-9900 now names the field and the test that proves the refusal, so it can be promoted. BREAKING CHANGE: the default policy refuses a page, frame or tile longer than 30,000 pixels on either side; set max_side to allow it. Co-authored-by: Yvette Mankerian <yvettekm@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new policy field,
max_side, bounds either side of any one page, frame or tile. The pixel budget alone let through a page a few pixels wide and a million tall, and an abnormally tall image is what drove libtiff's RGBA reader to write colour data to an arbitrary address (CVE-2025-9900, bucket B in the backfill).Policy.max_side: 30,000 by default (three times the longest side in the corpus, 9,933 pixels for A3 at 600 dpi), 15,000 underSTRICT.Facts.max_sidecarries it.sillybos --max-side Non the command line, and a row in the README's policy table.Breaking
A file that passed last week can be refused this week: a page, frame or tile longer than 30,000 pixels on a side now fails under the default policy. Per the release rule in AGENTS.md that is a
feat!, so merging this cuts 4.0.0. Tetrak OCR pins>=3,<4and will need its floor raised.Checks
392 tests pass; ruff, mypy and
twine checkclean.🤖 Generated with Claude Code