Bug#916721: graphicsmagick: CVE-2018-20184
Hi, upstream patch contains unrelated code refactoring (deduplication of the _TargaInfo structure). I have trimmed it down so it contains only necessary changes, you can find the modified patch in attachement (it's only a few lines long). cheers, Hugo -- Hugo Lefeuvre (hle)|www.owl.eu.com RSA4096_ 360B 03B3 BF27 4F4D 7A3F D5E8 14AA 1EB8 A247 3DFD ed25519_ 37B2 6D38 0B25 B8A2 6B9F 3A65 A36F 5357 5F2D DC4C Subject: WriteTGAImage(): reject image rows/columns larger than 65535 Author: Bob Friesenhahn , Hugo Lefeuvre Origin: http://hg.graphicsmagick.org/hg/GraphicsMagick/rev/15d1b5fd003b Bug: https://sourceforge.net/p/graphicsmagick/bugs/583/ --- a/coders/tga.c 2018-12-26 14:54:50.250695800 +0100 +++ b/coders/tga.c 2018-12-26 14:54:50.250695800 +0100 @@ -949,6 +949,10 @@ targa_info.colormap_length=(unsigned short) image->colors; targa_info.colormap_size=24; } + + if ((image->columns > 65535) || (image->rows > 65535)) +ThrowWriterException(CoderError,ImageColumnOrRowSizeIsNotSupported, image); + /* Write TGA header. */ signature.asc Description: PGP signature
Bug#916721: graphicsmagick: CVE-2018-20184
Source: graphicsmagick Version: 1.3.31-1 Severity: important Tags: patch security upstream Forwarded: https://sourceforge.net/p/graphicsmagick/bugs/583/ Hi, The following vulnerability was published for graphicsmagick. CVE-2018-20184[0]: | In GraphicsMagick 1.4 snapshot-20181209 Q8, there is a heap-based | buffer overflow in the WriteTGAImage function of tga.c, which allows | attackers to cause a denial of service via a crafted image file, | because the number of rows or columns can exceed the pixel-dimension | restrictions of the TGA specification. If you fix the vulnerability please also make sure to include the CVE (Common Vulnerabilities & Exposures) id in your changelog entry. For further information see: [0] https://security-tracker.debian.org/tracker/CVE-2018-20184 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20184 [1] https://sourceforge.net/p/graphicsmagick/bugs/583/ [2] http://hg.graphicsmagick.org/hg/GraphicsMagick/rev/15d1b5fd003b Please adjust the affected versions in the BTS as needed. Regards, Salvatore