Skip to content

feat!: refuse a TIFF whose tags contradict each other by default - #20

Merged
stephen-masters merged 1 commit into
mainfrom
feat/refuse-inconsistent-tiff-tags
Nov 3, 2026
Merged

stephen-masters merged 1 commit into
mainfrom
feat/refuse-inconsistent-tiff-tags

Conversation

@stephen-masters

Copy link
Copy Markdown
Contributor

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_tags to False under DEFAULT and STRICT, replaces the command-line flag --no-inconsistent-tiff-tags with --inconsistent-tiff-tags (which allows them, as --interlaced-png does 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

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>
@stephen-masters
stephen-masters merged commit 2353648 into main Nov 3, 2026
11 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