Hello community, here is the log from the commit of package sharutils for openSUSE:Factory checked in at 2018-03-19 23:30:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sharutils (Old) and /work/SRC/openSUSE:Factory/.sharutils.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sharutils" Mon Mar 19 23:30:23 2018 rev:26 rq:586335 version:4.15.2 Changes: -------- --- /work/SRC/openSUSE:Factory/sharutils/sharutils.changes 2015-07-05 17:56:59.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.sharutils.new/sharutils.changes 2018-03-19 23:30:25.514567332 +0100 @@ -1,0 +2,6 @@ +Tue Mar 13 09:41:21 CET 2018 - p...@suse.de + +- Add sharutils-CVE-2018-1000097-fix_buffer_overflow.patch to fix + a possibility to overflow the stack (bsc#1085004, CVE-2018-1000097). + +------------------------------------------------------------------- New: ---- sharutils-CVE-2018-1000097-fix_buffer_overflow.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sharutils.spec ++++++ --- /var/tmp/diff_new_pack.cRubRu/_old 2018-03-19 23:30:26.314538473 +0100 +++ /var/tmp/diff_new_pack.cRubRu/_new 2018-03-19 23:30:26.318538328 +0100 @@ -1,7 +1,7 @@ # # spec file for package sharutils # -# Copyright (c) 2015 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 @@ -27,6 +27,7 @@ Source1: ftp://ftp.gnu.org/gnu/sharutils/sharutils-%{version}.tar.xz.sig Source2: %{name}.keyring Patch0: sharutils-testsuite.diff +Patch1: sharutils-CVE-2018-1000097-fix_buffer_overflow.patch BuildRequires: libopenssl-devel BuildRequires: mailx BuildRequires: xz @@ -56,6 +57,7 @@ %prep %setup -q %patch0 +%patch1 chmod +w src/scripts.x %build ++++++ sharutils-CVE-2018-1000097-fix_buffer_overflow.patch ++++++ --- src/unshar.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Index: src/unshar.c =================================================================== --- src/unshar.c.orig 2015-01-07 03:14:10.000000000 +0100 +++ src/unshar.c 2018-03-13 10:21:47.491268510 +0100 @@ -107,7 +107,8 @@ looks_like_c_code (char const * buf) static bool looks_like_shell_code (char const * buf) { - while (isspace ((int) *buf)) buf++; + intptr_t buf_end = buf + rw_base_size; + while (isspace ((int) *buf) && buf < buf_end) buf++; switch (*buf) { case '#': case ':': @@ -240,7 +241,7 @@ find_archive (char const * name, FILE * off_t position = ftello (file); /* Read next line, fail if no more and no previous process. */ - if (!fgets (rw_buffer, BUFSIZ, file)) + if (!fgets (rw_buffer, GET_PAGE_SIZE, file)) { if (!start) error (0, 0, _("Found no shell commands in %s"), name);