Skip to content

Fix: SEGV in CIccCalculatorFunc::ApplySequence()#652

Merged
xsscx merged 1 commit intomasterfrom
issue-644
Mar 7, 2026
Merged

Fix: SEGV in CIccCalculatorFunc::ApplySequence()#652
xsscx merged 1 commit intomasterfrom
issue-644

Conversation

@ChrisCoxArt
Copy link
Contributor

Test before adding to avoid overflow.
And add one defensive check to try and catch overflow. (assuming that 0x80000000 ops are not actually possible).
Fixes #644

Pull Request Checklist

  • Have you followed the guidelines in Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you built your Pull Request locally with the Build Instructions?
  • Have you added or updated relevant tests?
  • Have you added or updated relevant docs?

Test before adding to avoid overflow.
And add one defensive check to try and catch overflow. (assuming that 0x80000000 ops are not actually possible).
Fixes #644
@ChrisCoxArt ChrisCoxArt requested a review from xsscx as a code owner March 7, 2026 22:31
@xsscx xsscx self-assigned this Mar 7, 2026
@xsscx xsscx added PR Pull Request Review in Process Issue is being Reviewed by Maintainers Pending Merge Maintainer indicates Merge Pending and requests no further changes and removed Review in Process Issue is being Reviewed by Maintainers pending labels Mar 7, 2026
Copy link
Member

@xsscx xsscx left a comment

Choose a reason for hiding this comment

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

2026-03-07 22:34:50 UTC

@xsscx
Copy link
Member

xsscx commented Mar 7, 2026

Maintainer Repro

2026-03-07 22:44:36 UTC

[2026-03-07 22:44:36 UTC] ~/pr-652/iccDEV/Build (pr-652)$
...  
mkdir pr-652
cd pr-652
git clone https://github.com/InternationalColorConsortium/iccDEV.git
cd iccDEV
git fetch origin pull/652/head:pr-652
git checkout pr-652
cd Build
export CXX=clang++ && export CXXFLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -g -O1 -fprofile-arcs -ftest-coverage" && export LDFLAGS="-fsanitize=address,undefined -fprofile-arcs" && cmake Cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_ASAN=ON -DENABLE_UBSAN=ON -DENABLE_COVERAGE=ON
make -j32
...
ASAN_OPTIONS=detect_leaks=0:print_scariness=1 Tools/IccApplyProfiles/iccApplyProfiles foo.tif bar.tif 0 0 0 0 0 hbo-CIccCalculatorFunc-ApplySequence-IccMpeCalc_cpp-Line3715.
icc 1
100%

@xsscx xsscx changed the title check data sizes against number of ops directly Fix: SEGV in CIccCalculatorFunc::ApplySequence() Mar 7, 2026
@xsscx xsscx merged commit 46286d3 into master Mar 7, 2026
27 checks passed
@xsscx xsscx added Merged Merged CVE Requested Maintainer indicates a CVE has been Requested and removed Pending Merge Maintainer indicates Merge Pending and requests no further changes labels Mar 7, 2026
@xsscx
Copy link
Member

xsscx commented Mar 9, 2026

GHSA-vgr5-3xqx-vcqx

@ChrisCoxArt ChrisCoxArt deleted the issue-644 branch March 15, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CVE Requested Maintainer indicates a CVE has been Requested Merged Merged PR Pull Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SEGV in CIccCalculatorFunc::ApplySequence() at IccMpeCalc.cpp:3711

2 participants