Repository navigation
feat: a policy on a TIFF's tags, and on tags that contradict each other - #18
Merged
Merged
Conversation
Two fields on Policy, both allow-by-default so that no file that passed before is refused: - tiff_tags: which kinds of tag a TIFF's directories may hold. The reader sorts every tag into standard (the TIFF 6.0 set and the few later additions every writer uses), metadata (XMP, IPTC, Photoshop, Exif, ICC, GPS, GeoTIFF, GDAL and the like) or private (everything else: vendor and DNG tags). A program that saves a file back as TIFF with its tag table carries every tag into libtiff's encoder, where a crafted private tag copied process memory into the output (CVE-2026-112902); such a program allows standard and metadata only. - allow_inconsistent_tiff_tags: the reader now reads ColorMap's count, Predictor and SampleFormat, and reports 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); a policy for files from outside refuses them. Facts and Header carry `tags` and `inconsistencies`; the command line has --tiff-tags and --no-inconsistent-tiff-tags; README and the API page document both. The three B proposals that asked for this are promoted into the record with their tests, which empties the backfill's proposals. Co-authored-by: Yvette Mankerian <yvettekm@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
stephen-masters
merged commit Nov 3, 2026
20bd463
into
docs/advisories-backfill-reading
11 checks passed
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.
Stacked on #17 (the backfill reading), because it promotes the last three of its proposals; retarget to
mainonce #17 is merged.Two fields on
Policy, both allow-by-default so that no file that passed before is refused, so afeat, not afeat!:tiff_tags: which kinds of tag a TIFF's directories may hold. The reader sorts every tag into standard (the TIFF 6.0 set and the few later additions every writer uses), metadata (XMP, IPTC, Photoshop, Exif, ICC, GPS, GeoTIFF, GDAL and the like) or private (everything else: vendor and DNG tags). A read is not harmed by a private tag, so the default allows all three. A program that saves a file back as TIFF with its tag table carries every tag into libtiff's encoder, where a crafted private tag copied process memory into the output (CVE-2026-112902); such a program allows standard and metadata only.allow_inconsistent_tiff_tags: the reader now reads the ColorMap's count, the Predictor and the SampleFormat, and reports 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). No scanner writes either. A policy for files from outside turns this off.FactsandHeadercarrytagsandinconsistencies; the command line has--tiff-tagsand--no-inconsistent-tiff-tags; the README's policy table and the API page document both. Reader tests cover the sorting and both contradictions (including samples too deep for any map); check tests prove each refusal by setting and name the CVE; CLI tests cover both options; the fuzzer ran 1.37 million inputs over the new paths with no finding.The three B proposals that asked for this are promoted with their tests, and
proposalsnow reports nothing proposed: the backfill reading is complete.🤖 Generated with Claude Code