-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
p7zip: Fix CVE-2017-17969 | ||
|
||
[No upstream tracking] -- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888297 | ||
|
||
Heap-based buffer overflow in 7zip | ||
|
||
Compress/ShrinkDecoder.cpp: Heap-based buffer overflow | ||
in the NCompress::NShrink::CDecoder::CodeReal method | ||
in 7-Zip before 18.00 and p7zip allows remote attackers | ||
to cause a denial of service (out-of-bounds write) | ||
or potentially execute arbitrary code via a crafted ZIP archive. | ||
|
||
Upstream-Status: Backport [https://sourceforge.net/p/p7zip/bugs/_discuss/thread/0920f369/8316/attachment/CVE-2017-17969.patch] | ||
CVE: CVE-2017-17969 | ||
Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com> | ||
|
||
--- a/CPP/7zip/Compress/ShrinkDecoder.cpp | ||
+++ b/CPP/7zip/Compress/ShrinkDecoder.cpp | ||
@@ -121,7 +121,12 @@ 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters