Details
Root cause analysis
In CompositeDeepScanLine::readPixels:
- Per-pixel totals are accumulated in
vector<unsigned int> total_sizes. - For attacker-controlled large counts across many parts,
total_sizes[ptr]wraps modulo2^32. overall_sample_countis then derived from wrapped totals and used insamples[channel].resize(overall_sample_count).- Decode pointer setup/consumption proceeds with true sample counts, and write operations in core unpack (
generic_unpack_deep_pointers) overrun the undersized composite sample buffer.
Allocation is based on a tiny wrapped value, but decode writes correspond to the true large sample volume.
Impact
Heap OOB write during decode. This is at minimum a reliable crash/DoS. As heap corruption, this bug could be used for potential remote code execution.