Advisory

GHSA-cr4v-6jm6-4963

Details, part 2 of 2. The advisory

Details

Root cause analysis

In CompositeDeepScanLine::readPixels:

  1. Per-pixel totals are accumulated in vector<unsigned int> total_sizes.
  2. For attacker-controlled large counts across many parts, total_sizes[ptr] wraps modulo 2^32.
  3. overall_sample_count is then derived from wrapped totals and used in samples[channel].resize(overall_sample_count).
  4. 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.

Sources & licences