Hello community, here is the log from the commit of package lcms2 for openSUSE:Factory checked in at 2018-10-11 11:41:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lcms2 (Old) and /work/SRC/openSUSE:Factory/.lcms2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lcms2" Thu Oct 11 11:41:38 2018 rev:30 rq:639872 version:2.9 Changes: -------- --- /work/SRC/openSUSE:Factory/lcms2/lcms2.changes 2017-12-29 18:48:37.460276443 +0100 +++ /work/SRC/openSUSE:Factory/.lcms2.new/lcms2.changes 2018-10-11 11:41:43.331071648 +0200 @@ -1,0 +2,6 @@ +Wed Oct 3 17:34:41 CEST 2018 - [email protected] + +- Add check on CGATS memory allocation (bsc1108813, CVE-2018-16435, + lcms2-cgats-memory-allocation.patch). + +------------------------------------------------------------------- New: ---- lcms2-cgats-memory-allocation.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lcms2.spec ++++++ --- /var/tmp/diff_new_pack.xHjXHk/_old 2018-10-11 11:41:43.911070909 +0200 +++ /var/tmp/diff_new_pack.xHjXHk/_new 2018-10-11 11:41:43.911070909 +0200 @@ -1,7 +1,7 @@ # # spec file for package lcms2 # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -55,7 +55,8 @@ Source1: baselibs.conf Patch1: lcms2-ocloexec.patch Patch2: lcms2-visibility.patch - +# PATCH-FIX-SECURITY lcms2-cgats-memory-allocation.patch bsc1108813 CVE-2018-16435 [email protected] -- Add check on CGATS memory allocation. +Patch3: lcms2-cgats-memory-allocation.patch %description Littlecms is a small speed optimized color management engine. @@ -97,6 +98,7 @@ %setup -q %patch1 %patch2 +%patch3 -p1 chmod a-x doc/* COPYING AUTHORS @@ -109,7 +111,6 @@ # FIXME --without-threads is a workaround for a linker error %configure --disable-static --without-threads - make %{?_smp_flags} %check ++++++ lcms2-cgats-memory-allocation.patch ++++++ Partial patch. >From 768f70ca405cd3159d990e962d54456773bb8cf8 Mon Sep 17 00:00:00 2001 From: Marti Maria <[email protected]> Date: Wed, 15 Aug 2018 20:07:56 +0200 Subject: [PATCH] Upgrade Visual studio 2017 15.8 ... - Add check on CGATS memory allocation (thanks to Quang Nguyen for pointing out this) --- Projects/VC2017/jpegicc/jpegicc.vcxproj | 1 + Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj | 2 +- Projects/VC2017/lcms2_static/lcms2_static.vcxproj | 2 +- Projects/VC2017/linkicc/linkicc.vcxproj | 2 +- Projects/VC2017/psicc/psicc.vcxproj | 2 +- Projects/VC2017/testbed/testbed.vcxproj | 2 +- Projects/VC2017/tiffdiff/tiffdiff.vcxproj | 2 +- Projects/VC2017/tifficc/tifficc.vcxproj | 2 +- Projects/VC2017/transicc/transicc.vcxproj | 1 + src/cmscgats.c | 14 ++++++++++---- 10 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/cmscgats.c b/src/cmscgats.c index 1a87613..8c3e96d 100644 --- a/src/cmscgats.c +++ b/src/cmscgats.c @@ -1506,10 +1506,16 @@ void AllocateDataSet(cmsIT8* it8) t-> nSamples = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS")); t-> nPatches = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS")); - t-> Data = (char**)AllocChunk (it8, ((cmsUInt32Number) t->nSamples + 1) * ((cmsUInt32Number) t->nPatches + 1) *sizeof (char*)); - if (t->Data == NULL) { + if (t -> nSamples < 0 || t->nSamples > 0x7ffe || t->nPatches < 0 || t->nPatches > 0x7ffe) + { + SynError(it8, "AllocateDataSet: too much data"); + } + else { + t->Data = (char**)AllocChunk(it8, ((cmsUInt32Number)t->nSamples + 1) * ((cmsUInt32Number)t->nPatches + 1) * sizeof(char*)); + if (t->Data == NULL) { - SynError(it8, "AllocateDataSet: Unable to allocate data array"); + SynError(it8, "AllocateDataSet: Unable to allocate data array"); + } } } -- 2.19.0
