Skip to content

feat: a policy on a TIFF's tags, and on tags that contradict each other - #18

Merged
stephen-masters merged 1 commit into
docs/advisories-backfill-readingfrom
feat/tiff-tags
Nov 3, 2026
Merged

stephen-masters merged 1 commit into
docs/advisories-backfill-readingfrom
feat/tiff-tags

Conversation

@stephen-masters

Copy link
Copy Markdown
Contributor

Stacked on #17 (the backfill reading), because it promotes the last three of its proposals; retarget to main once #17 is merged.

Two fields on Policy, both allow-by-default so that no file that passed before is refused, so a feat, not a feat!:

  • 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.

Facts and Header carry tags and inconsistencies; the command line has --tiff-tags and --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 proposals now reports nothing proposed: the backfill reading is complete.

🤖 Generated with Claude Code

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
stephen-masters merged commit 20bd463 into docs/advisories-backfill-reading 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