Skip to content

fix: validate embedded TIFF profiles - #1752

Merged
ChrisCoxArt merged 2 commits into
masterfrom
ci-qa-cli-icctiffdump-spectral-mismatch
Jul 21, 2026
Merged

fix: validate embedded TIFF profiles#1752
ChrisCoxArt merged 2 commits into
masterfrom
ci-qa-cli-icctiffdump-spectral-mismatch

Conversation

@xsscx

@xsscx xsscx commented Jul 21, 2026

Copy link
Copy Markdown
Member

PR Summary

#1678

Checklist

  • Signed all Commits in PR
  • Built locally according to docs/build.md
  • Followed the guidelines in Contributing document
  • Ran relevant CTest/profile tests from docs/ctest.md
  • Updated documentation for user-visible behavior changes
  • Ran sanitizer coverage for memory-safety or parser changes
  • Added or updated regression coverage for behavior changes
  • For Python package changes, followed docs/python-packaging-release.md for PR and merge requirements
  • Did not change maintainer-owned workflow, CTest, CPack, sanitizer, release, or security infrastructure unless requested by an iccDEV maintainer
  • New source files include the ICC copyright and BSD 3-Clause license header
  • Code style matches nearby code: 2-space indent, K&R braces, m_ members

Legal Requirements

All official software projects hosted by the International Color Consoritum (ICC)
follows the open source software best practice policies. The International Color Consoritum IP policy governs ICC specification development and contributions to ICC open source software. Software contributions are also covered by the Contributor License Agreement (CLA).

Contributor License Agreements

Developers who wish to contribute code to be considered for inclusion
in ICC software must first complete a Contributor License Agreement
(CLA)
.

There is no cost or membership requirement to sign the ICC Contributor License Agreement (CLA). Please note that this is different from membership in the International Color Consortium (ICC). If your organization relies on our projects, please become a member. Membership dues are an essential source of funding and investment for these projects.

  • If you are an individual writing the code on your own time and you are SURE you are the sole owner of any intellectual property you contribute, you can sign the CLA as an individual contributor.

  • If you are writing the code as part of your job, or if there is any possibility that your employer might think they own any intellectual property you create, then you should use the Corporate Contributor Licence Agreement

License

ICC software is licensed under the BSD 3-Clause "New" or "Revised" License. Contributions to ICC software projects should abide by that license unless otherwised specified or approved by the ICC.

Copyright Notices

All new source files must begin with the ICC Copyright notice and include or reference the BSD 3-Clause "New" or "Revised" License.

INTELLECTUAL PROPERTY & PATENTS

Participation in ICC's development activities is subject to ICC's Patent Policy.

Maintainer Review Required

If you have questions, contact a listed Maintainer.

@xsscx xsscx added this to the v2.3.2.3 milestone Jul 21, 2026
Copilot AI review requested due to automatic review settings July 21, 2026 11:09
@xsscx
xsscx requested a review from ChrisCoxArt as a code owner July 21, 2026 11:09
@github-actions github-actions Bot added Tools Command-line tool or GUI tool changes Source C or C++ source code changes labels Jul 21, 2026
@xsscx xsscx self-assigned this Jul 21, 2026
@github-actions github-actions Bot added the pending CI checks still running label Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds early validation of embedded ICC profiles in iccTiffDump.

Changes:

  • Reads all embedded profile tags before dumping metadata.
  • Rejects noncompliant profiles before display or extraction.

Comment thread Tools/CmdLine/IccTiffDump/iccTiffDump.cpp Outdated
Comment thread Tools/CmdLine/IccTiffDump/iccTiffDump.cpp Outdated
Comment thread Tools/CmdLine/IccTiffDump/iccTiffDump.cpp Outdated
Comment thread Tools/CmdLine/IccTiffDump/iccTiffDump.cpp Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 11:18
@xsscx
xsscx requested a review from dwtza as a code owner July 21, 2026 11:18
@github-actions github-actions Bot added Scripts Shell, PowerShell, or repository automation scripts Unix Linux, macOS, Bash, or POSIX shell scope labels Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@xsscx xsscx assigned ChrisCoxArt and unassigned xsscx Jul 21, 2026
@github-actions github-actions Bot added passed All CI checks passed and removed pending CI checks still running labels Jul 21, 2026
@xsscx
xsscx requested review from Copilot and removed request for dwtza July 21, 2026 12:00
@xsscx
xsscx force-pushed the ci-qa-cli-icctiffdump-spectral-mismatch branch from 9c26f35 to 0676110 Compare July 21, 2026 15:59
@github-actions github-actions Bot added pending CI checks still running and removed passed All CI checks passed labels Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@github-actions github-actions Bot added passed All CI checks passed and removed pending CI checks still running labels Jul 21, 2026
Copilot AI review requested due to automatic review settings July 21, 2026 17:52
@xsscx
xsscx force-pushed the ci-qa-cli-icctiffdump-spectral-mismatch branch from 0676110 to 4ec01df Compare July 21, 2026 17:52
@github-actions github-actions Bot added pending CI checks still running and removed passed All CI checks passed labels Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@xsscx

xsscx commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

Test PR 1752 with the iccDEV Regression Container

Run these one-line commands on the host:

IMAGE=ghcr.io/internationalcolorconsortium/iccdev-ci-regression:sha-750f43102b58cb60dbc9eaa253b3d336757530cb
docker pull "$IMAGE"
docker image inspect "$IMAGE" --format '{{index .RepoDigests 0}} revision={{index .Config.Labels "org.opencontainers.image.revision"}}'
docker run --rm -it "$IMAGE" bash

Run these one-line commands inside the container:

set -euo pipefail
cd /workspace/iccDEV
git fetch --depth=1 origin pull/1752/head:pr-1752
git checkout pr-1752
cd Build
git branch && echo "---" && git log --oneline -1
SAN_FLAGS='-fsanitize=address,undefined,integer,bounds,null,float-divide-by-zero,alignment,vla-bound -fno-omit-frame-pointer -g -O0'
CC=clang CXX=clang++ CFLAGS="$SAN_FLAGS" CXXFLAGS="$SAN_FLAGS" LDFLAGS='-fsanitize=address,undefined,integer,bounds,null,float-divide-by-zero,alignment,vla-bound -Wl,--build-id' cmake Cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -DENABLE_UBSAN=ON -DSANITIZER_RECOVER=ON -DENABLE_TOOLS=ON -DENABLE_TESTS=ON -DENABLE_WXWIDGETS=OFF -Wno-dev
cmake --build . --parallel 32
cmake --build . --target build-test-binaries --parallel 32
cd ../Testing
for d in ../Build/Tools/*; do [ -d "$d" ] && export PATH="$(realpath "$d"):$PATH"; done
printf '%s\n%s\n%s\n' 'unsigned-integer-overflow:*/IccMD5.cpp' 'shift-base:*/IccMD5.cpp' 'shift-exponent:*/IccMD5.cpp' > silence.txt
export ASAN_OPTIONS='print_scariness=1:halt_on_error=1:detect_leaks=0'
export UBSAN_OPTIONS="halt_on_error=0:suppressions=$PWD/silence.txt"
./CreateAllProfiles.sh
./RunTests.sh
(cd HDR && ./mkprofiles.sh)
(cd Display && ./RunProtoTests.sh)
(cd hybrid && ./BuildAndTest.sh)
(cd CalcTest && ./checkInvalidProfiles.sh)
(cd mcs && ./updateprev.sh)
(cd mcs && ./updateprevWithBkgd.sh)
ctest --test-dir ../Build --output-on-failure --no-tests=error

The immutable image tag keeps the container toolchain reproducible. To test the
newest promoted maintainer image instead, replace the IMAGE value with:

IMAGE=ghcr.io/internationalcolorconsortium/iccdev-ci-regression:latest

Copilot AI review requested due to automatic review settings July 21, 2026 19:29
@xsscx
xsscx force-pushed the ci-qa-cli-icctiffdump-spectral-mismatch branch from 4ec01df to eb4fc34 Compare July 21, 2026 19:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 21, 2026 20:45
@xsscx
xsscx force-pushed the ci-qa-cli-icctiffdump-spectral-mismatch branch from eb4fc34 to c88d1b3 Compare July 21, 2026 20:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@github-actions github-actions Bot added passed All CI checks passed and removed pending CI checks still running labels Jul 21, 2026
@ChrisCoxArt
ChrisCoxArt merged commit 800ac41 into master Jul 21, 2026
38 checks passed
@xsscx
xsscx deleted the ci-qa-cli-icctiffdump-spectral-mismatch branch July 21, 2026 22:05
@xsscx xsscx added the Merge Defect Maintainer indicates Merge Defect label Aug 17, 2026
@xsscx

xsscx commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

Bisect

2026-08-17 16:17:00 UTC

Note: Living off the Land PoC

  • PoC from Inventory

Merge Defect

Bisect: 800ac41 TIFF Read regression for recursive tag loading & validation

Identification Method

  1. Post Merge Audit Report
  2. 512 Embedded V5 Profiles aka Billion Icc Lols PoC

Resolution

  1. Fix in Process
  2. Testing these iccLoL PoCs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merge Defect Maintainer indicates Merge Defect passed All CI checks passed Scripts Shell, PowerShell, or repository automation scripts Source C or C++ source code changes Tools Command-line tool or GUI tool changes Unix Linux, macOS, Bash, or POSIX shell scope

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QA Report: iccTiffDump accepts malformed embedded ICC profile & exits success

3 participants