aboutsummaryrefslogtreecommitdiffstats
path: root/archivers/p7zip
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2018-02-10 18:59:11 +0800
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2018-02-10 18:59:11 +0800
commit79b7e05712aa79341a08952c4e6f534de97ec1bb (patch)
tree9eaeed245794c87dcf0059c1ce4505d557c2247f /archivers/p7zip
parent72ac4629a561211dcc3ba88a6273fde7255c3e23 (diff)
downloadfreebsd-ports-gnome-79b7e05712aa79341a08952c4e6f534de97ec1bb.tar.gz
freebsd-ports-gnome-79b7e05712aa79341a08952c4e6f534de97ec1bb.tar.zst
freebsd-ports-gnome-79b7e05712aa79341a08952c4e6f534de97ec1bb.zip
Add patch from CVE-2017-17969
Heap-based buffer overflow in 7zip/Compress/ShrinkDecoder.cpp. Obtained from: Debian (link in the actual patch) MFH: 2018Q1 Security: 6d337396-0e4a-11e8-94c0-5453ed2e2b49
Diffstat (limited to 'archivers/p7zip')
-rw-r--r--archivers/p7zip/Makefile2
-rw-r--r--archivers/p7zip/files/patch-CVE-2017-1796935
2 files changed, 36 insertions, 1 deletions
diff --git a/archivers/p7zip/Makefile b/archivers/p7zip/Makefile
index 1bf32ccd39ac..376fb3206810 100644
--- a/archivers/p7zip/Makefile
+++ b/archivers/p7zip/Makefile
@@ -3,7 +3,7 @@
PORTNAME= p7zip
PORTVERSION= 16.02
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= archivers
MASTER_SITES= SF
DISTNAME= ${PORTNAME}_${DISTVERSION}_src_all
diff --git a/archivers/p7zip/files/patch-CVE-2017-17969 b/archivers/p7zip/files/patch-CVE-2017-17969
new file mode 100644
index 000000000000..1d0e36ffb42f
--- /dev/null
+++ b/archivers/p7zip/files/patch-CVE-2017-17969
@@ -0,0 +1,35 @@
+Obtained-from: https://anonscm.debian.org/cgit/users/robert/p7zip.git/tree/debian/patches/13-CVE-2017-17969.patch
+---
+From: =?utf-8?q?Antoine_Beaupr=C3=A9?= <anarcat@debian.org>
+Date: Fri, 2 Feb 2018 11:11:41 +0100
+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
+Reviewed-by: Salvatore Bonaccorso <carnil@debian.org>
+Last-Update: 2018-02-01
+Applied-Upstream: 18.00-beta
+---
+ CPP/7zip/Compress/ShrinkDecoder.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- CPP/7zip/Compress/ShrinkDecoder.cpp
++++ CPP/7zip/Compress/ShrinkDecoder.cpp
+@@ -121,8 +121,13 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *
+ {
+ _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;
+