Repository navigation
feat!: refuse a TIFF whose tags contradict each other by default - #20
Merged
Merged
Conversation
A ColorMap with the wrong number of entries for the bit depth (CVE-2026-112896) or a floating-point Predictor on integer samples (CVE-2026-112396) is malformed, by design or by accident, and no scanner writes either; both exist to reach an encoder that trusts the tag. 4.2.0 reported them and left the default permissive. Now the default refuses them, under DEFAULT and STRICT alike, and a source known to write such files can allow them. BREAKING CHANGE: allow_inconsistent_tiff_tags now defaults to False, so a TIFF with a contradicting ColorMap or Predictor that passed under 4.2.0 is refused. The command-line flag --no-inconsistent-tiff-tags is replaced by --inconsistent-tiff-tags, which allows them. 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.
Stevie's call: a ColorMap with the wrong number of entries for the bit depth (CVE-2026-112896) or a floating-point Predictor on integer samples (CVE-2026-112396) is malformed, by design or by accident, and no scanner writes either, so the check should refuse them unless someone has a reason to allow them.
4.2.0 reported both and left the default permissive. This flips
allow_inconsistent_tiff_tagstoFalseunderDEFAULTandSTRICT, replaces the command-line flag--no-inconsistent-tiff-tagswith--inconsistent-tiff-tags(which allows them, as--interlaced-pngdoes for interlacing), and updates the README row, the tests and the two advisory records, whose refusal is now by default.Breaking by the release rule, since a file that passed under 4.2.0 is refused, so a
feat!and 5.0.0. Every TIFF in the Tetrak OCR checkout was checked under the new default: none is affected. Tetrak OCR's pin (sillybos>=4,<5) is raised in a follow-up once this is released.🤖 Generated with Claude Code