CVE-2017-18219:Allocation Failure Vulnerability in GraphicsMagick 1.3.26 PNG Image Processing

splash
Back

Description Preview

A vulnerability was discovered in GraphicsMagick 1.3.26 where the ReadOnePNGImage function in coders/png.c fails to properly validate image dimensions before memory allocation. When processing a specially crafted PNG file, the application attempts to allocate an excessively large png_pixels array, which can lead to a denial of service condition. This vulnerability is classified as CWE-770 (Allocation of Resources Without Limits or Throttling).

Overview

GraphicsMagick is a widely used image processing library and toolkit. The vulnerability exists in the PNG image processing code where input validation is insufficient before memory allocation. When processing a maliciously crafted PNG file with manipulated dimensions, the application attempts to allocate memory for a png_pixels array of excessive size. This allocation failure can cause the application to crash or become unresponsive, resulting in a denial of service condition. The issue affects GraphicsMagick version 1.3.26 and potentially earlier versions.

Remediation

The following remediation steps are recommended:

  1. Update GraphicsMagick to the latest version that contains the fix for this vulnerability.
  2. Apply the patch referenced in the GraphicsMagick repository (cadd4b0522fa).
  3. If updating is not immediately possible, implement input validation to restrict the size of processed PNG images.
  4. Consider implementing resource limits on memory allocation for image processing operations.
  5. For Debian users, apply the security updates referenced in DLA-1322-1 or DLA-1456-1.
  6. For Ubuntu users, apply the security update referenced in USN-4266-1.
  7. For Fedora users, apply the security updates referenced in FEDORA-2019-da4c20882c and FEDORA-2019-425a1aa7c9.

References

  1. GraphicsMagick Patch: http://hg.graphicsmagick.org/hg/GraphicsMagick/rev/cadd4b0522fa
  2. SecurityFocus BID: http://www.securityfocus.com/bid/103258
  3. Debian LTS Security Announcement: https://lists.debian.org/debian-lts-announce/2018/03/msg00025.html
  4. Debian LTS Security Update: https://lists.debian.org/debian-lts-announce/2018/08/msg00002.html
  5. Fedora Security Update: https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PF62B5PJA2JDUOCKJGUQO3SPL74BEYSV/
  6. Fedora Security Update: https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WHIKB4TP6KBJWT2UIPWL5MWMG5QXKGEJ/
  7. GraphicsMagick Bug Report: https://sourceforge.net/p/graphicsmagick/bugs/459/
  8. Ubuntu Security Notice: https://usn.ubuntu.com/4266-1/
  9. Debian Security Advisory: https://www.debian.org/security/2018/dsa-4321

Industry ExposureMost to least
This section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.

  1. Educational Services
    Educational Services
  2. Management of Companies & Enterprises
    Management of Companies & Enterprises
  3. Manufacturing
    Manufacturing
  4. Professional, Scientific, & Technical Services
    Professional, Scientific, & Technical Services
  5. Retail Trade
    Retail Trade
  6. Accommodation & Food Services
    Accommodation & Food Services
  7. Administrative, Support, Waste Management & Remediation Services
    Administrative, Support, Waste Management & Remediation Services
  8. Agriculture, Forestry Fishing & Hunting
    Agriculture, Forestry Fishing & Hunting
  9. Arts, Entertainment & Recreation
    Arts, Entertainment & Recreation
  10. Construction
    Construction
  11. Finance and Insurance
    Finance and Insurance
  12. Health Care & Social Assistance
    Health Care & Social Assistance
  13. Information
    Information
  14. Mining
    Mining
  15. Other Services (except Public Administration)
    Other Services (except Public Administration)
  16. Public Administration
    Public Administration
  17. Real Estate Rental & Leasing
    Real Estate Rental & Leasing
  18. Transportation & Warehousing
    Transportation & Warehousing
  19. Utilities
    Utilities
  20. Wholesale Trade
    Wholesale Trade

Focus on What Matters

  1. See Everything.
  2. Identify True Risk.
  3. Proactively Mitigate Threats.

Let's talk!

background