-
Notifications
You must be signed in to change notification settings - Fork 45
Regression in CIccTagColorantOrder::Validate() #752
Copy link
Copy link
Labels
BisectMaintainer indicates BisectMaintainer indicates BisectTriagedMaintainer indicates triaged status and ready for developer handoffMaintainer indicates triaged status and ready for developer handoff
Description
Maintainer Summary
2026-03-28 04:33:49 UTC
Bisect
Problem Statement
CWE: CWE-20 (Improper Input Validation)
File: IccProfLib/IccTagBasic.cpp lines 8713-8724
Status: Regression introduced by PR #708
Observation
- ColorantTableOutTag (0x636C6F74, 'clot') corresponds to PCS channels
- A colorSpace=CMYK (4 channel) and PCS=Lab (3 channel) should validate the clot tag against PCS
- After c2ea9da, a clot with 3 entry CMYK profile fails validation when it is correct
- A malformed clot tag with 4 entries (match colorSpace !PCS) should fail
Code Review
Good: e62525a
Three-branch validation in CIccTagColorantOrder::Validate():
- sigPath == icSigColorantTableTag -> validate m_nCount against colorSpace
- sigPath == icSigColorantTableOutTag -> validate m_nCount against PCS
- else -> warn "Unknown number of required colorants"
Bad: c2ea9da
Single-branch validation:
- Validate m_nCount against colorSpace
libIccTest Check
- CF-340: colorantTableOutTag count vs PCS channels validation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BisectMaintainer indicates BisectMaintainer indicates BisectTriagedMaintainer indicates triaged status and ready for developer handoffMaintainer indicates triaged status and ready for developer handoff