Bug 1052689 - (CVE-2017-12669) VUL-2: CVE-2017-12669: ImageMagick: Memory leak in WriteCALSImage in coders/cals.c
(CVE-2017-12669)
VUL-2: CVE-2017-12669: ImageMagick: Memory leak in WriteCALSImage in coders/c...
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P4 - Low : Normal
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/189777/
CVSSv3:SUSE:CVE-2017-12669:5.3:(AV:N/...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-08 06:58 UTC by Johannes Segitz
Modified: 2018-02-09 15:32 UTC (History)
2 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Reproducer (5 bytes, text/plain)
2017-08-08 06:58 UTC, Johannes Segitz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Segitz 2017-08-08 06:58:48 UTC
Created attachment 735620 [details]
Reproducer

CVE-2017-12669

ImageMagick 7.0.6-2 has a memory leak vulnerability in WriteCALSImage in
coders/cals.c.

valgrind convert leak-WriteCALSImage out.cals

Only SLE 12

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-12669
https://github.com/ImageMagick/ImageMagick/commit/3d5ac8c20846871f1eb3068b65f93da7cd33bfd0
https://github.com/ImageMagick/ImageMagick/issues/571
Comment 1 Marcus Meissner 2017-09-27 13:46:42 UTC
leaks only ImageInfo struct, small. defered.
Comment 2 Petr Gajdos 2017-12-05 15:10:58 UTC
cals.c: 12/ImageMagick, 42.2/GraphicsMagick and 42.3/GraphicsMagick
Comment 3 Petr Gajdos 2017-12-05 15:37:08 UTC
BEFORE

12/ImageMagick:

$ valgrind -q --leak-check=full convert leak-WriteCALSImage out.cals
convert: unexpected end-of-file `leak-WriteCALSImage': No such file or directory @ error/pwp.c/ReadPWPImage/258.
==28058== 17,005 (16,792 direct, 213 indirect) bytes in 1 blocks are definitely lost in loss record 15 of 15
==28058==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28058==    by 0x4F48CCF: AcquireImageInfo (image.c:334)
==28058==    by 0x4F4A9ED: CloneImageInfo (image.c:936)
==28058==    by 0x861A563: ???
==28058==    by 0x4EC124C: WriteImage (constitute.c:1237)
==28058==    by 0x4EC1B31: WriteImages (constitute.c:1394)
==28058==    by 0x531B923: ConvertImageCommand (convert.c:3154)
==28058==    by 0x5385C52: MagickCommandGenesis (mogrify.c:166)
==28058==    by 0x400836: ConvertMain (convert.c:81)
==28058==    by 0x400836: main (convert.c:92)
$

42.3/GraphicsMagick:

No WriteImage() related valgrind errors. Different code, GraphicsMagick considering unaffected.

home:pgajdos:magick/GraphicsMagick:

$ valgrind -q --leak-check=full gm convert leak-WriteCALSImage out.cals
gm convert: Unexpected end-of-file (leak-WriteCALSImage).
$

PATCH

in comment 0

AFTER

12/ImageMagick:

$ valgrind -q --leak-check=full convert leak-WriteCALSImage out.cals
convert: unexpected end-of-file `leak-WriteCALSImage': No such file or directory @ error/pwp.c/ReadPWPImage/258.
$
Comment 4 Petr Gajdos 2017-12-05 15:37:21 UTC
Will submit for: 12/ImageMagick
Comment 5 Petr Gajdos 2017-12-06 09:51:02 UTC
I believe all fixed.
Comment 7 Swamp Workflow Management 2017-12-20 17:10:55 UTC
SUSE-SU-2017:3378-1: An update that fixes 26 vulnerabilities is now available.

Category: security (important)
Bug References: 1048457,1049796,1050116,1050139,1050632,1051441,1051847,1052450,1052553,1052689,1052758,1052764,1054757,1055214,1056432,1057719,1057729,1057730,1058485,1058637,1059666,1059778,1060577,1066003,1067181,1067184
CVE References: CVE-2017-11188,CVE-2017-11478,CVE-2017-11527,CVE-2017-11535,CVE-2017-11640,CVE-2017-11752,CVE-2017-12140,CVE-2017-12435,CVE-2017-12587,CVE-2017-12644,CVE-2017-12662,CVE-2017-12669,CVE-2017-12983,CVE-2017-13134,CVE-2017-13769,CVE-2017-14172,CVE-2017-14173,CVE-2017-14175,CVE-2017-14341,CVE-2017-14342,CVE-2017-14531,CVE-2017-14607,CVE-2017-14733,CVE-2017-15930,CVE-2017-16545,CVE-2017-16546
Sources used:
SUSE Linux Enterprise Software Development Kit 11-SP4 (src):    ImageMagick-6.4.3.6-7.78.14.1
SUSE Linux Enterprise Server 11-SP4 (src):    ImageMagick-6.4.3.6-7.78.14.1
SUSE Linux Enterprise Debuginfo 11-SP4 (src):    ImageMagick-6.4.3.6-7.78.14.1
Comment 8 Swamp Workflow Management 2017-12-20 17:37:58 UTC
SUSE-SU-2017:3388-1: An update that solves 32 vulnerabilities and has one errata is now available.

Category: security (important)
Bug References: 1048457,1049796,1050083,1050116,1050139,1050632,1051441,1051847,1052450,1052553,1052689,1052744,1052758,1052764,1054757,1055214,1056432,1057157,1057719,1057729,1057730,1058485,1058637,1059666,1059778,1060176,1060577,1061254,1062750,1066003,1067181,1067184,1067409
CVE References: CVE-2017-11188,CVE-2017-11478,CVE-2017-11523,CVE-2017-11527,CVE-2017-11535,CVE-2017-11640,CVE-2017-11752,CVE-2017-12140,CVE-2017-12435,CVE-2017-12587,CVE-2017-12644,CVE-2017-12662,CVE-2017-12669,CVE-2017-12983,CVE-2017-13134,CVE-2017-13769,CVE-2017-14138,CVE-2017-14172,CVE-2017-14173,CVE-2017-14175,CVE-2017-14341,CVE-2017-14342,CVE-2017-14531,CVE-2017-14607,CVE-2017-14682,CVE-2017-14733,CVE-2017-14989,CVE-2017-15217,CVE-2017-15930,CVE-2017-16545,CVE-2017-16546,CVE-2017-16669
Sources used:
SUSE Linux Enterprise Workstation Extension 12-SP3 (src):    ImageMagick-6.8.8.1-71.17.1
SUSE Linux Enterprise Workstation Extension 12-SP2 (src):    ImageMagick-6.8.8.1-71.17.1
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    ImageMagick-6.8.8.1-71.17.1
SUSE Linux Enterprise Software Development Kit 12-SP2 (src):    ImageMagick-6.8.8.1-71.17.1
SUSE Linux Enterprise Server for Raspberry Pi 12-SP2 (src):    ImageMagick-6.8.8.1-71.17.1
SUSE Linux Enterprise Server 12-SP3 (src):    ImageMagick-6.8.8.1-71.17.1
SUSE Linux Enterprise Server 12-SP2 (src):    ImageMagick-6.8.8.1-71.17.1
SUSE Linux Enterprise Desktop 12-SP3 (src):    ImageMagick-6.8.8.1-71.17.1
SUSE Linux Enterprise Desktop 12-SP2 (src):    ImageMagick-6.8.8.1-71.17.1
Comment 9 Swamp Workflow Management 2017-12-22 20:13:34 UTC
openSUSE-SU-2017:3420-1: An update that solves 32 vulnerabilities and has one errata is now available.

Category: security (important)
Bug References: 1048457,1049796,1050083,1050116,1050139,1050632,1051441,1051847,1052450,1052553,1052689,1052744,1052758,1052764,1054757,1055214,1056432,1057157,1057719,1057729,1057730,1058485,1058637,1059666,1059778,1060176,1060577,1061254,1062750,1066003,1067181,1067184,1067409
CVE References: CVE-2017-11188,CVE-2017-11478,CVE-2017-11523,CVE-2017-11527,CVE-2017-11535,CVE-2017-11640,CVE-2017-11752,CVE-2017-12140,CVE-2017-12435,CVE-2017-12587,CVE-2017-12644,CVE-2017-12662,CVE-2017-12669,CVE-2017-12983,CVE-2017-13134,CVE-2017-13769,CVE-2017-14138,CVE-2017-14172,CVE-2017-14173,CVE-2017-14175,CVE-2017-14341,CVE-2017-14342,CVE-2017-14531,CVE-2017-14607,CVE-2017-14682,CVE-2017-14733,CVE-2017-14989,CVE-2017-15217,CVE-2017-15930,CVE-2017-16545,CVE-2017-16546,CVE-2017-16669
Sources used:
openSUSE Leap 42.3 (src):    ImageMagick-6.8.8.1-40.1
openSUSE Leap 42.2 (src):    ImageMagick-6.8.8.1-30.12.1
Comment 10 Marcus Meissner 2018-02-09 15:32:33 UTC
released