Hello community, here is the log from the commit of package expat for openSUSE:Factory checked in at 2016-05-26 23:52:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/expat (Old) and /work/SRC/openSUSE:Factory/.expat.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "expat" Changes: -------- --- /work/SRC/openSUSE:Factory/expat/expat.changes 2016-04-11 10:27:22.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.expat.new/expat.changes 2016-05-26 23:52:33.000000000 +0200 @@ -1,0 +2,11 @@ +Wed May 18 11:43:51 UTC 2016 - kstreit...@suse.com + +- add expat-2.1.1-avoid_relying_on_undef_behaviour.patch to avoid + relying on undefined behavior in CVE-2015-1283 fix [bnc#980391], + [CVE-2015-1283] +- add expat-2.1.1-parser_crashes_on_malformed_input.patch to fix + Expat XML parser that mishandles certain kinds of malformed input + documents [bnc#979441], [CVE-2016-0718] +- use spec-cleaner to clean specfile + +------------------------------------------------------------------- New: ---- expat-2.1.1-avoid_relying_on_undef_behaviour.patch expat-2.1.1-parser_crashes_on_malformed_input.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ expat.spec ++++++ --- /var/tmp/diff_new_pack.efPYXJ/_old 2016-05-26 23:52:34.000000000 +0200 +++ /var/tmp/diff_new_pack.efPYXJ/_new 2016-05-26 23:52:34.000000000 +0200 @@ -28,6 +28,10 @@ Source2: baselibs.conf Patch1: expat-visibility.patch Patch2: expat-alloc-size.patch +# PATCH-FIX-UPSTREAM bnc#980391 CVE-2015-1283 kstreit...@suse.comĀ -- Avoid relying on undefined behavior in CVE-2015-1283 fix +Patch3: expat-2.1.1-avoid_relying_on_undef_behaviour.patch +# PATCH-FIX-UPSTREAM bnc#979441 CVE-2016-0718 kstreit...@suse.comĀ -- XML parser crashes on malformed input +Patch4: expat-2.1.1-parser_crashes_on_malformed_input.patch BuildRequires: autoconf >= 2.58 BuildRequires: automake BuildRequires: gcc-c++ @@ -67,18 +71,20 @@ %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 cp %{SOURCE1} . rm -f examples/*.dsp %build -export CFLAGS="%optflags -fvisibility=hidden" +export CFLAGS="%{optflags} -fvisibility=hidden" %configure --disable-static \ --with-pic make %{?_smp_mflags} %install -make DESTDIR=%{buildroot} install %{?_smp_mflags} +make %{?_smp_mflags} DESTDIR=%{buildroot} install rm doc/xmlwf.1 # remove .la file @@ -88,7 +94,6 @@ make %{?_smp_mflags} check %post -n libexpat1 -p /sbin/ldconfig - %postun -n libexpat1 -p /sbin/ldconfig %files ++++++ expat-2.1.1-avoid_relying_on_undef_behaviour.patch ++++++ >From 29a11774d8ebbafe8418b4a5ffb4cc1160b194a1 Mon Sep 17 00:00:00 2001 From: Pascal Cuoq <c...@trust-in-soft.com> Date: Sun, 15 May 2016 09:05:46 +0200 Subject: [PATCH] Avoid relying on undefined behavior in CVE-2015-1283 fix. It does not really work: https://godbolt.org/g/Zl8gdF --- expat/lib/xmlparse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Index: expat-2.1.1/lib/xmlparse.c =================================================================== --- expat-2.1.1.orig/lib/xmlparse.c +++ expat-2.1.1/lib/xmlparse.c @@ -1693,7 +1693,8 @@ XML_GetBuffer(XML_Parser parser, int len } if (len > bufferLim - bufferEnd) { - int neededSize = len + (int)(bufferEnd - bufferPtr); + /* Do not invoke signed arithmetic overflow: */ + int neededSize = (int) ((unsigned)len + (unsigned)(bufferEnd - bufferPtr)); if (neededSize < 0) { errorCode = XML_ERROR_NO_MEMORY; return NULL; @@ -1725,7 +1726,8 @@ XML_GetBuffer(XML_Parser parser, int len if (bufferSize == 0) bufferSize = INIT_BUFFER_SIZE; do { - bufferSize *= 2; + /* Do not invoke signed arithmetic overflow: */ + bufferSize = (int) (2U * (unsigned) bufferSize); } while (bufferSize < neededSize && bufferSize > 0); if (bufferSize <= 0) { errorCode = XML_ERROR_NO_MEMORY; ++++++ expat-2.1.1-parser_crashes_on_malformed_input.patch ++++++ ++++ 752 lines (skipped)