Multiple use-after-free vulnerabilities in the gx_image_enum_begin function in base/gxipixel.c in Ghostscript before ecceafe3abba2714ef9b432035fe0739d9b1a283 allow remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted PostScript document.
https://security.gentoo.org/glsa/201708-06
https://bugs.ghostscript.com/show_bug.cgi?id=697596
http://www.securitytracker.com/id/1037899
http://www.securityfocus.com/bid/96428
http://git.ghostscript.com/?p=ghostpdl.git%3Bh=ecceafe3abba2714ef9b432035fe0739d9b1a283