summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorRadovan Scasny <radovan.scasny@siemens.com>2018-02-20 12:08:13 +0100
committerArmin Kuster <akuster808@gmail.com>2018-03-01 16:12:55 -0800
commit203027aa0e19e361bfa5afbc61f8243e3a434a73 (patch)
treeeb3288286c4755d34b8cc9320ff5d9ace2a1b4a3 /meta-oe
parent19c1b40b4f63ca437aaf78fa17af6fe35372478e (diff)
downloadmeta-openembedded-203027aa0e19e361bfa5afbc61f8243e3a434a73.tar.gz
fix(p7zip): fix CVE-2017-17969
Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com> Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch31
-rw-r--r--meta-oe/recipes-extended/p7zip/p7zip_16.02.bb3
2 files changed, 33 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch b/meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch
new file mode 100644
index 000000000..177d1455f
--- /dev/null
+++ b/meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch
@@ -0,0 +1,31 @@
1p7zip: Fix CVE-2017-17969
2
3[No upstream tracking] -- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888297
4
5Heap-based buffer overflow in 7zip
6
7Compress/ShrinkDecoder.cpp: Heap-based buffer overflow
8in the NCompress::NShrink::CDecoder::CodeReal method
9in 7-Zip before 18.00 and p7zip allows remote attackers
10to cause a denial of service (out-of-bounds write)
11or potentially execute arbitrary code via a crafted ZIP archive.
12
13Upstream-Status: Backport [https://sourceforge.net/p/p7zip/bugs/_discuss/thread/0920f369/8316/attachment/CVE-2017-17969.patch]
14CVE: CVE-2017-17969
15Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com>
16
17--- a/CPP/7zip/Compress/ShrinkDecoder.cpp
18+++ b/CPP/7zip/Compress/ShrinkDecoder.cpp
19@@ -121,7 +121,12 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *
20 {
21 _stack[i++] = _suffixes[cur];
22 cur = _parents[cur];
23+ if (cur >= kNumItems || i >= kNumItems)
24+ break;
25 }
26+
27+ if (cur >= kNumItems || i >= kNumItems)
28+ break;
29
30 _stack[i++] = (Byte)cur;
31 lastChar2 = (Byte)cur;
diff --git a/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb b/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
index 67ffbc67c..edf47f7bc 100644
--- a/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
+++ b/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
@@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://DOC/copying.txt;md5=4fbd65380cdd255951079008b364516c
6 file://DOC/License.txt;md5=879598edf1f54dddb6930d7581357f8b" 6 file://DOC/License.txt;md5=879598edf1f54dddb6930d7581357f8b"
7 7
8SRC_URI = "http://downloads.sourceforge.net/p7zip/p7zip/${PV}/p7zip_${PV}_src_all.tar.bz2 \ 8SRC_URI = "http://downloads.sourceforge.net/p7zip/p7zip/${PV}/p7zip_${PV}_src_all.tar.bz2 \
9 file://do_not_override_compiler_and_do_not_strip.patch" 9 file://do_not_override_compiler_and_do_not_strip.patch \
10 file://CVE-2017-17969.patch"
10 11
11SRC_URI[md5sum] = "a0128d661cfe7cc8c121e73519c54fbf" 12SRC_URI[md5sum] = "a0128d661cfe7cc8c121e73519c54fbf"
12SRC_URI[sha256sum] = "5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f" 13SRC_URI[sha256sum] = "5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f"