CVE-2017-16545

NameCVE-2017-16545
DescriptionThe ReadWPGImage function in coders/wpg.c in GraphicsMagick 1.3.26 does not properly validate colormapped images, which allows remote attackers to cause a denial of service (ImportIndexQuantumType invalid write and application crash) or possibly have unspecified other impact via a malformed WPG image.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub code/issues, web search, more)
ReferencesDSA-4321-1
NVD severitymedium (attack range: remote)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
graphicsmagick (PTS)jessie1.3.20-3+deb8u2vulnerable
jessie (security)1.3.20-3+deb8u4fixed
stretch1.3.25-8vulnerable
stretch (security)1.3.30+hg15796-1~deb9u1fixed
buster, sid1.3.30+hg15796-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
graphicsmagicksource(unstable)1.3.26-18medium
graphicsmagicksourcejessie1.3.20-3+deb8u3medium
graphicsmagicksourcestretch1.3.30+hg15796-1~deb9u1mediumDSA-4321-1

Notes

[wheezy] - graphicsmagick <no-dsa> (Not possible to trigger with presented test case)
http://hg.code.sf.net/p/graphicsmagick/code/rev/e8086faa52d0
https://sourceforge.net/p/graphicsmagick/bugs/519/
The wheezy version gives an assert before the vulnerability can be triggered. Due to this
the severity of the wheezy version is low even though the vulnerable code is still present.
The patch is trivial so it may be worth fixing in combination with some other fix.

Search for package or bug name: Reporting problems