Distro News

Ubuntu patches three memory safety flaws in apng2gif APNG converter

Key Takeaway

Three CVEs from 2017 affecting apng2gif remain exploitable via crafted APNG files, enabling information disclosure, denial of service, and potential arbitrary code execution.

Summary

Ubuntu has issued security notice USN-9132-1 addressing three vulnerabilities in apng2gif, a command-line utility that converts Animated PNG files to GIF format. Security researcher Dileep Kumar Jallepalli found that the tool mishandles APNG file parsing through integer overflows, unbounded memory allocations, and incorrect chunk size validation. The flaws, tracked as CVE-2017-6960, CVE-2017-6961, and CVE-2017-6962, allow attackers to trigger heap-based buffer over-reads, buffer overflows, and application crashes by tricking users or automated systems into processing maliciously crafted APNG files.

The affected package is available in Ubuntu's universe repository, meaning it receives community-supported security updates rather than full Canonical maintenance. Users running apng2gif in automated workflows, image processing pipelines, or desktop environments should apply the updated package promptly. The vulnerabilities span information disclosure, denial of service, and arbitrary code execution severity levels.

Vulnerability breakdown and attack vectors

  • CVE-2017-6960 (heap-based buffer over-read): apng2gif incorrectly handles APNG file loading, causing an integer overflow that leads to reading beyond allocated heap memory boundaries, potentially leaking sensitive information or crashing the process.
  • CVE-2017-6961 (unbounded memory allocation): The tool fails to impose limits on memory allocation sizes when reading APNG chunks, allowing attackers to trigger excessive memory consumption and cause denial of service through application crashes.
  • CVE-2017-6962 (heap-based buffer overflow with code execution): Improper handling of certain chunk sizes results in integer overflow followed by heap buffer overflow, enabling denial of service or potentially arbitrary code execution in the worst case.
  • Attack surface: All three vulnerabilities require convincing a user or automated system to convert a specially crafted APNG file, making social engineering or compromise of upstream image sources viable attack paths.
  • Package repository context: apng2gif resides in Ubuntu's universe repository, indicating community-supported rather than officially maintained security coverage from Canonical.

Why it matters

Image conversion utilities in Linux distribution repositories form a trusted part of automated publishing pipelines, thumbnail generation services, and desktop workflows, making memory safety flaws in these tools attractive for supply-chain and server-side exploitation. The universe repository status of apng2gif highlights ongoing challenges in securing community-maintained packages that may lack the rigorous security review applied to main repository software, reinforcing the need for sandboxing and input validation in image processing pipelines.

Original reference: ubuntu.com →