guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: p7zip: Fix CVE-2017-17969.


From: Leo Famulari
Subject: 01/01: gnu: p7zip: Fix CVE-2017-17969.
Date: Mon, 5 Feb 2018 16:24:17 -0500 (EST)

lfam pushed a commit to branch master
in repository guix.

commit a630c64709af2ab7fdeb797ee35d89964b1fc042
Author: Leo Famulari <address@hidden>
Date:   Mon Feb 5 16:21:12 2018 -0500

    gnu: p7zip: Fix CVE-2017-17969.
    
    * gnu/packages/patches/p7zip-CVE-2017-17969.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/compression.scm (p7zip)[source]: Use it.
---
 gnu/local.mk                                    |  3 ++-
 gnu/packages/compression.scm                    |  1 +
 gnu/packages/patches/p7zip-CVE-2017-17969.patch | 35 +++++++++++++++++++++++++
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 6fdea16..7011282 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -955,7 +955,8 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/osip-CVE-2017-7853.patch                        \
   %D%/packages/patches/ots-no-include-missing-file.patch       \
   %D%/packages/patches/owncloud-disable-updatecheck.patch      \
-  %D%/packages/patches/p7zip-CVE-2016-9296.patch                       \
+  %D%/packages/patches/p7zip-CVE-2016-9296.patch               \
+  %D%/packages/patches/p7zip-CVE-2017-17969.patch              \
   %D%/packages/patches/p7zip-remove-unused-code.patch          \
   %D%/packages/patches/patchelf-page-size.patch                        \
   %D%/packages/patches/patchelf-rework-for-arm.patch           \
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 3e0541e..a099f8d 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1377,6 +1377,7 @@ It can be used as a replacement for the Apache 
@code{CBZip2InputStream} /
                   (delete-file-recursively "CPP/7zip/Compress/Rar")
                   #t))
               (patches (search-patches "p7zip-CVE-2016-9296.patch"
+                                       "p7zip-CVE-2017-17969.patch"
                                        "p7zip-remove-unused-code.patch"))))
     (build-system gnu-build-system)
     (arguments
diff --git a/gnu/packages/patches/p7zip-CVE-2017-17969.patch 
b/gnu/packages/patches/p7zip-CVE-2017-17969.patch
new file mode 100644
index 0000000..51c2400
--- /dev/null
+++ b/gnu/packages/patches/p7zip-CVE-2017-17969.patch
@@ -0,0 +1,35 @@
+Fix CVE-2017-17969:
+
+https://sourceforge.net/p/p7zip/bugs/204/
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-17969
+
+Patch copied from Debian.
+
+Subject: Heap-based buffer overflow in 7zip/Compress/ShrinkDecoder.cpp
+Origin: vendor, 
https://sourceforge.net/p/p7zip/bugs/_discuss/thread/0920f369/27d7/attachment/CVE-2017-17969.patch
+Forwarded: https://sourceforge.net/p/p7zip/bugs/_discuss/thread/0920f369/#27d7
+Bug: https://sourceforge.net/p/p7zip/bugs/204/
+Bug-Debian: https://bugs.debian.org/888297
+Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2017-17969
+Author: Antoine Beaupré <address@hidden>
+Reviewed-by: Salvatore Bonaccorso <address@hidden>
+Last-Update: 2018-02-01
+Applied-Upstream: 18.00-beta
+
+--- a/CPP/7zip/Compress/ShrinkDecoder.cpp
++++ b/CPP/7zip/Compress/ShrinkDecoder.cpp
+@@ -121,8 +121,13 @@ HRESULT CDecoder::CodeReal(ISequentialIn
+     {
+       _stack[i++] = _suffixes[cur];
+       cur = _parents[cur];
++      if (cur >= kNumItems || i >= kNumItems)
++        break;
+     }
+-    
++
++    if (cur >= kNumItems || i >= kNumItems)
++      break;
++
+     _stack[i++] = (Byte)cur;
+     lastChar2 = (Byte)cur;
+ 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]